Sfoglia il codice sorgente

Добавьте файлы проекта.

максим карбышев 3 anni fa
parent
commit
55f669b055

+ 25 - 0
MiAPOPractice.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MiAPOPractice", "MiAPOPractice\MiAPOPractice.csproj", "{CCC6206C-56DD-4B47-A53A-219AE64AD48E}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{CCC6206C-56DD-4B47-A53A-219AE64AD48E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{CCC6206C-56DD-4B47-A53A-219AE64AD48E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{CCC6206C-56DD-4B47-A53A-219AE64AD48E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{CCC6206C-56DD-4B47-A53A-219AE64AD48E}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {989F223A-25E0-419D-8F02-421837DA556C}
+	EndGlobalSection
+EndGlobal

+ 30 - 0
MiAPOPractice/AddWindow/AddItemWindow.xaml

@@ -0,0 +1,30 @@
+<Window x:Class="MiAPOPractice.AddWindow.AddItemWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:MiAPOPractice.AddWindow"
+        mc:Ignorable="d"
+        Title="Добавить предмет" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" WindowStyle="SingleBorderWindow" Height="900" Width="1800">
+    <Grid>
+        <Button x:Name="BackButton" Content="Назад" HorizontalAlignment="Left" Margin="20,17,0,0" VerticalAlignment="Top" Height="39" Width="140" FontSize="25" Click="BackButtonClick"/>
+        <Label Content="Название:" HorizontalAlignment="Left" Margin="140,68,0,0" VerticalAlignment="Top" Height="60" Width="180" Foreground="White" FontSize="36"/>
+        <TextBox x:Name="Name" HorizontalAlignment="Left" Margin="140,127,0,0" VerticalAlignment="Top" Height="60" Width="450" FontSize="36"/>
+        <Label Content="Количество:" HorizontalAlignment="Left" Margin="140,209,0,0" VerticalAlignment="Top" Height="60" Width="224" Foreground="White" FontSize="36"/>
+        <TextBox x:Name="Count" HorizontalAlignment="Left" Margin="140,270,0,0" VerticalAlignment="Top" Height="60" Width="450" FontSize="36" TextChanged="TextChanged"/>
+        <Label Content="ФИО за кем закреплено:" HorizontalAlignment="Left" Margin="140,352,0,0" VerticalAlignment="Top" Height="60" Width="430" Foreground="White" FontSize="36"/>
+        <ComboBox x:Name="FIOPerson" HorizontalAlignment="Left" Margin="140,0,0,0" VerticalAlignment="Center" Height="60" Width="450" FontSize="36"/>
+        <Label Content="Адрес:" HorizontalAlignment="Left" Margin="140,495,0,0" VerticalAlignment="Top" Height="60" Width="180" Foreground="White" FontSize="36"/>
+        <TextBox x:Name="Address" HorizontalAlignment="Left" Margin="140,556,0,0" VerticalAlignment="Top" Height="60" Width="450" FontSize="36"/>
+        <Label Content="Состояние:" HorizontalAlignment="Left" Margin="140,638,0,0" VerticalAlignment="Top" Height="60" Width="208" Foreground="White" FontSize="36"/>
+        <TextBox x:Name="Condition" HorizontalAlignment="Left" Margin="140,699,0,0" VerticalAlignment="Top" Height="60" Width="450" FontSize="36"/>
+        <Label Content="Списано:" HorizontalAlignment="Left" Margin="658,68,0,0" VerticalAlignment="Top" Height="60" Width="160" Foreground="White" FontSize="36"/>
+        <ComboBox x:Name="IsWrittenOff" Height="60" FontSize="36" Margin="658,128,804,696">
+            <TextBlock Text="Да"/>
+            <TextBlock Text="Нет"/>
+        </ComboBox>
+        <Label Content="Описание:" HorizontalAlignment="Left" Margin="1068,68,0,0" VerticalAlignment="Top" Height="60" Width="180" Foreground="White" FontSize="36"/>
+        <TextBox x:Name="Description" HorizontalAlignment="Left" Margin="1068,126,0,0" VerticalAlignment="Top" Height="608" Width="626" FontSize="36"/>
+        <Button x:Name="AddButton" Content="Добавить" HorizontalAlignment="Left" Margin="1478,820,0,0" VerticalAlignment="Top" Height="39" Width="140" FontSize="25" Click="AddButtonClick"/>
+    </Grid>
+</Window>

+ 88 - 0
MiAPOPractice/AddWindow/AddItemWindow.xaml.cs

@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.RegularExpressions;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace MiAPOPractice.AddWindow
+{
+    /// <summary>
+    /// Логика взаимодействия для AddItemWindow.xaml
+    /// </summary>
+    public partial class AddItemWindow : Window
+    {
+        List<int> persons;
+
+        public AddItemWindow()
+        {
+            InitializeComponent();
+
+            FIOPerson.ItemsSource = Connection.db.Persons.Select(item => item.FIO).ToList();
+        }
+        public AddItemWindow(int id)
+        {
+            InitializeComponent();
+
+            Items itemTemp = Connection.db.Items.Where(item => item.InventoryNumber == id).FirstOrDefault();
+
+            Name.Text = itemTemp.Name;
+            Count.Text = itemTemp.Count.ToString();
+            Address.Text = itemTemp.Address;
+            Condition.Text = itemTemp.Condition;
+            Description.Text = itemTemp.Description;
+
+            FIOPerson.ItemsSource = Connection.db.Persons.Select(item => item.FIO).ToList();
+            FIOPerson.SelectedItem = Connection.db.ItemsPersons.Where(item => item.Items.InventoryNumber == id).Select(item => item.Persons.FIO).FirstOrDefault();
+
+            IsWrittenOff.SelectedItem = itemTemp.IsWrittenOff == true ? "Да" : "Нет";
+        }
+
+        private void AddButtonClick(object sender, RoutedEventArgs e)
+        {
+            if (Name.Text == null || Count.Text == null || FIOPerson.SelectedItem == null || Address.Text == null ||
+                Condition.Text == null || IsWrittenOff.SelectedItem == null)
+            {
+                MessageBox.Show("Ошибка: пустые поля");
+                return;
+            }
+            if (Count.Text.ToString().Count(counter => counter == '.') > 1)
+            {
+                MessageBox.Show("Ошибка: неверный формат призового фонда");
+                return;
+            }
+
+            Items item = new Items()
+            {
+                Name = Name.Text,
+                Count = Convert.ToInt32(Count.Text),
+                FIOPerson = FIOPerson.SelectedItem,
+                Address = Address.Text,
+                Condition = Condition.Text,
+                IsWrittenOff = IsWrittenOff.SelectedItem.ToString() == "Да" ? true : false,
+                Description = Description.Text
+            };
+
+            Connection.db.Items.Add(item);
+            Connection.db.SaveChanges();
+        }
+
+        private void TextChanged(object sender, TextChangedEventArgs e)
+        {
+            #region Валидация
+            if (Regex.IsMatch((((TextBox)sender).Text).ToString(), "[^\\d-.]"))
+            {
+                ((TextBox)sender).Text = ((TextBox)sender).Text.Remove(((TextBox)sender).Text.Length - 1);
+                ((TextBox)sender).SelectionStart = ((TextBox)sender).Text.Length;
+            }
+            #endregion
+        }
+
+        private void BackButtonClick(object sender, RoutedEventArgs e)
+        {
+            ItemsListWindow itemsListWindow = new ItemsListWindow();
+            itemsListWindow.Show();
+            this.Close();
+        }
+    }
+}

+ 17 - 0
MiAPOPractice/AddWindow/AddPersonWindow.xaml

@@ -0,0 +1,17 @@
+<Window x:Class="MiAPOPractice.AddWindow.AddPersonWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:MiAPOPractice.AddWindow"
+        mc:Ignorable="d"
+        Title="Добавить человека" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" WindowStyle="SingleBorderWindow" Height="900" Width="1800">
+    <Grid>
+        <Button x:Name="BackButton" Content="Назад" HorizontalAlignment="Left" Margin="20,17,0,0" VerticalAlignment="Top" Height="39" Width="140" FontSize="25" Click="BackButtonClick"/>
+        <Label Content="Фамилия имя отчество:" HorizontalAlignment="Left" Margin="140,68,0,0" VerticalAlignment="Top" Height="60" Width="422" Foreground="White" FontSize="36"/>
+        <TextBox x:Name="FIO" HorizontalAlignment="Left" Margin="140,127,0,0" VerticalAlignment="Top" Height="60" Width="1172" FontSize="36"/>
+        <Label Content="Номер телефона:" HorizontalAlignment="Left" Margin="140,209,0,0" VerticalAlignment="Top" Height="60" Width="310" Foreground="White" FontSize="36"/>
+        <TextBox x:Name="PhoneNumber" HorizontalAlignment="Left" Margin="140,270,0,0" VerticalAlignment="Top" Height="60" Width="470" FontSize="36" TextChanged="TextChanged"/>
+        <Button x:Name="AddButton" Content="Добавить" HorizontalAlignment="Left" Margin="1478,820,0,0" VerticalAlignment="Top" Height="39" Width="140" FontSize="25" Click="AddButtonClick"/>
+    </Grid>
+</Window>

+ 64 - 0
MiAPOPractice/AddWindow/AddPersonWindow.xaml.cs

@@ -0,0 +1,64 @@
+using System.Linq;
+using System.Text.RegularExpressions;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace MiAPOPractice.AddWindow
+{
+    /// <summary>
+    /// Логика взаимодействия для AddPersonWindow.xaml
+    /// </summary>
+    public partial class AddPersonWindow : Window
+    {
+        public AddPersonWindow()
+        {
+            InitializeComponent();
+        }
+
+        public AddPersonWindow(int id)
+        {
+            InitializeComponent();
+
+            Persons person = Connection.db.Persons.Where(item => item.ID).FirstOrDefault();
+
+            FIO.Text = person.FIO;
+            PhoneNumber.Text = person.PhoneNumber;
+        }
+
+        private void AddButtonClick(object sender, RoutedEventArgs e)
+        {
+            if (FIO.Text == null || PhoneNumber.Text == null)
+            {
+                MessageBox.Show("Ошибка: пустые поля");
+                return;
+            }
+
+            Persons person = new Persons()
+            {
+                FIO = FIO.Text,
+                PhoneNumber = PhoneNumber.Text
+            };
+
+            Connection.db.Persons.Add(person);
+            Connection.db.SaveChanges();
+        }
+
+        private void TextChanged(object sender, TextChangedEventArgs e)
+        {
+            #region Валидация
+            if (Regex.IsMatch((((TextBox)sender).Text).ToString(), "[^\\d-.]"))
+            {
+                ((TextBox)sender).Text = ((TextBox)sender).Text.Remove(((TextBox)sender).Text.Length - 1);
+                ((TextBox)sender).SelectionStart = ((TextBox)sender).Text.Length;
+            }
+            #endregion
+        }
+
+        private void BackButtonClick(object sender, RoutedEventArgs e)
+        {
+            ItemsListWindow itemsListWindow = new ItemsListWindow();
+            itemsListWindow.Show();
+            this.Close();
+        }
+    }
+}

+ 6 - 0
MiAPOPractice/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
+    </startup>
+</configuration>

+ 9 - 0
MiAPOPractice/App.xaml

@@ -0,0 +1,9 @@
+<Application x:Class="MiAPOPractice.App"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:local="clr-namespace:MiAPOPractice"
+             StartupUri="MainWindow.xaml">
+    <Application.Resources>
+        <ResourceDictionary Source="Styles.xaml"/>
+    </Application.Resources>
+</Application>

+ 17 - 0
MiAPOPractice/App.xaml.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace MiAPOPractice
+{
+    /// <summary>
+    /// Логика взаимодействия для App.xaml
+    /// </summary>
+    public partial class App : Application
+    {
+    }
+}

+ 7 - 0
MiAPOPractice/Connection.cs

@@ -0,0 +1,7 @@
+namespace MiAPOPractice
+{
+    internal class Connection
+    {
+        //public static MiAPOPracticeEntities db = new MiAPOPracticeEntities();
+    }
+}

+ 29 - 0
MiAPOPractice/ElementsWindows/ItemWindow.xaml

@@ -0,0 +1,29 @@
+<Window x:Class="MiAPOPractice.ElementsWindows.ItemWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:MiAPOPractice.ElementsWindows"
+        mc:Ignorable="d"
+        Title="Предмет" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" WindowStyle="SingleBorderWindow" Height="900" Width="1800">
+    <Grid>
+        <Button x:Name="BackButton"  Content="Назад" HorizontalAlignment="Left" Margin="20,17,0,0" VerticalAlignment="Top" Height="39" Width="140" FontSize="25" Click="BackButtonClick"/>
+        <Label Content="Название:" HorizontalAlignment="Left" Margin="140,122,0,0" VerticalAlignment="Top" Height="60" Width="180" Foreground="White" FontSize="36"/>
+        <Label x:Name="Name" HorizontalAlignment="Left" Margin="140,181,0,0" VerticalAlignment="Top" Height="60" Width="450" FontSize="36" Foreground="#FF54E4FF"/>
+        <Label Content="Количество:" HorizontalAlignment="Left" Margin="140,263,0,0" VerticalAlignment="Top" Height="60" Width="224" Foreground="White" FontSize="36"/>
+        <Label x:Name="Count" HorizontalAlignment="Left" Margin="140,324,0,0" VerticalAlignment="Top" Height="60" Width="450" FontSize="36" Foreground="#FF54E4FF"/>
+        <Label Content="ФИО за кем закреплено:" HorizontalAlignment="Left" Margin="140,406,0,0" VerticalAlignment="Top" Height="60" Width="430" Foreground="White" FontSize="36"/>
+        <Label x:Name="FIOPerson" HorizontalAlignment="Left" Margin="140,467,0,0" VerticalAlignment="Top" Height="60" Width="450" FontSize="36" Foreground="#FF54E4FF"/>
+        <Label Content="Адрес:" HorizontalAlignment="Left" Margin="140,549,0,0" VerticalAlignment="Top" Height="60" Width="180" Foreground="White" FontSize="36"/>
+        <Label x:Name="Address" HorizontalAlignment="Left" Margin="140,610,0,0" VerticalAlignment="Top" Height="60" Width="450" FontSize="36" Foreground="#FF54E4FF"/>
+        <Label Content="Состояние:" HorizontalAlignment="Left" Margin="140,692,0,0" VerticalAlignment="Top" Height="60" Width="208" Foreground="White" FontSize="36"/>
+        <Label x:Name="Condition" HorizontalAlignment="Left" Margin="140,753,0,0" VerticalAlignment="Top" Height="60" Width="450" FontSize="36" Foreground="#FF54E4FF"/>
+        <Label x:Name="WrittenOff" Content="Списано" HorizontalAlignment="Center" Margin="0,753,0,0" VerticalAlignment="Top" Height="60" Width="160" FontSize="36" Foreground="Red" 
+               Visibility="Hidden"/>
+        <Label Content="Описание:" HorizontalAlignment="Left" Margin="1068,122,0,0" VerticalAlignment="Top" Height="60" Width="180" Foreground="White" FontSize="36"/>
+        <Label x:Name="Description" HorizontalAlignment="Left" Margin="1068,181,0,0" VerticalAlignment="Top" Height="608" Width="626" FontSize="36" Foreground="#FF54E4FF"/>
+        <Label Content="Инвентарный номер:" HorizontalAlignment="Left" Margin="658,122,0,0" VerticalAlignment="Top" Height="60" Width="368" Foreground="White" FontSize="36"/>
+        <Label x:Name="InventoryNumber" HorizontalAlignment="Left" Margin="657,181,0,0" VerticalAlignment="Top" Height="60" Width="270" FontSize="36" Foreground="#FF54E4FF"/>
+        <Button Content="Изменить" Margin="0,797,0,48" Height="39" Width="140" FontSize="25" VerticalAlignment="Center" Click="ChangeButtonClick"/>
+    </Grid>
+</Window>

+ 49 - 0
MiAPOPractice/ElementsWindows/ItemWindow.xaml.cs

@@ -0,0 +1,49 @@
+using System.Linq;
+using System.Windows;
+using MiAPOPractice.AddWindow;
+
+namespace MiAPOPractice.ElementsWindows
+{
+    /// <summary>
+    /// Логика взаимодействия для ItemWindow.xaml
+    /// </summary>
+    public partial class ItemWindow : Window
+    {
+        Items item;
+        Persons person;
+        Places place;
+
+        public ItemWindow(int IDItem)
+        {
+            InitializeComponent();
+
+            item = Connection.db.Items.Where(item => item.InventoryNumber == IDItem).FirstOrDefault();
+            person = Connection.db.ItemsPersons.Where(item => Items.ID == item.ID).Select(item => item.Persons).FirstOrDefault();
+            place = Connection.db.ItemsPlaces.Where(item => Items.ID == item.ID).Select(item => item.Places).FirstOrDefault();
+
+            Name.Content = item.Name;
+            Count.Content = item.Count;
+            FIOPerson.Content = person.FIO;
+            Address.Content = place.Address;
+            Description.Content = item.Description;
+            InventoryNumber.Content = item.InventoryNumber;
+
+            if (item.IsWrittenOff)
+                WrittenOff.Visibility = Visibility.Visible;
+        }
+
+        private void BackButtonClick(object sender, RoutedEventArgs e)
+        {
+            MainWindow mw = new MainWindow();
+            mw.Show();
+            this.Close();
+        }
+
+        private void ChangeButtonClick(object sender, RoutedEventArgs e)
+        {
+            AddItemWindow addItemWindow = new AddItemWindow(item.InventoryNumber);
+            addItemWindow.Show();
+            this.Close();
+        }
+    }
+}

+ 36 - 0
MiAPOPractice/ElementsWindows/PersonWindow.xaml

@@ -0,0 +1,36 @@
+<Window x:Class="MiAPOPractice.ElementsWindows.PersonWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:MiAPOPractice.ElementsWindows"
+        mc:Ignorable="d"
+        Title="Человек" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" WindowStyle="SingleBorderWindow" Height="900" Width="1800">
+    <Grid>
+        <Button x:Name="BackButton"  Content="Назад" HorizontalAlignment="Left" Margin="20,17,0,0" VerticalAlignment="Top" Height="39" Width="140" FontSize="25" Click="BackButtonClick"/>
+        <Label Content="Фамилия имя отчество:" HorizontalAlignment="Left" Margin="92,122,0,0" VerticalAlignment="Top" Height="60" Width="444" Foreground="White" FontSize="36"/>
+        <Label x:Name="FIO" HorizontalAlignment="Left" Margin="92,181,0,0" VerticalAlignment="Top" Height="60" Width="990" FontSize="36" Foreground="#FF54E4FF"/>
+        <Label Content="Номер телефона:" HorizontalAlignment="Left" Margin="1166,122,0,0" VerticalAlignment="Top" Height="60" Width="308" Foreground="White" FontSize="36"/>
+        <Label x:Name="PhoneNumber" HorizontalAlignment="Left" Margin="1167,184,0,0" VerticalAlignment="Top" Height="60" Width="550" FontSize="36" Foreground="#FF54E4FF"/>
+        <DataGrid x:Name="ItemsGrid" AutoGenerateColumns="False" Height="385" Margin="0,388,0,0" VerticalAlignment="Top" HorizontalAlignment="Center" 
+            Width="1674" RowHeaderStyle="{StaticResource RowHeaderStyle}" ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}">
+            <DataGrid.ItemContainerStyle>
+                <Style TargetType="{x:Type DataGridRow}">
+                    <EventSetter Event="Control.MouseDoubleClick" Handler="ItemMouseDoubleClick"/>
+                </Style>
+            </DataGrid.ItemContainerStyle>
+            <DataGrid.Columns>
+                <DataGridTextColumn Binding="{Binding Items.InventoryNumber}" Header="Номер" Width="80" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding Items.Name}" Header="Название" Width="250" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding Items.Count}" Header="Количество" Width="130" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding Items.Description}" Header="Описание" Width="575" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding Items.ItemsPlaces.Places.Address}" Header="Адрес" Width="300"/>
+                <DataGridTextColumn Binding="{Binding Items.Condition}" Header="Состояние" Width="200" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding Items.IsWrittenOf}" Header="Списано" Width="100" IsReadOnly="True"/>
+            </DataGrid.Columns>
+        </DataGrid>
+        <TextBox x:Name="SearchField" HorizontalAlignment="Center" TextWrapping="Wrap" Text="Поиск" VerticalAlignment="Top" Width="1674" Height="25" FontSize="20" 
+            Foreground="#FF675B5B" PreviewMouseLeftButtonUp="SearchPreviewMouseLeftButtonUp" LostFocus="SearchLostFocus" TextChanged="SearchTextChanged" Margin="0,304,0,0"/>
+        <Button Content="Изменить" Margin="830,797,830,0" Height="39" Width="140" FontSize="25" VerticalAlignment="Top" Click="ChangeButtonClick"/>
+    </Grid>
+</Window>

