-
Notifications
You must be signed in to change notification settings - Fork 1
/
Page0.xaml
344 lines (302 loc) · 18.6 KB
/
Page0.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<Page x:Class="FirstPages.Page0"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FirstPages"
xmlns:usrCtrl="clr-namespace:UsrControl;assembly=UsrControl"
xmlns:dd="clr-namespace:FirstPages.Properties"
mc:Ignorable="d"
d:DesignHeight="560" d:DesignWidth="800"
Title="Page0">
<Page.Resources>
<Color x:Key="ButtonCheckedColor">#67CEFF</Color>
<Color x:Key="ButtonMouseEnterColor">#89D8FF</Color>
<Color x:Key="LeftPnlBgColor">#F7F7F7</Color>
<Style TargetType="{x:Type ListBox}" x:Key="SearchResultBoxStyle">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
</Style>
<Style TargetType="{x:Type ListBoxItem}" x:Key="ListItemStyle">
<Setter Property="Height" Value="30"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="Foreground" Value="#5D5D5D"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border Background="{TemplateBinding Background}">
<ContentPresenter Margin="12 0 0 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="#007ACC" />
<Setter Property="Foreground" Value="#F1F1F1" />
</Trigger.Setters>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="true"/>
<Condition Property="IsSelected" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="Foreground" Value="#F1F1F1" />
<Setter Property="Background" Value="#56B8FF" />
</MultiTrigger>
</Style.Triggers>
</Style>
</Page.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition Width="4*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Height="558" VerticalAlignment="Bottom">
<Grid.Background>
<SolidColorBrush Color="{StaticResource LeftPnlBgColor}"/>
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<TextBox Style="{DynamicResource txtBoxStyle}"
TextChanged="TextBox_TextChanged"
MouseEnter="TextBox_MouseEnter"
MouseLeave="TextBox_MouseLeave" LostFocus="txtBox_LostFocus"
PreviewKeyDown="TextBox_PreviewKeyDown" x:Name="txtBox"/>
<ListBox Style="{StaticResource SearchResultBoxStyle}" x:Name="listBox" Visibility="Collapsed"/>
<TextBox Width="0" x:Name="HiddenTextBox"/>
</StackPanel>
<!--<Grid Grid.Row="1">
<Grid.Background>
<SolidColorBrush Color="White"/>
</Grid.Background>
</Grid>-->
</Grid>
<Grid Grid.Column="1">
<Grid.Background>
<SolidColorBrush Color="White"/>
</Grid.Background>
<Grid Style="{DynamicResource gridPnlStyle}" Width="350" Height="520">
<Grid.Effect>
<DropShadowEffect ShadowDepth="-4" BlurRadius="5" Color="LightGray"/>
</Grid.Effect>
<Grid Width="300">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<Grid>
<TextBlock HorizontalAlignment="Center"
Margin="0 10 0 0" Text="处方"
FontSize="18" FontWeight="Bold" />
</Grid>
<StackPanel Orientation="Horizontal" Margin="0 12 0 5">
<TextBlock Text="姓名" FontSize="11" FontWeight="Bold"
VerticalAlignment="Center"/>
<usrCtrl:InforLabel x:Name="ucName" Text="张三" FontSize="14" MaxWidth="100" MaxHeight="50"/>
<TextBlock Text="性别" FontFamily="黑体" FontSize="12" FontWeight="Bold"
VerticalAlignment="Center" Margin="20 0 5 0"/>
<ComboBox x:Name="cmbSex" SelectedIndex="0" Style="{DynamicResource comboBoxStyle}">
<ComboBoxItem Content="男"/>
<ComboBoxItem Content="女"/>
<ComboBox.Resources>
<Style TargetType="ComboBox" x:Key="comboBoxStyle">
<Setter Property="Width" Value="45"/>
<Setter Property="Height" Value="25"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style TargetType="ComboBoxItem" >
<Setter Property="Height" Value="20"/>
</Style>
</ComboBox.Resources>
</ComboBox>
<TextBlock Text="年龄" FontFamily="黑体" FontSize="12" FontWeight="Bold"
VerticalAlignment="Center" Margin="20 0 0 0"/>
<usrCtrl:InforLabel x:Name="ucAge" Text="20" FontSize="14" MaxHeight="25" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="诊断" FontSize="11" FontWeight="Bold"
VerticalAlignment="Center"/>
<usrCtrl:InforLabel x:Name="ucDiagnosis_desc" Text="脾胃失调" FontSize="14" />
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="1" x:Name="stackPnlList">
<Border BorderBrush="Black" BorderThickness="1" Margin="0 5 0 5" />
<TextBlock Text="用药" FontSize="11" FontWeight="Bold"
VerticalAlignment="Center" Margin="0 5 0 12"/>
<ScrollViewer Height="300"
ScrollViewer.VerticalScrollBarVisibility="Hidden"
CanContentScroll="True">
<WrapPanel Grid.Column="0" HorizontalAlignment="Left"
Style="{DynamicResource wrapPnlStyle}" x:Name="wrapPnl" />
</ScrollViewer>
</StackPanel>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!--计价计量-->
<usrCtrl:TotalInfor x:Name="totalInfor" Count="0" Costs="0" />
<StackPanel Grid.Column="2" VerticalAlignment="Center">
<TextBlock x:Name="txtDoctorName" Text="李四" FontSize="12" FontWeight="Bold"
VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0 4 0 3"/>
<TextBlock Text="2018-6-25" FontSize="11" x:Name="txtDateTime"
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0"/>
</StackPanel>
</Grid>
</Grid>
</Grid>
<Grid.Resources>
<Style x:Key="gridPnlStyle" TargetType="Grid">
<Setter Property="Margin" Value="0 1 0 0"/>
<Setter Property="Background" Value="White"/>
</Style>
<Style x:Key="wrapPnlStyle" TargetType="WrapPanel">
<Setter Property="Margin" Value="22 0 0 5"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="MinHeight" Value="60"/>
<Setter Property="MaxWidth" Value="300"/>
<Setter Property="Orientation" Value="Horizontal"/>
</Style>
</Grid.Resources>
</Grid>
<Grid Grid.Column="2">
<Grid.Background>
<SolidColorBrush Color="White"/>
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
<Button Grid.Row="1" Click="menuPop_Click" x:Name="btnPop" Style="{DynamicResource btnManagement}">
<Button.Content>
<Viewbox Width="13">
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="Document" Width="571.057" Height="497.05" Clip="F1 M 0,0L 571.057,0L 571.057,497.05L 0,497.05L 0,0" UseLayoutRounding="False">
<Canvas x:Name="Layer_1" Width="100.01" Height="50.005" Canvas.Left="0" Canvas.Top="0">
<Rectangle x:Name="Rectangle" Width="571.057" Height="28.0027" Canvas.Left="0" Canvas.Top="230.393" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF000000" Fill="#FF000000"/>
<Path x:Name="Path" Width="44.0501" Height="497.05" Canvas.Left="272.239" Canvas.Top="-6.10352e-005" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF000000" Fill="DimGray" Data="F1 M 312.327,496.55L 315.789,0.776428L 276.201,0.499939L 272.739,496.273L 312.327,496.55 Z "/>
</Canvas>
</Canvas>
</Viewbox>
</Button.Content>
</Button>
</Grid>
<Popup x:Name="Pop" VerticalOffset="-5" HorizontalOffset="-30" PopupAnimation="Scroll" Width="100" PlacementTarget="{Binding ElementName=btnPop}" Placement="Top" AllowsTransparency="True" StaysOpen="False">
<Border Background="Transparent" CornerRadius="5" BorderBrush="#F0F0F0" BorderThickness="1">
<StackPanel>
<Button Content="保存" x:Name="btnSave" Click="popBtn_Click" Style="{DynamicResource popManagement}" />
<Button Content="重置" x:Name="btnReset" Click="popBtn_Click" Style="{DynamicResource popManagement}" />
</StackPanel>
</Border>
</Popup>
<Popup x:Name="herbPop" VerticalOffset="-5" HorizontalOffset="-30" PopupAnimation="Scroll" Width="100" Placement="Top" AllowsTransparency="True" StaysOpen="False">
<Border Background="Transparent" CornerRadius="5" BorderBrush="White" BorderThickness="1">
<StackPanel>
<Button Content="删除" x:Name="btnDelete" Click="popBtn_Click" Style="{DynamicResource popManagement}" />
</StackPanel>
</Border>
</Popup>
<Grid.Resources>
<!--弹出菜单-->
<Style x:Key="popManagement" TargetType="Button">
<Setter Property="Background" Value="White" />
<Setter Property="Height" Value="27" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" Value="#F5F5F5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--右下方按钮-->
<Style x:Key="btnManagement" TargetType="Button">
<Setter Property="Margin" Value="0 0 0 10"/>
<Setter Property="Width" Value="40"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border CornerRadius="20" Background="{TemplateBinding Background}" BorderThickness="1" BorderBrush="White">
<Border.Effect>
<DropShadowEffect ShadowDepth="-4" BlurRadius="5" Color="LightGray"/>
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" Value="#F5F5F5" />
<Setter Property="Content">
<Setter.Value>
<Viewbox Width="13">
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="Document" Width="451.556" Height="451.993" Clip="F1 M 0,0L 451.556,0L 451.556,451.993L 0,451.993L 0,0" UseLayoutRounding="False">
<Canvas x:Name="Layer_1" Width="99.9018" Height="49.9992" Canvas.Left="0" Canvas.Top="0">
<Path x:Name="Path" Width="451.556" Height="428.357" Canvas.Left="-3.05176e-005" Canvas.Top="17.0231" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF000000" Fill="#FF000000" Data="F1 M 27.2342,17.5231L 451.056,416.48L 424.322,444.88L 0.499969,45.9235L 27.2342,17.5231 Z "/>
<Path x:Name="Path_0" Width="427.889" Height="451.993" Canvas.Left="8.49246" Canvas.Top="-6.10352e-005" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF000000" Fill="#FF000000" Data="F1 M 8.99246,424.792L 407.449,0.499939L 435.881,27.2007L 37.4244,451.493L 8.99246,424.792 Z "/>
</Canvas>
</Canvas>
</Viewbox>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="txtBoxStyle" TargetType="TextBox">
<Setter Property="Margin" Value="0 0 0 0"/>
<Setter Property="Height" Value="35"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="BorderBrush" Value="#EBEBEC"/>
<Setter Property="Foreground" Value="DimGray"/>
<Setter Property="Text" Value="输入药品拼音简称搜索,如当归,dg"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
<Border.Background>
<SolidColorBrush Color="White"/>
</Border.Background>
<ScrollViewer x:Name="PART_ContentHost"
VerticalAlignment="Center"
Margin="12 0 0 0"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="true">
<Setter Property="BorderBrush" Value="#89D8FF"/>
<Setter Property="BorderThickness" Value="1"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="BorderBrush" Value="#89D8FF"/>
<Setter Property="BorderThickness" Value="1"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Grid.Resources>
</Grid>
</Page>