From af01b18e807dcf9e0cde09abd6bbcb5e811fa406 Mon Sep 17 00:00:00 2001 From: maksim Date: Wed, 27 Nov 2024 01:21:37 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D1=87=D1=83=D1=82=D1=8C-=D1=87=D1=83=D1=82?= =?UTF-8?q?=D1=8C=20=D0=B4=D0=B5=D0=B7=D0=B8=D0=B3=D0=BD.=20=D0=9D=D0=B0?= =?UTF-8?q?=D0=B2=D1=80=D0=BD=D0=BE=D0=B5,=20=D0=BD=D0=B0=D0=B4=D0=BE=20?= =?UTF-8?q?=D1=83=D0=B6=D0=B5=20=D0=B4=D1=80=D1=83=D0=B3=D0=BE=D0=B5=20?= =?UTF-8?q?=D1=80=D0=B5=D0=BB=D0=B8=D0=B7=D0=BE=D0=B2=D1=8B=D0=B2=D0=B0?= =?UTF-8?q?=D1=82=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Enums/GenderType.cs | 14 ++ EmployeeManagmentView/App.xaml | 62 ++++----- EmployeeManagmentView/MainWindow.xaml | 1 + EmployeeManagmentView/MainWindow.xaml.cs | 12 ++ .../AddPhysicalPersonWindow.xaml | 127 ++++++++++++------ .../AddPhysicalPersonWindow.xaml.cs | 29 +--- .../PhysicalPersonManagementWindow.xaml | 10 +- .../PhysicalPersonManagementWindow.xaml.cs | 32 ++--- 8 files changed, 161 insertions(+), 126 deletions(-) create mode 100644 EmployeeManagmentDataModels/Enums/GenderType.cs diff --git a/EmployeeManagmentDataModels/Enums/GenderType.cs b/EmployeeManagmentDataModels/Enums/GenderType.cs new file mode 100644 index 0000000..3b9398c --- /dev/null +++ b/EmployeeManagmentDataModels/Enums/GenderType.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EmployeeManagmentDataModels.Enums +{ + public enum GenderType + { + Мужчина, + Женщина + } +} diff --git a/EmployeeManagmentView/App.xaml b/EmployeeManagmentView/App.xaml index 379f75c..2ed9162 100644 --- a/EmployeeManagmentView/App.xaml +++ b/EmployeeManagmentView/App.xaml @@ -9,10 +9,10 @@ + CornerRadius="15" + BorderBrush="Transparent" + BorderThickness="0" + x:Name="ButtonBorder"> @@ -24,14 +24,13 @@ - + Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" + To="#0066CC" Duration="0:0:0.2" /> @@ -39,14 +38,13 @@ + Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" + To="#004890" Duration="0:0:0.2" /> - @@ -64,10 +62,10 @@ + To="0.95" Duration="0:0:0.2" /> + To="0.95" Duration="0:0:0.2" /> @@ -76,10 +74,10 @@ + To="1.0" Duration="0:0:0.2" /> + To="1.0" Duration="0:0:0.2" /> @@ -90,42 +88,28 @@ - - + - - - diff --git a/EmployeeManagmentView/MainWindow.xaml b/EmployeeManagmentView/MainWindow.xaml index 2a2c983..82e8033 100644 --- a/EmployeeManagmentView/MainWindow.xaml +++ b/EmployeeManagmentView/MainWindow.xaml @@ -3,6 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Отдел кадров УлГТУ" Height="450" Width="800" Background="#0D2D4F" MinWidth="400" MinHeight="300" + WindowStartupLocation="CenterScreen" MaxWidth="{Binding Source={x:Static SystemParameters.PrimaryScreenWidth}}" MaxHeight="{Binding Source={x:Static SystemParameters.PrimaryScreenHeight}}"> diff --git a/EmployeeManagmentView/MainWindow.xaml.cs b/EmployeeManagmentView/MainWindow.xaml.cs index fbc8a22..4e82b72 100644 --- a/EmployeeManagmentView/MainWindow.xaml.cs +++ b/EmployeeManagmentView/MainWindow.xaml.cs @@ -22,6 +22,18 @@ namespace EmployeeManagmentView private void OpenPhysicalPersonManagementWindow(object sender, RoutedEventArgs e) { + foreach (Window window in Application.Current.Windows) + { + if (window is PhysicalPersonManagementWindow) + { + // Если окно уже открыто, активируем его и ставим на передний план + window.Activate(); + window.WindowStartupLocation = WindowStartupLocation.CenterScreen; + window.Topmost = true; // Ставим окно на передний план + window.Topmost = false; // Сразу снимаем флаг, чтобы окно не оставалось всегда наверху + return; + } + } var physicalPersonWindow = new PhysicalPersonManagementWindow(_phisicalPersonLogic); physicalPersonWindow.Show(); diff --git a/EmployeeManagmentView/PhysicalPerson/AddPhysicalPersonWindow.xaml b/EmployeeManagmentView/PhysicalPerson/AddPhysicalPersonWindow.xaml index 0c5a007..f3db84d 100644 --- a/EmployeeManagmentView/PhysicalPerson/AddPhysicalPersonWindow.xaml +++ b/EmployeeManagmentView/PhysicalPerson/AddPhysicalPersonWindow.xaml @@ -1,8 +1,8 @@  @@ -15,62 +15,103 @@ Foreground="#FFFFFF" Margin="0,20,0,0" /> - - + + + + + + + + + + + + + + + + + + - + + - + + - + + - + + - + + - + + - + + -