+ 77 - 0
MiAPOPractice/ElementsWindows/PersonWindow.xaml.cs

@@ -0,0 +1,77 @@
+using MiAPOPractice.AddWindow;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+
+namespace MiAPOPractice.ElementsWindows
+{
+    /// <summary>
+    /// Логика взаимодействия для PersonWindow.xaml
+    /// </summary>
+    public partial class PersonWindow : Window
+    {
+        Persons person;
+
+        public PersonWindow(int IDPerson)
+        {
+            InitializeComponent();
+
+            //ItemsGrid.ItemsSource = Connection.db.ItemsPersons.Where(item => item.Person.ID == IDPerson).ToList();
+
+            person = Connection.db.Persons.Where(item => item.ID == IDPerson).FirstOrDefault();
+
+            FIO.Content = person.FIO;
+            PhoneNumber.Content = person.PhoneNumber;
+        }
+
+        private void BackButtonClick(object sender, RoutedEventArgs e)
+        {
+            MainWindow mw = new MainWindow();
+            mw.Show();
+            this.Close();
+        }
+
+        private void SearchPreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+        {
+            #region Поиск
+            if (SearchField.Text == "Поиск")
+                SearchField.Text = "";
+        }
+
+        private void SearchLostFocus(object sender, RoutedEventArgs e)
+        {
+            if (SearchField.Text == "")
+                SearchField.Text = "Поиск";
+        }
+
+        private void SearchTextChanged(object sender, TextChangedEventArgs e)
+        {
+            //if (SearchField.Text != "" && SearchField.Text != "Поиск")
+            //{
+            //    ItemsGrid.ItemsSource = Connection.db.PlayersList.Where(item => (item.Players.Persons.FirstName + " " + item.Players.Persons.SecondName + " "
+            //                            + item.Players.Persons.MiddleName + " " + item.Players.Nickname + " " + item.Teams.Name).Contains(SearchField.Text)).ToList();
+            //}
+            //else if (SearchField.Text == "" || SearchField.Text == "Поиск")
+            //{
+            //    Connection.db.PlayersList.ToList();
+            //}
+            #endregion
+        }
+
+        private void ItemMouseDoubleClick(object sender, MouseButtonEventArgs e)
+        {
+            int id = ((Items)ItemsGrid.SelectedItem).ID;
+            ItemWindow itemsWindow = new ItemWindow(id);
+            itemsWindow.Show();
+            this.Hide();
+        }
+
+        private void ChangeButtonClick(object sender, RoutedEventArgs e)
+        {
+            AddPersonWindow addPersonWindow = new AddPersonWindow(person.ID);
+            addPersonWindow.Show();
+            this.Close();
+        }
+    }
+}

