ver 1.0
This commit is contained in:
25
WpfApp1/WpfApp1.sln
Normal file
25
WpfApp1/WpfApp1.sln
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.13.35919.96 d17.13
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApp1", "WpfApp1\WpfApp1.csproj", "{A9E3D24A-31DC-4ECC-B6FA-D61DBF8A1E5A}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{A9E3D24A-31DC-4ECC-B6FA-D61DBF8A1E5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A9E3D24A-31DC-4ECC-B6FA-D61DBF8A1E5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A9E3D24A-31DC-4ECC-B6FA-D61DBF8A1E5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A9E3D24A-31DC-4ECC-B6FA-D61DBF8A1E5A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {3273E183-8FE0-49D1-9B0D-1345CA662794}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
6
WpfApp1/WpfApp1/App.config
Normal file
6
WpfApp1/WpfApp1/App.config
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
79
WpfApp1/WpfApp1/App.xaml
Normal file
79
WpfApp1/WpfApp1/App.xaml
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
<Application x:Class="WpfApp1.App"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:WpfApp1"
|
||||||
|
StartupUri="MainWindow.xaml">
|
||||||
|
<Application.Resources>
|
||||||
|
|
||||||
|
<Style x:Key="MainDarkWindow" TargetType="Window">
|
||||||
|
<Setter Property="Background" Value="#1E1E1E"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="ComboBox">
|
||||||
|
<Setter Property="Background" Value="#1E1E1E"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="ComboBoxItem">
|
||||||
|
<Setter Property="Background" Value="#1E1E1E"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="Button">
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="FontSize" Value="14"/>
|
||||||
|
<Setter Property="Padding" Value="20,10"/>
|
||||||
|
<Setter Property="Margin" Value="5"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border x:Name="border"
|
||||||
|
Background="Orange"
|
||||||
|
BorderBrush="Orange"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="5">
|
||||||
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter TargetName="border" Property="Background" Value="Orange"/>
|
||||||
|
<Setter Property="Foreground" Value="Black"/>
|
||||||
|
<Setter Property="Cursor" Value="Hand"/>
|
||||||
|
</Trigger>
|
||||||
|
|
||||||
|
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter TargetName="border" Property="Background" Value="#FF8C00"/>
|
||||||
|
<Setter TargetName="border" Property="BorderBrush" Value="White"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="TextBox">
|
||||||
|
<Setter Property="Background" Value="#2D2D2D"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="CaretBrush" Value="Orange"/>
|
||||||
|
<Setter Property="SelectionBrush" Value="Orange"/>
|
||||||
|
<Setter Property="BorderBrush" Value="#444444"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Padding" Value="5,3"/>
|
||||||
|
<Setter Property="Margin" Value="5"/>
|
||||||
|
<Setter Property="FontSize" Value="14"/>
|
||||||
|
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsFocused" Value="True">
|
||||||
|
<Setter Property="BorderBrush" Value="Orange"/>
|
||||||
|
<Setter Property="Background" Value="#333333"/>
|
||||||
|
</Trigger>
|
||||||
|
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="BorderBrush" Value="#888888"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</Application.Resources>
|
||||||
|
</Application>
|
||||||
17
WpfApp1/WpfApp1/App.xaml.cs
Normal file
17
WpfApp1/WpfApp1/App.xaml.cs
Normal file
@@ -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 WpfApp1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для App.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
72
WpfApp1/WpfApp1/Client.cs
Normal file
72
WpfApp1/WpfApp1/Client.cs
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace WpfApp1
|
||||||
|
{
|
||||||
|
public class Client
|
||||||
|
{
|
||||||
|
private string Surname;
|
||||||
|
private string Name;
|
||||||
|
private string Patronymic;
|
||||||
|
private string Gender;
|
||||||
|
private DateTime Birthday;
|
||||||
|
private string Address;
|
||||||
|
private string PhoneNumber;
|
||||||
|
private string SubscriptionNumber;
|
||||||
|
|
||||||
|
public string surname
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.Surname;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.Surname = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string name
|
||||||
|
{
|
||||||
|
get { return this.Name; }
|
||||||
|
set { this.Name = value; }
|
||||||
|
}
|
||||||
|
public string patronymic
|
||||||
|
{
|
||||||
|
get { return this.Patronymic; }
|
||||||
|
set { this.Patronymic = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string gender
|
||||||
|
{
|
||||||
|
get { return this.Gender; }
|
||||||
|
set { this.Gender = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public DateTime birthday
|
||||||
|
{
|
||||||
|
get { return this.Birthday; }
|
||||||
|
set { this.Birthday = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string address
|
||||||
|
{
|
||||||
|
get { return this.Address; }
|
||||||
|
set { this.Address = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string phoneNumber
|
||||||
|
{
|
||||||
|
get { return this.PhoneNumber; }
|
||||||
|
set { this.PhoneNumber = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string subscriptionNumber
|
||||||
|
{
|
||||||
|
get { return this.SubscriptionNumber; }
|
||||||
|
set { this.SubscriptionNumber = value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
17
WpfApp1/WpfApp1/Coach.cs
Normal file
17
WpfApp1/WpfApp1/Coach.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace WpfApp1
|
||||||
|
{
|
||||||
|
public class Coach
|
||||||
|
{
|
||||||
|
public string Surname { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Patronymic { get; set; }
|
||||||
|
public string Speciality { get; set; }
|
||||||
|
public Coach() { }
|
||||||
|
}
|
||||||
|
}
|
||||||
20
WpfApp1/WpfApp1/Entry.cs
Normal file
20
WpfApp1/WpfApp1/Entry.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace WpfApp1
|
||||||
|
{
|
||||||
|
public class Entry
|
||||||
|
{
|
||||||
|
public Client Client {get; set;}
|
||||||
|
public Coach Coach {get; set;}
|
||||||
|
public DateTime DateEntry {get; set;}
|
||||||
|
public DateTime TimeRecord {get; set;}
|
||||||
|
public Entry()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
77
WpfApp1/WpfApp1/MainWindow.xaml
Normal file
77
WpfApp1/WpfApp1/MainWindow.xaml
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
<Window x:Class="WpfApp1.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:WpfApp1"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Style="{StaticResource MainDarkWindow}"
|
||||||
|
Title="FitnesCenter" Height="670" Width="800">
|
||||||
|
<Grid>
|
||||||
|
<StackPanel VerticalAlignment="Top" Margin="10">
|
||||||
|
<!-- Блок данных клиента -->
|
||||||
|
<GroupBox Header="Данные клиента" Margin="10" Padding="10" BorderBrush="Orange">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!-- Левая колонка -->
|
||||||
|
<StackPanel Grid.Column="0" Margin="0,0,10,0">
|
||||||
|
<TextBlock Text="Фамилия:" Margin="0,5" />
|
||||||
|
<TextBox x:Name="txtSurname" />
|
||||||
|
|
||||||
|
<TextBlock Text="Имя:" Margin="0,5" />
|
||||||
|
<TextBox x:Name="txtName" />
|
||||||
|
|
||||||
|
<TextBlock Text="Отчество:" Margin="0,5" />
|
||||||
|
<TextBox x:Name="txtPatronymic" />
|
||||||
|
|
||||||
|
<TextBlock Text="Дата рождения:" Margin="0,5" />
|
||||||
|
<DatePicker x:Name="dpBirthday" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Правая колонка -->
|
||||||
|
<StackPanel Grid.Column="1" Margin="10,0,0,0">
|
||||||
|
<TextBlock Text="Фактический адрес:" Margin="0,5" />
|
||||||
|
<TextBox x:Name="txtAddress" />
|
||||||
|
|
||||||
|
<TextBlock Text="Номер абонемента:" Margin="0,5" />
|
||||||
|
<TextBox x:Name="txtSubscription" MaxLength="8" />
|
||||||
|
|
||||||
|
<TextBlock Text="Телефон:" Margin="0,5" />
|
||||||
|
<TextBox x:Name="txtPhone" MaxLength="11" />
|
||||||
|
|
||||||
|
<TextBlock Text="Пол:" Margin="0,5" />
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RadioButton x:Name="rbMale" Content="М" IsChecked="True" Foreground="White" Margin="0,5,15,0" />
|
||||||
|
<RadioButton x:Name="rbFemale" Content="Ж" Foreground="White" Margin="0,5,0,0" />
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
<!-- Блок списка и управления -->
|
||||||
|
<GroupBox Header="Список клиентов" Margin="10" Padding="10" BorderBrush="Orange">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="250" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<StackPanel Grid.Column="0" Margin="0,0,10,0">
|
||||||
|
<ListBox x:Name="ClientListBox" Height="182" SelectionChanged="ClientListBox_SelectionChanged" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Column="1" Margin="10,0,0,0">
|
||||||
|
<Button x:Name="btnEdit" Content="Изменить" Margin="10,5" Height="35" Width="200" HorizontalAlignment="Left" Click="btnEdit_Click" />
|
||||||
|
<Button x:Name="btnAdd" Content="Добавить" Margin="10,5" Height="35" Width="200" HorizontalAlignment="Left" Click="btnAdd_Click" />
|
||||||
|
<Button x:Name="btnRecord" Content="Записать клиента" Margin="10,5" Height="35" Width="200" HorizontalAlignment="Left" Click="btnRecord_Click" />
|
||||||
|
<Button x:Name="btnViewRecords" Content="Посмотреть запись" Margin="10,5" Height="35" Width="200" HorizontalAlignment="Left" Click="btnViewRecords_Click" />
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
152
WpfApp1/WpfApp1/MainWindow.xaml.cs
Normal file
152
WpfApp1/WpfApp1/MainWindow.xaml.cs
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace WpfApp1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для MainWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class MainWindow : Window
|
||||||
|
{
|
||||||
|
private List<Client> _clients = new List<Client>();
|
||||||
|
private const string FilePath = "clients.json";
|
||||||
|
private Client _selectedClient;
|
||||||
|
|
||||||
|
public MainWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
private void SaveData()
|
||||||
|
{
|
||||||
|
string json = JsonSerializer.Serialize(_clients);
|
||||||
|
File.WriteAllText(FilePath, json);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadData()
|
||||||
|
{
|
||||||
|
if (File.Exists(FilePath))
|
||||||
|
{
|
||||||
|
string json = File.ReadAllText(FilePath);
|
||||||
|
_clients = JsonSerializer.Deserialize<List<Client>>(json) ?? new List<Client>();
|
||||||
|
RefreshList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RefreshList()
|
||||||
|
{
|
||||||
|
ClientListBox.ItemsSource = null;
|
||||||
|
ClientListBox.ItemsSource = _clients.Select(c => $"{c.surname} {c.name} {c.patronymic}").ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private bool IsValid()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(txtSurname.Text) || string.IsNullOrWhiteSpace(txtName.Text) ||
|
||||||
|
string.IsNullOrWhiteSpace(txtPhone.Text) || string.IsNullOrWhiteSpace(txtAddress.Text))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Заполните все поля!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dpBirthday.SelectedDate >= DateTime.Now)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Дата рождения должна быть меньше текущей!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Regex.IsMatch(txtSubscription.Text, @"^\d{8}$"))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Номер абонемента должен состоять из 8 цифр!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnAdd_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsValid()) return;
|
||||||
|
|
||||||
|
var newClient = new Client
|
||||||
|
{
|
||||||
|
surname = txtSurname.Text,
|
||||||
|
name = txtName.Text,
|
||||||
|
patronymic = txtPatronymic.Text,
|
||||||
|
address = txtAddress.Text,
|
||||||
|
phoneNumber = txtPhone.Text,
|
||||||
|
subscriptionNumber = txtSubscription.Text,
|
||||||
|
birthday = dpBirthday.SelectedDate ?? DateTime.Now,
|
||||||
|
gender = rbMale.IsChecked == true ? "М" : "Ж"
|
||||||
|
};
|
||||||
|
|
||||||
|
_clients.Add(newClient);
|
||||||
|
SaveData();
|
||||||
|
RefreshList();
|
||||||
|
MessageBox.Show("Клиент добавлен!");
|
||||||
|
}
|
||||||
|
private void ClientListBox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (ClientListBox.SelectedIndex == -1) return;
|
||||||
|
|
||||||
|
_selectedClient = _clients[ClientListBox.SelectedIndex];
|
||||||
|
|
||||||
|
|
||||||
|
txtSurname.Text = _selectedClient.surname;
|
||||||
|
txtName.Text = _selectedClient.name;
|
||||||
|
txtPatronymic.Text = _selectedClient.patronymic;
|
||||||
|
txtAddress.Text = _selectedClient.address;
|
||||||
|
txtPhone.Text = _selectedClient.phoneNumber;
|
||||||
|
txtSubscription.Text = _selectedClient.subscriptionNumber;
|
||||||
|
dpBirthday.SelectedDate = _selectedClient.birthday;
|
||||||
|
|
||||||
|
if (_selectedClient.gender == "М") rbMale.IsChecked = true;
|
||||||
|
else rbFemale.IsChecked = true;
|
||||||
|
|
||||||
|
|
||||||
|
txtSurname.IsEnabled = false;
|
||||||
|
txtName.IsEnabled = false;
|
||||||
|
txtPatronymic.IsEnabled = false;
|
||||||
|
dpBirthday.IsEnabled = false;
|
||||||
|
txtSubscription.IsEnabled = false;
|
||||||
|
}
|
||||||
|
private void btnEdit_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (_selectedClient == null) return;
|
||||||
|
|
||||||
|
// Адрес и Телефон
|
||||||
|
_selectedClient.address = txtAddress.Text;
|
||||||
|
_selectedClient.phoneNumber = txtPhone.Text;
|
||||||
|
|
||||||
|
SaveData();
|
||||||
|
MessageBox.Show("Данные обновлены!");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnRecord_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (_selectedClient == null)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Сначала выберите клиента в списке!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Пример списка тренеров (обычно загружается из файла)
|
||||||
|
List<Coach> coaches = new List<Coach> {
|
||||||
|
new Coach { Surname="Ахматова В.А.", Speciality="Фитнес-ЙОГА" },
|
||||||
|
new Coach { Surname="Петров И.И.", Speciality="Силовой тренинг" }
|
||||||
|
};
|
||||||
|
|
||||||
|
RecordWindow recordWin = new RecordWindow(_selectedClient, coaches);
|
||||||
|
recordWin.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
52
WpfApp1/WpfApp1/Properties/AssemblyInfo.cs
Normal file
52
WpfApp1/WpfApp1/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Resources;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
// Общие сведения об этой сборке предоставляются следующим набором
|
||||||
|
// набор атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
|
||||||
|
// связанные со сборкой.
|
||||||
|
[assembly: AssemblyTitle("WpfApp1")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("HP Inc.")]
|
||||||
|
[assembly: AssemblyProduct("WpfApp1")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © HP Inc. 2026")]
|
||||||
|
[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.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
71
WpfApp1/WpfApp1/Properties/Resources.Designer.cs
generated
Normal file
71
WpfApp1/WpfApp1/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Этот код был создан программным средством.
|
||||||
|
// Версия среды выполнения: 4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если
|
||||||
|
// код создан повторно.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace WpfApp1.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("WpfApp1.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
WpfApp1/WpfApp1/Properties/Resources.resx
Normal file
117
WpfApp1/WpfApp1/Properties/Resources.resx
Normal file
@@ -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
WpfApp1/WpfApp1/Properties/Settings.Designer.cs
generated
Normal file
30
WpfApp1/WpfApp1/Properties/Settings.Designer.cs
generated
Normal file
@@ -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 WpfApp1.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
WpfApp1/WpfApp1/Properties/Settings.settings
Normal file
7
WpfApp1/WpfApp1/Properties/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
28
WpfApp1/WpfApp1/RecordWindow.xaml
Normal file
28
WpfApp1/WpfApp1/RecordWindow.xaml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<Window x:Class="WpfApp1.RecordWindow"
|
||||||
|
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:WpfApp1"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Style="{StaticResource MainDarkWindow}"
|
||||||
|
Title="RecordWindow" Height="450" Width="312">
|
||||||
|
<StackPanel Margin="20">
|
||||||
|
<TextBlock Text="Клиент" Margin="0,5"/>
|
||||||
|
<TextBox x:Name="txtClientName" IsReadOnly="True" Background="#3D3D3D"/>
|
||||||
|
|
||||||
|
<TextBlock Text="Специальность" Margin="0,10,0,5"/>
|
||||||
|
<ComboBox x:Name="cbSpeciality" SelectionChanged="cbSpeciality_SelectionChanged"/>
|
||||||
|
|
||||||
|
<TextBlock Text="Тренер" Margin="0,10,0,5"/>
|
||||||
|
<ComboBox x:Name="cbCoach" DisplayMemberPath="Surname"/>
|
||||||
|
|
||||||
|
<TextBlock Text="Дата" Margin="0,10,0,5"/>
|
||||||
|
<DatePicker x:Name="dpDate"/>
|
||||||
|
|
||||||
|
<TextBlock Text="Время" Margin="0,10,0,5"/>
|
||||||
|
<TextBox x:Name="txtTime" Text="15:00"/>
|
||||||
|
|
||||||
|
<Button Content="Записать" Click="btnSaveRecord_Click" Margin="0,20,0,0" Height="40" Background="Orange" Foreground="Black"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Window>
|
||||||
68
WpfApp1/WpfApp1/RecordWindow.xaml.cs
Normal file
68
WpfApp1/WpfApp1/RecordWindow.xaml.cs
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace WpfApp1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для RecordWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class RecordWindow : Window
|
||||||
|
{
|
||||||
|
private Client _currentClient;
|
||||||
|
private List<Coach> _allCoaches; // Список всех тренеров (загрузи его из файла или создай вручную)
|
||||||
|
|
||||||
|
public RecordWindow(Client client, List<Coach> coaches)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_currentClient = client;
|
||||||
|
_allCoaches = coaches;
|
||||||
|
|
||||||
|
txtClientName.Text = $"{client.surname} {client.name}";
|
||||||
|
|
||||||
|
// Заполняем специальности уникальными значениями
|
||||||
|
cbSpeciality.ItemsSource = _allCoaches.Select(c => c.Speciality).Distinct().ToList();
|
||||||
|
dpDate.SelectedDate = DateTime.Now;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Фильтрация тренеров при выборе специальности
|
||||||
|
private void cbSpeciality_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
string selectedSpec = cbSpeciality.SelectedItem as string;
|
||||||
|
cbCoach.ItemsSource = _allCoaches.Where(c => c.Speciality == selectedSpec).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnSaveRecord_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (cbCoach.SelectedItem == null || dpDate.SelectedDate == null)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Выберите тренера и дату!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Создаем объект записи
|
||||||
|
Entry newEntry = new Entry
|
||||||
|
{
|
||||||
|
Client = _currentClient,
|
||||||
|
Coach = (Coach)cbCoach.SelectedItem,
|
||||||
|
DateEntry = dpDate.SelectedDate.Value,
|
||||||
|
TimeRecord = DateTime.Parse(txtTime.Text) // Упрощенно для примера
|
||||||
|
};
|
||||||
|
|
||||||
|
// Тут добавь логику сохранения Entry в твой глобальный List или файл
|
||||||
|
|
||||||
|
MessageBox.Show("Запись успешно создана!");
|
||||||
|
this.Close(); // Возврат на главную форму
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
146
WpfApp1/WpfApp1/WpfApp1.csproj
Normal file
146
WpfApp1/WpfApp1/WpfApp1.csproj
Normal file
@@ -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>{A9E3D24A-31DC-4ECC-B6FA-D61DBF8A1E5A}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>WpfApp1</RootNamespace>
|
||||||
|
<AssemblyName>WpfApp1</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>
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
|
</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="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.5\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Buffers, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.IO.Pipelines, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.IO.Pipelines.10.0.5\lib\net462\System.IO.Pipelines.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Numerics" />
|
||||||
|
<Reference Include="System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Text.Encodings.Web, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Text.Encodings.Web.10.0.5\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Text.Json, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Text.Json.10.0.5\lib\net462\System.Text.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<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>
|
||||||
|
<Compile Include="RecordWindow.xaml.cs">
|
||||||
|
<DependentUpon>RecordWindow.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Page Include="MainWindow.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Compile Include="App.xaml.cs">
|
||||||
|
<DependentUpon>App.xaml</DependentUpon>
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Client.cs" />
|
||||||
|
<Compile Include="Coach.cs" />
|
||||||
|
<Compile Include="Entry.cs" />
|
||||||
|
<Compile Include="MainWindow.xaml.cs">
|
||||||
|
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Page Include="RecordWindow.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<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="packages.config" />
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Import Project="..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets" Condition="Exists('..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>Данный проект ссылается на пакеты NuGet, отсутствующие на этом компьютере. Используйте восстановление пакетов NuGet, чтобы скачать их. Дополнительную информацию см. по адресу: http://go.microsoft.com/fwlink/?LinkID=322105. Отсутствует следующий файл: {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets'))" />
|
||||||
|
</Target>
|
||||||
|
</Project>
|
||||||
13
WpfApp1/WpfApp1/packages.config
Normal file
13
WpfApp1/WpfApp1/packages.config
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.5" targetFramework="net48" />
|
||||||
|
<package id="System.Buffers" version="4.6.1" targetFramework="net48" />
|
||||||
|
<package id="System.IO.Pipelines" version="10.0.5" targetFramework="net48" />
|
||||||
|
<package id="System.Memory" version="4.6.3" targetFramework="net48" />
|
||||||
|
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net48" />
|
||||||
|
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net48" />
|
||||||
|
<package id="System.Text.Encodings.Web" version="10.0.5" targetFramework="net48" />
|
||||||
|
<package id="System.Text.Json" version="10.0.5" targetFramework="net48" />
|
||||||
|
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net48" />
|
||||||
|
<package id="System.ValueTuple" version="4.6.1" targetFramework="net48" />
|
||||||
|
</packages>
|
||||||
Reference in New Issue
Block a user