-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathImportWindow.xaml
233 lines (176 loc) · 7.04 KB
/
ImportWindow.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
<Window x:Class="IPAM_NOTE.ImportWindow"
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:IPAM_NOTE"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
Background="{DynamicResource MaterialDesignDarkBackground}"
Foreground="{DynamicResource MaterialDesignDarkForeground}"
TextElement.FontWeight="Medium"
TextElement.FontSize="14"
FontFamily="SimHei"
ResizeMode="NoResize"
mc:Ignorable="d"
Title="网段数据导出导入向导"
Style="{DynamicResource MaterialDesignWindow}"
Height="300"
Width="600"
WindowStartupLocation="CenterScreen"
Loaded="ImportWindow_OnLoaded"
Closing="ImportWindow_OnClosing"
>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel
Orientation="Vertical"
Grid.Column="0"
VerticalAlignment="Center"
>
<StackPanel
Margin="5"
Orientation="Horizontal"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
materialDesign:HintAssist.Hint="需要导入的CSV数据"
>
<materialDesign:PackIcon
Kind="Target"
VerticalAlignment="Center"
Height="32"
Width="32"
/>
<ComboBox
MaxDropDownHeight="300"
x:Name="NetworkComboBox"
Margin="5"
Width="340"
materialDesign:HintAssist.Hint="选择要导入的数据的网段"
materialDesign:TextFieldAssist.HasClearButton="True"
ItemsSource="{Binding ShortStringList}"
Style="{StaticResource MaterialDesignOutlinedComboBox}">
</ComboBox>
<Button
x:Name="ExportButton"
Margin="5"
Height="50"
Width="160"
Style="{StaticResource MaterialDesignOutlinedButton}"
ToolTip="导出数据模板"
Click="ExportButton_OnClick"
materialDesign:ButtonAssist.CornerRadius="5"
>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" >
<materialDesign:PackIcon
Kind="TableExport"
VerticalAlignment="Center"
Height="32"
Width="32"
/>
<TextBlock
VerticalAlignment="Center"
>导出模板</TextBlock>
</StackPanel>
</Button>
</StackPanel>
<StackPanel
Margin="5"
Orientation="Horizontal"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
materialDesign:HintAssist.Hint="选择需要导入的CSV数据"
>
<materialDesign:PackIcon
Kind="FileImport"
VerticalAlignment="Center"
Height="32"
Width="32"
/>
<TextBox
Width="340"
x:Name="SourceData"
Margin="5"
Text=""
MaxHeight="55"
VerticalAlignment="Top"
AcceptsReturn="False"
Style="{StaticResource MaterialDesignOutlinedTextBox}"
TextWrapping="NoWrap"
/>
<Button
x:Name="BrowseButton"
Margin="5"
Height="50"
Width="160"
Style="{StaticResource MaterialDesignOutlinedButton}"
ToolTip="保存"
Click="BrowseButton_OnClick"
materialDesign:ButtonAssist.CornerRadius="5"
>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" >
<materialDesign:PackIcon
Kind="Search"
VerticalAlignment="Center"
Height="32"
Width="32"
/>
<TextBlock
VerticalAlignment="Center"
>浏览文件</TextBlock>
</StackPanel>
</Button>
</StackPanel>
<StackPanel
Margin="5"
Orientation="Horizontal"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
materialDesign:HintAssist.Hint="网段备注"
>
<materialDesign:PackIcon
Kind="ListStatus"
VerticalAlignment="Center"
Height="32"
Width="32"
/>
<ProgressBar
x:Name="ProgressBar"
Margin="5"
Width="340"
Height="20"
/>
<Button
x:Name="ImportButton"
Margin="5"
Height="50"
Width="160"
Style="{StaticResource MaterialDesignOutlinedButton}"
ToolTip="保存"
Click="ImportButton_OnClick"
materialDesign:ButtonAssist.CornerRadius="5"
>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" >
<materialDesign:PackIcon
Kind="Import"
VerticalAlignment="Center"
Height="32"
Width="32"
/>
<TextBlock
VerticalAlignment="Center"
>导入数据</TextBlock>
</StackPanel>
</Button>
</StackPanel>
</StackPanel>
<StackPanel
Orientation="Vertical"
Grid.Column="1"
VerticalAlignment="Center"
HorizontalAlignment="Left"
>
</StackPanel>
</Grid>
</Window>