+ 32 - 0
MiAPOPractice/ListWindows/ItemsListWindow.xaml

@@ -0,0 +1,32 @@
+<Window x:Class="MiAPOPractice.ItemsListWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:MiAPOPractice"
+        mc:Ignorable="d"
+        Title="Список предметов" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" WindowStyle="SingleBorderWindow" Height="900" Width="1800">
+    <Grid>
+        <Button Name="BackButton"  Content="Назад" HorizontalAlignment="Left" Margin="20,17,0,0" VerticalAlignment="Top" Height="39" Width="140" FontSize="25" Click="BackButtonClick"/>
+        <TextBox Name="SearchField" HorizontalAlignment="Center" Margin="0,99,0,0" TextWrapping="Wrap" Text="Поиск" VerticalAlignment="Top" Width="1674" Height="25" FontSize="20" 
+                 Foreground="#FF675B5B" PreviewMouseLeftButtonUp="SearchPreviewMouseLeftButtonUp" LostFocus="SearchLostFocus" TextChanged="SearchTextChanged"/>
+        <DataGrid Name="ItemsGrid" AutoGenerateColumns="False" Height="600" Margin="0,158,0,0" VerticalAlignment="Top" HorizontalAlignment="Center" 
+                  Width="1674" RowHeaderStyle="{StaticResource RowHeaderStyle}" ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}">
+            <DataGrid.ItemContainerStyle>
+                <Style TargetType="DataGridRow">
+                    <EventSetter Event="MouseDoubleClick" Handler="ItemMouseDoubleClick"/>
+                </Style>
+            </DataGrid.ItemContainerStyle>
+            <DataGrid.Columns>
+                <DataGridTextColumn Binding="{Binding InventoryNumber}" Header="Номер" Width="80" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding Name}" Header="Название" Width="250" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding Count}" Header="Количество" Width="130" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding Description}" Header="Описание" Width="300" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding Items.ItemsPersons.Persons.FIO}" Header="ФИО за кем закреплено" Width="280" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding Items.ItemsPlaces.Places.Address}" Header="Адрес" Width="300"/>
+                <DataGridTextColumn Binding="{Binding Condition}" Header="Состояние" Width="200" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding IsWrittenOf}" Header="Списано" Width="100" IsReadOnly="True"/>
+            </DataGrid.Columns>
+        </DataGrid>
+    </Grid>
+</Window>

