-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
99 lines (90 loc) · 7.61 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<Window x:Name="Main" x:Class="WomenConsulting.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:WomenConsulting"
mc:Ignorable="d"
Title="Женская консультация" Height="450" Width="800" Closed="Window_Closed" Loaded="Window_Loaded" Icon="Шаблоны/Иконка.png" WindowState="Maximized">
<Grid x:Name="mainGrid">
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="70*"/>
</Grid.RowDefinitions>
<Menu x:Name="BaseMenu" Background="#FF6B71FF" Foreground="White" Padding="10,5,0,5" FontSize="14">
<MenuItem Header="Файл" Foreground="White" Background="#FF6B71FF">
<MenuItem x:Name="NewProtocol" Header="Новый протокол" Click="NewProtocol_Click_1" Background="#FF6B71FF" ></MenuItem>
<MenuItem x:Name="OpenDirectoryDialog" Header="Открыть протокол" Click="OpenDirectoryDialog_Click" Background="#FF6B71FF" ></MenuItem>
<MenuItem x:Name="Save" Header="Сохранить" Click="Save_Click" Background="#FF6B71FF" ></MenuItem>
<MenuItem x:Name="SaveAs" Header="Сохранить как" Background="#FF6B71FF" Click="SaveAs_Click" ></MenuItem>
<MenuItem x:Name="Exit" Header="Выход" Background="#FF6B71FF" Click="Exit_Click" ></MenuItem>
</MenuItem>
<MenuItem x:Name="OpenSettings" Header="Настройки" Background="#FF6B71FF" Click="OpenSettings_Click" ></MenuItem>
</Menu>
<DockPanel Grid.Row="1">
<DockPanel.Resources>
<DataTemplate x:Key="FetusContentTemplate">
<TabControl x:Name="FetuseTabItem" Margin="0,5.6,-0.4,-2" BorderBrush="#FFAEB1FF">
<TabItem x:Name="TabItemSem1" Header="1й триместр" Width="100" BorderBrush="#FFAEB1FF">
<ScrollViewer Background="#FFAEB1FF">
<Frame x:Name="Frame_Trimestr1" NavigationUIVisibility="Hidden" Content="{Binding Path = trimestr1.TrimestrPage,UpdateSourceTrigger=PropertyChanged}">
</Frame>
</ScrollViewer>
</TabItem>
<TabItem x:Name="TabItemSem2" Header="2й триместр" Width="100" Height="30">
<ScrollViewer Background="#FFAEB1FF">
<Frame x:Name="Frame_Trimestr2" Content="{Binding Path = trimestr2.TrimestrPage,UpdateSourceTrigger=PropertyChanged}" NavigationUIVisibility="Hidden">
</Frame>
</ScrollViewer>
</TabItem>
<TabItem x:Name="TabItemSem3" Header="3й триместр" Width="100" Height="30">
<ScrollViewer Background="#FFAEB1FF">
<Frame x:Name="Frame_Trimestr3" Content="{Binding Path = trimestr3.TrimestrPage,UpdateSourceTrigger=PropertyChanged}" NavigationUIVisibility="Hidden">
</Frame>
</ScrollViewer>
</TabItem>
<TabItem x:Name="TabItemMalyeSroki" Header="Малые сроки" Width="100" Height="30">
<ScrollViewer Background="#FFAEB1FF">
<Frame x:Name="Frame_MalyeSroki" Content="{Binding Path = malyeSroki.TrimestrPage,UpdateSourceTrigger=PropertyChanged}" NavigationUIVisibility="Hidden">
</Frame>
</ScrollViewer>
</TabItem>
</TabControl>
</DataTemplate>
<DataTemplate x:Key="FetusHeaderTemplate">
<Label Content="{Binding Path=Name}"/>
</DataTemplate>
</DockPanel.Resources>
<Expander x:Name="generalData" DockPanel.Dock="Top" IsExpanded="True" Header="Общие данные" FontSize="18" FontWeight="Bold" Margin="0,10,0,0" Background="White"
DataContext="{Binding Path=generalSettings}">
<StackPanel x:Name="AddPlod" Margin="0,10,0,0">
<Grid Margin="21,0,0,0">
<Label Content="ФИО" FontWeight="Normal" FontSize="16" HorizontalAlignment="Left"/>
<TextBox x:Name="surnameName" Text="{Binding Path=surnameName}" Margin="50,5,140,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="16" FontWeight="Normal" MinWidth="350"/>
<Label Content=", " FontWeight="Normal" FontSize="16" Margin="5,5,120,0" HorizontalAlignment="Right"/>
<TextBox x:Name="age" Text="{Binding Path=age}" HorizontalAlignment="Right" Margin="5,5,60,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="50" FontSize="16" FontWeight="Normal" PreviewTextInput="onlyDigits_PreviewTextInput"/>
<Label Content="лет" FontWeight="Normal" Margin="5,5,21,0" FontSize="16" HorizontalAlignment="Right"/>
</Grid>
<Grid Margin="21,0,0,0">
<Label Content="Адрес" FontWeight="Normal" FontSize="16"/>
<TextBox x:Name="address" Text="{Binding Path=address}" Margin="65,5,21,0" TextWrapping="Wrap" VerticalAlignment="Top" HorizontalAlignment="Stretch" FontSize="16" FontWeight="Normal" MinWidth="600"/>
</Grid>
<WrapPanel Margin="21,0,0,0">
<Label Content="Дата последней менструации" FontWeight="Normal" FontSize="16"/>
<DatePicker x:Name="dateOfLastMen" SelectedDate="{Binding Path=dateOfLastMen}" HorizontalAlignment="Left" Margin="5,5,0,0" VerticalAlignment="Top" Width="150" FontSize="16" FontWeight="Normal" Text="Выберите дату" Foreground="#FF635E5E" SelectedDateFormat="Long"/>
</WrapPanel>
<WrapPanel Margin="0,7,0,0">
<Label Content="Число плодов:" Margin="21,0,0,0" FontWeight="Normal" FontSize="16"></Label>
<Label x:Name="fetusCount" Content="{Binding Path=fetusCount,UpdateSourceTrigger=PropertyChanged}" Width="194" FontWeight="Normal" FontSize="16" BorderBrush="#FF5C4F4F" Background="#00000000" BorderThickness="1"></Label>
<Button Content="Добавить плод" HorizontalAlignment="Left" Click="AddPlod_Click" Height="28" VerticalAlignment="Center" Margin="10,0,10,5" Padding="20,1" Background="#FFAEB1FF" FontSize="16"/>
<Button x:Name="DeletePlod" Content="Удалить плод" HorizontalAlignment="Left" Click="DeletePlod_Click" Height="28" VerticalAlignment="Center" Margin="0,0,0,5" Padding="20,1" Background="#FFAEB1FF" FontSize="16"/>
</WrapPanel>
</StackPanel>
</Expander>
<TabControl x:Name="Fetuses" ItemsSource="{Binding fetuses, UpdateSourceTrigger=PropertyChanged}" BorderBrush="#FFAEB1FF" DockPanel.Dock="Top"
ItemTemplate="{StaticResource FetusHeaderTemplate}"
ContentTemplate="{StaticResource FetusContentTemplate}" SelectedIndex="0">
</TabControl>
</DockPanel>
</Grid>
</Window>