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
<Page x:Class="FLY.Thick.BlowingScan.UI.Client.PgCustom"
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:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d"
d:DesignHeight="874" d:DesignWidth="905"
Background="WhiteSmoke"
Title="Page_Custom" Loaded="Page_Loaded">
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Control" x:Key="iconPackInSideStyle">
<Setter Property="Width" Value="25"/>
<Setter Property="Height" Value="25"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="Control" x:Key="iconPackOutSideStyle">
<Setter Property="Width" Value="36"/>
<Setter Property="Height" Value="36"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
<Style TargetType="FrameworkElement" x:Key="backPackStyle">
<Setter Property="Width" Value="50"/>
<Setter Property="Height" Value="50"/>
</Style>
<Style TargetType="TextBlock" x:Key="titlePackStyle">
<Setter Property="Margin" Value="2"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style TargetType="Button" x:Key="buttonStyle" BasedOn="{StaticResource ButtonStyle_empty}">
<Setter Property="Margin" Value="20,0"/>
</Style>
</ResourceDictionary>
</Page.Resources>
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="496*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Background="{StaticResource Background_Title}" >
<Button Style="{StaticResource ButtonStyle_back2}" Command="BrowseBack"/>
<TextBlock Style="{StaticResource TextBlockStyle_Title}" Text="客户端设置"/>
</StackPanel>
<ScrollViewer CanContentScroll="True" PanningMode="Both" Grid.Row="1" >
<StackPanel Orientation="Vertical" >
<StackPanel Orientation="Horizontal" >
<Border Background="{StaticResource Color_theme_activity}" Width="150" Margin="0,5,5,5">
<TextBlock Style="{StaticResource TextBlockStyle_ItemHeader}" Text="服务器" />
</Border>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="服务器地址" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding ServerIPEP, Converter={StaticResource ResourceKey=ipepconv}}" Tag="Full" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" >
<Border Width="150" Background="{StaticResource Color_theme_activity}" Margin="0,5,5,5">
<TextBlock Style="{StaticResource TextBlockStyle_ItemHeader}" Text="配置" />
</Border>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal"></StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="虚拟键盘" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" HorizontalAlignment="Left" IsChecked="{Binding HaveOSK}" />
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5" Visibility="{Binding HaveOSK, Converter={StaticResource visbilityconv}}">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="支持鼠标" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" HorizontalAlignment="Left" IsChecked="{Binding HaveOSK_mouse}" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Width="150" Background="{StaticResource Color_theme_activity}" Margin="0,5,5,5">
<TextBlock Style="{StaticResource TextBlockStyle_ItemHeader}" Text="报警提示" />
</Border>
<StackPanel Grid.Column="1">
<GroupBox Style="{x:Null}" Margin="5">
<GroupBox.Header>
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="音乐" VerticalAlignment="Bottom"/>
</GroupBox.Header>
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="持续时间" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="5" MaxWidth="120" HorizontalAlignment="Left"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" >
<Run Text="秒" />
</TextBlock>
</StackPanel>
</StackPanel>
<Button Style="{StaticResource buttonStyle}" Click="button_play_Click" >
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Rectangle Style="{StaticResource backPackStyle}" Fill="{StaticResource Color_theme_activity}"/>
<iconPacks:PackIconMaterial Kind="Play" Style="{StaticResource iconPackInSideStyle}" Foreground="White" />
</Grid>
</Button>
</StackPanel>
<Grid Grid.Column="1">
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="5">
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="音乐文件路径" VerticalAlignment="Bottom"/>
<Button Style="{StaticResource buttonStyle}" Click="button_open_Click" >
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<iconPacks:PackIconMaterial Kind="FolderOpen" Style="{StaticResource iconPackOutSideStyle}" Foreground="{StaticResource Color_theme_activity}"/>
</Grid>
</Button>
</StackPanel>
<Viewbox Height="36" HorizontalAlignment="Left" >
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding WarningTipPath}" />
</Viewbox>
</StackPanel>
</Grid>
</Grid>
</StackPanel>
</GroupBox>
<GroupBox Style="{x:Null}" Margin="5">
<GroupBox.Header>
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="USB继电器" VerticalAlignment="Bottom"/>
</GroupBox.Header>
<StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="使能" />
<ToggleButton Style="{StaticResource ToggleButtonStyle1}" HorizontalAlignment="Left" IsChecked="{Binding EnableLCUS1}" />
</StackPanel>
<StackPanel Margin="5">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="串口地址" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding LCUS1_PortName}" HorizontalAlignment="Left" Tag="Full"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button Style="{StaticResource buttonStyle}" Click="button_bellring_Click" >
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Rectangle Style="{StaticResource backPackStyle}" Fill="{StaticResource Color_theme_activity}"/>
<iconPacks:PackIconMaterial Kind="BellRing" Style="{StaticResource iconPackInSideStyle}" Foreground="White" />
</Grid>
</Button>
<Button Style="{StaticResource buttonStyle}" Click="button_belloff_Click" >
<Grid Style="{StaticResource GridStyle_ButtonShadow}">
<Rectangle Style="{StaticResource backPackStyle}" Fill="{StaticResource Color_theme_noact}"/>
<iconPacks:PackIconMaterial Kind="BellOff" Style="{StaticResource iconPackInSideStyle}" Foreground="White" />
</Grid>
</Button>
</StackPanel>
</StackPanel>
<TextBlock x:Name="textblock_lcus" Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding ErrMsg}" />
</StackPanel>
</GroupBox>
</StackPanel>
</Grid>
<StackPanel Orientation="Horizontal" >
<Border Width="150" Background="{StaticResource Color_theme_activity}" Margin="0,5,5,5">
<TextBlock Style="{StaticResource TextBlockStyle_ItemHeader}" Text="调试" />
</Border>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Button Content="清空bulk" Style="{StaticResource ResourceKey=ButtonStyle2}" Click="button_bulkdata_Click" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</ScrollViewer>
<StackPanel Orientation="Horizontal" Grid.Row="2" FlowDirection="RightToLeft" Margin="0,10,0,10">
<Button Content="应用" Style="{StaticResource ResourceKey=ButtonStyle2}" Click="button_apply_Click" />
</StackPanel>
</Grid>
</Page>