+ 59 - 0
MiAPOPractice/ListWindows/ItemsListWindow.xaml.cs

@@ -0,0 +1,59 @@
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+
+namespace MiAPOPractice
+{
+    public partial class ItemsListWindow : Window
+    {
+        public ItemsListWindow()
+        {
+            InitializeComponent();
+
+            //ItemsGrid.ItemsSource = Connection.db.Items.ToList();
+        }
+
+        private void BackButtonClick(object sender, RoutedEventArgs e)
+        {
+            MainWindow mw = new MainWindow();
+            mw.Show();
+            this.Close();
+        }
+
+        private void SearchPreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+        {
+            #region Поиск
+            if (SearchField.Text == "Поиск")
+                SearchField.Text = "";
+        }
+
+        private void SearchLostFocus(object sender, RoutedEventArgs e)
+        {
+            if (SearchField.Text == "")
+                SearchField.Text = "Поиск";
+        }
+
+        private void SearchTextChanged(object sender, TextChangedEventArgs e)
+        {
+            //if (SearchField.Text != "" && SearchField.Text != "Поиск")
+            //{
+            //    ItemsGrid.ItemsSource = Connection.db.PlayersList.Where(item => (item.Players.Persons.FirstName + " " + item.Players.Persons.SecondName + " "
+            //                            + item.Players.Persons.MiddleName + " " + item.Players.Nickname + " " + item.Teams.Name).Contains(SearchField.Text)).ToList();
+            //}
+            //else if (SearchField.Text == "" || SearchField.Text == "Поиск")
+            //{
+            //    Connection.db.PlayersList.ToList();
+            //}
+            #endregion
+        }
+
+        private void ItemMouseDoubleClick(object sender, MouseButtonEventArgs e)
+        {
+            //int id = ((Games)GamesList.SelectedItem).ID;
+            //GameWindow gw = new GameWindow(id);
+            //gw.Show();
+            //this.Hide();
+        }
+    }
+}

+ 26 - 0
MiAPOPractice/ListWindows/PersonsListWindow.xaml

@@ -0,0 +1,26 @@
+<Window x:Class="MiAPOPractice.PersonsListWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:MiAPOPractice"
+        mc:Ignorable="d"
+        Title="Список людей" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" WindowStyle="SingleBorderWindow" Height="900" Width="1800">
+    <Grid>
+        <Button x:Name="BackButton"  Content="Назад" HorizontalAlignment="Left" Margin="20,17,0,0" VerticalAlignment="Top" Height="39" Width="140" FontSize="25" Click="BackButtonClick"/>
+        <TextBox x:Name="SearchField" HorizontalAlignment="Center" Margin="0,99,0,0" TextWrapping="Wrap" Text="Поиск" VerticalAlignment="Top" Width="1674" Height="25" FontSize="20" 
+            Foreground="#FF675B5B" PreviewMouseLeftButtonUp="SearchPreviewMouseLeftButtonUp" LostFocus="SearchLostFocus" TextChanged="SearchTextChanged"/>
+        <DataGrid x:Name="PersonsGrid" AutoGenerateColumns="False" Height="600" Margin="0,158,0,0" VerticalAlignment="Top" HorizontalAlignment="Center" 
+            Width="1674" RowHeaderStyle="{StaticResource RowHeaderStyle}" ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}">
+            <DataGrid.ItemContainerStyle>
+                <Style TargetType="{x:Type DataGridRow}">
+                    <EventSetter Event="Control.MouseDoubleClick" Handler="PersonMouseDoubleClick"/>
+                </Style>
+            </DataGrid.ItemContainerStyle>
+            <DataGrid.Columns>
+                <DataGridTextColumn Binding="{Binding FIO}" Header="Фамилия Имя Отчество" Width="1300" IsReadOnly="True"/>
+                <DataGridTextColumn Binding="{Binding PhoneNumber}" Header="Номер телефона" Width="350" IsReadOnly="True"/>
+            </DataGrid.Columns>
+        </DataGrid>
+    </Grid>
+</Window>

+ 62 - 0
MiAPOPractice/ListWindows/PersonsListWindow.xaml.cs

@@ -0,0 +1,62 @@
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+
+namespace MiAPOPractice
+{
+    /// <summary>
+    /// Логика взаимодействия для PersonsListWindow.xaml
+    /// </summary>
+    public partial class PersonsListWindow : Window
+    {
+        public PersonsListWindow()
+        {
+            InitializeComponent();
+
+            //PersonsGrid.ItemsSource = Connection.db.Persons.ToList();
+        }
+
+        private void BackButtonClick(object sender, RoutedEventArgs e)
+        {
+            MainWindow mw = new MainWindow();
+            mw.Show();
+            this.Close();
+        }
+
+        private void SearchPreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+        {
+            #region Поиск
+            if (SearchField.Text == "Поиск")
+                SearchField.Text = "";
+        }
+
+        private void SearchLostFocus(object sender, RoutedEventArgs e)
+        {
+            if (SearchField.Text == "")
+                SearchField.Text = "Поиск";
+        }
+
+        private void SearchTextChanged(object sender, TextChangedEventArgs e)
+        {
+            //if (SearchField.Text != "" && SearchField.Text != "Поиск")
+            //{
+            //    PersonsGrid.ItemsSource = Connection.db.PlayersList.Where(item => (item.Players.Persons.FirstName + " " + item.Players.Persons.SecondName + " "
+            //                            + item.Players.Persons.MiddleName + " " + item.Players.Nickname + " " + item.Teams.Name).Contains(SearchField.Text)).ToList();
+            //}
+            //else if (SearchField.Text == "" || SearchField.Text == "Поиск")
+            //{
+            //    Connection.db.PlayersList.ToList();
+            //}
+            #endregion
+        }
+
+        private void PersonMouseDoubleClick(object sender, MouseButtonEventArgs e)
+        {
+            //int id = ((Games)GamesList.SelectedItem).ID;
+            //GameWindow gw = new GameWindow(id);
+            //gw.Show();
+            //this.Hide();
+        }
+    }
+}

+ 13 - 0
MiAPOPractice/MainWindow.xaml

@@ -0,0 +1,13 @@
+<Window x:Class="MiAPOPractice.MainWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:MiAPOPractice"
+        mc:Ignorable="d"
+        Title="Учет" Height="407" Width="287" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" WindowStyle="SingleBorderWindow" >
+    <Grid>
+        <Button Name="ItemsButton" Content="Предметы" HorizontalAlignment="Center" Margin="0,130,0,0" FontSize="25" VerticalAlignment="Top" Height="39" Width="140" Click="ItemsClick"/>
+        <Button Name="PersonsButton" Content="Люди" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="25" Height="39" Width="140" Margin="0,204,0,0" Click="PersonsClick"/>
+    </Grid>
+</Window>

+ 29 - 0
MiAPOPractice/MainWindow.xaml.cs

@@ -0,0 +1,29 @@
+using System.Windows;
+
+namespace MiAPOPractice
+{
+    /// <summary>
+    /// Логика взаимодействия для MainWindow.xaml
+    /// </summary>
+    public partial class MainWindow : Window
+    {
+        public MainWindow()
+        {
+            InitializeComponent();
+        }
+
+        private void ItemsClick(object sender, RoutedEventArgs e)
+        {
+            ItemsListWindow itemsListWindow = new ItemsListWindow();
+            itemsListWindow.Show();
+            Close();
+        }
+
+        private void PersonsClick(object sender, RoutedEventArgs e)
+        {
+            PersonsListWindow personsListWindow = new PersonsListWindow();
+            personsListWindow.Show();
+            Close();
+        }
+    }
+}

+ 146 - 0
MiAPOPractice/MiAPOPractice.csproj

@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{CCC6206C-56DD-4B47-A53A-219AE64AD48E}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>MiAPOPractice</RootNamespace>
+    <AssemblyName>MiAPOPractice</AssemblyName>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </ApplicationDefinition>
+    <Page Include="AddWindow\AddItemWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="AddWindow\AddPersonWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="ElementsWindows\ItemWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="ElementsWindows\PersonWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="ListWindows\ItemsListWindow.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="AddWindow\AddItemWindow.xaml.cs">
+      <DependentUpon>AddItemWindow.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="AddWindow\AddPersonWindow.xaml.cs">
+      <DependentUpon>AddPersonWindow.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Connection.cs" />
+    <Compile Include="ElementsWindows\ItemWindow.xaml.cs">
+      <DependentUpon>ItemWindow.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="ElementsWindows\PersonWindow.xaml.cs">
+      <DependentUpon>PersonWindow.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="ListWindows\ItemsListWindow.xaml.cs">
+      <DependentUpon>ItemsListWindow.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Page Include="MainWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="ListWindows\PersonsListWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Styles.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="MainWindow.xaml.cs">
+      <DependentUpon>MainWindow.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="ListWindows\PersonsListWindow.xaml.cs">
+      <DependentUpon>PersonsListWindow.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 55 - 0
MiAPOPractice/Properties/AssemblyInfo.cs

@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// Общие сведения об этой сборке предоставляются следующим набором
+// набор атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
+// связанные со сборкой.
+[assembly: AssemblyTitle("MiAPOPractice")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MiAPOPractice")]
+[assembly: AssemblyCopyright("Copyright ©  2022")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
+// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
+// из модели COM, установите атрибут ComVisible для этого типа в значение true.
+[assembly: ComVisible(false)]
+
+//Чтобы начать создание локализуемых приложений, задайте
+//<UICulture>CultureYouAreCodingWith</UICulture> в файле .csproj
+//в <PropertyGroup>. Например, при использовании английского (США)
+//в своих исходных файлах установите <UICulture> в en-US.  Затем отмените преобразование в комментарий
+//атрибута NeutralResourceLanguage ниже.  Обновите "en-US" в
+//строка внизу для обеспечения соответствия настройки UICulture в файле проекта.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+    ResourceDictionaryLocation.None, //где расположены словари ресурсов по конкретным тематикам
+                                     //(используется, если ресурс не найден на странице,
+                                     // или в словарях ресурсов приложения)
+    ResourceDictionaryLocation.SourceAssembly //где расположен словарь универсальных ресурсов
+                                              //(используется, если ресурс не найден на странице,
+                                              // в приложении или в каких-либо словарях ресурсов для конкретной темы)
+)]
+
+
+// Сведения о версии для сборки включают четыре следующих значения:
+//
+//      Основной номер версии
+//      Дополнительный номер версии
+//      Номер сборки
+//      Номер редакции
+//
+// Можно задать все значения или принять номера сборки и редакции по умолчанию 
+// используя "*", как показано ниже:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
MiAPOPractice/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код был создан программным средством.
+//     Версия среды выполнения: 4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если
+//     код создан повторно.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace MiAPOPractice.Properties
+{
+
+
+    /// <summary>
+    ///   Класс ресурсов со строгим типом для поиска локализованных строк и пр.
+    /// </summary>
+    // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder
+    // класс с помощью таких средств, как ResGen или Visual Studio.
+    // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen
+    // с параметром /str или заново постройте свой VS-проект.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+        /// <summary>
+        ///   Возврат кэшированного экземпляра ResourceManager, используемого этим классом.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MiAPOPractice.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   Переопределяет свойство CurrentUICulture текущего потока для всех
+        ///   подстановки ресурсов с помощью этого класса ресурсов со строгим типом.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}

+ 117 - 0
MiAPOPractice/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 30 - 0
MiAPOPractice/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace MiAPOPractice.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
MiAPOPractice/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 134 - 0
MiAPOPractice/Styles.xaml

@@ -0,0 +1,134 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    xmlns:local="clr-namespace:MiAPOPractice">
+    <!--#region Оформление окна-->
+    <Style TargetType="Grid">
+        <Setter Property="Background">
+            <Setter.Value>
+                <RadialGradientBrush MappingMode="RelativeToBoundingBox" GradientOrigin="0.9,0.2" Center="0.5,0.5" RadiusX="0.7" RadiusY="0.7">
+                    <GradientStop Color="#FF1B1B15" Offset="1"/>
+                    <GradientStop Color="#FF142F2C"/>
+                </RadialGradientBrush>
+            </Setter.Value>
+        </Setter>
+    </Style>
+    <!--#endregion-->
+
+    <!--#region Стиль кнопок-->
+    <Style TargetType="Button">
+        <!--Текст-->
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="Button">
+                    <Grid Background="{TemplateBinding Background}">
+                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                    </Grid>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+
+        <!--Цвет-->
+        <Setter Property="Background">
+            <Setter.Value>
+                <RadialGradientBrush MappingMode="RelativeToBoundingBox" GradientOrigin="0.5,0.5" Center="0.5,0.5" RadiusX="0" RadiusY="0">
+                    <GradientStop Color="#787d7c" Offset="0"/>
+                    <GradientStop Color="#4f5856" Offset="1"/>
+                </RadialGradientBrush>
+            </Setter.Value>
+        </Setter>
+
+        <!--Тень-->
+        <Setter Property="Effect">
+            <Setter.Value>
+                <DropShadowEffect/>
+            </Setter.Value>
+        </Setter>
+
+        <!--Скруглённые углы-->
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="Button">
+                    <Border Name="Border" CornerRadius="15" Background="#787d7c" BorderBrush="Black">
+                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                    </Border>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+        <Setter Property="Background" Value="{Binding ElementName=Border}"/>
+
+        <!--Анимации-->
+        <Style.Triggers>
+            <!--Смена цвета при наведении (пишет, что GradientStops не поддерживается в проекте WPF, хотя на метаните нормально через него работают)-->
+            <!--<EventTrigger RoutedEvent="Button.MouseEnter">
+                <EventTrigger.Actions>
+                    <BeginStoryboard>
+                        <Storyboard Duration="0:0:1" SpeedRatio="3" FillBehavior="Stop">
+                            <ColorAnimation Storyboard.TargetProperty="(Button.Background).(GradientStops[1].Color)" To="#FF409E8E"/>
+                        </Storyboard>
+                    </BeginStoryboard>
+                </EventTrigger.Actions>
+            </EventTrigger>-->
+
+            <!--Обратная смена при убирании-->
+            <!--<EventTrigger RoutedEvent="Button.MouseLeave">
+                <EventTrigger.Actions>
+                    <BeginStoryboard>
+                        <Storyboard Duration="0:0:1" SpeedRatio="3" FillBehavior="HoldEnd">
+                            <ColorAnimation Storyboard.TargetProperty="Background.GradientStops[1].Color" To="#FF01A288"/>
+                        </Storyboard>
+                    </BeginStoryboard>
+                </EventTrigger.Actions>
+            </EventTrigger>-->
+
+            <!--Анимация при нажатии-->
+            <EventTrigger RoutedEvent="Button.PreviewMouseLeftButtonDown">
+                <EventTrigger.Actions>
+                    <BeginStoryboard>
+                        <Storyboard Duration="0:0:1" SpeedRatio="3" FillBehavior="HoldEnd">
+                            <!--<DoubleAnimation Storyboard.TargetProperty="Background.RadiusX" To="1.0"/>
+                            <DoubleAnimation Storyboard.TargetProperty="Background.RadiusY" To="1.0"/>-->
+                            <DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="0"/>
+                        </Storyboard>
+                    </BeginStoryboard>
+                </EventTrigger.Actions>
+            </EventTrigger>
+
+            <!--Анимация при отпускании-->
+            <EventTrigger RoutedEvent="PreviewMouseLeftButtonUp">
+                <EventTrigger.Actions>
+                    <BeginStoryboard>
+                        <Storyboard Duration="0:0:1" SpeedRatio="3" FillBehavior="HoldEnd">
+                            <!--<DoubleAnimation Storyboard.TargetProperty="Background.RadiusX" To="0"/>
+                            <DoubleAnimation Storyboard.TargetProperty="Background.RadiusY" To="0"/>-->
+                            <DoubleAnimation Storyboard.TargetProperty="Effect.Opacity" To="1"/>
+                        </Storyboard>
+                    </BeginStoryboard>
+                </EventTrigger.Actions>
+            </EventTrigger>
+        </Style.Triggers>
+    </Style>
+    <!--#endregion-->
+
+    <!--#region Оформление датагрида-->
+    <!--Поля-->
+    <Style TargetType="DataGrid">
+        <Setter Property="FontSize" Value="20"/>
+        <Setter Property="Foreground" Value="White"/>
+        <Setter Property="RowBackground" Value="Transparent"/>
+        <Setter Property="BorderBrush" Value="Transparent"/>
+        <Setter Property="Background" Value="Transparent"/>
+    </Style>
+
+    <!--Заголовки столбцов-->
+    <Style x:Key="ColumnHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="FontWeight" Value="Bold"/>
+    </Style>
+
+    <!--Заголовки строк-->
+    <Style x:Key="RowHeaderStyle" TargetType="{x:Type DataGridRowHeader}">
+        <Setter Property="Background" Value="Transparent" />
+    </Style>
+    <!--#endregion-->
+
+</ResourceDictionary>