智云3.0授权文件生成器新版
liusuyi
2026-08-07 0ae10765f86b83cd6d9f7db818266c62521800cd
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
<Window x:Class="Authorization.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="智云3.0平台授权软件"
        Width="780" Height="560"
        MinWidth="720" MinHeight="520"
        WindowStartupLocation="CenterScreen"
        Icon="ARD.ico"
        Loaded="Window_Loaded"
        Closing="Window_Closing">
 
    <Grid Background="#EDF0F4">
        <Grid.RowDefinitions>
            <RowDefinition Height="52"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="34"/>
        </Grid.RowDefinitions>
 
        <!-- ===== Header ===== -->
        <Border Grid.Row="0" Background="{StaticResource HeaderGradient}">
            <Grid Margin="22,0">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <Border Background="#5C6BC0" CornerRadius="4" Width="28" Height="28"
                            Margin="0,0,12,0">
                        <TextBlock Text="智" Foreground="White" FontSize="16" FontWeight="Bold"
                                   HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Border>
                    <StackPanel>
                        <TextBlock Text="智云3.0 平台授权管理系统" Foreground="White"
                                   FontSize="16" FontWeight="SemiBold"/>
                        <TextBlock Text="Drone Authorization Management" Foreground="#9FA8DA"
                                   FontSize="10"/>
                    </StackPanel>
                </StackPanel>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"
                            VerticalAlignment="Center">
                    <Border Background="#1A237E" CornerRadius="3" Padding="8,2">
                        <TextBlock x:Name="HeaderVersion" Text="v20251008"
                                   Foreground="#9FA8DA" FontSize="10"/>
                    </Border>
                </StackPanel>
            </Grid>
        </Border>
 
        <!-- ===== Server Config ===== -->
        <Border Grid.Row="1" Style="{StaticResource CardBorder}" Margin="16,14,16,0"
                Padding="16,14">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="200"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="120"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
 
                <!-- Section badge -->
                <Border Grid.Column="0" Background="#3949AB" CornerRadius="2" Width="3"
                        Height="18" VerticalAlignment="Center" Margin="0,0,8,0"/>
 
                <TextBlock Grid.Column="1" Text="服务器配置" FontSize="13" FontWeight="SemiBold"
                           Foreground="#263238" VerticalAlignment="Center" Margin="0,0,20,0"/>
 
                <TextBlock Grid.Column="2" Text="接口地址" FontSize="12.5"
                           Foreground="#607D8B" VerticalAlignment="Center" Margin="0,0,6,0"/>
                <TextBox Grid.Column="3" x:Name="HTTPAdress" Text="127.0.0.1"
                         Width="190" Height="30" FontSize="13"/>
 
                <TextBlock Grid.Column="4" Text="端口" FontSize="12.5"
                           Foreground="#607D8B" VerticalAlignment="Center" Margin="16,0,6,0"/>
                <TextBox Grid.Column="5" x:Name="HTTPPort" Text="8888"
                         Width="80" Height="30" FontSize="13"/>
            </Grid>
        </Border>
 
        <!-- ===== Content ===== -->
        <Grid Grid.Row="2" Margin="16,12,16,14">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="14"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
 
            <!-- ===== Left Card: Encrypt ===== -->
            <Border Grid.Column="0" Style="{StaticResource CardBorder}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
 
                    <!-- Title with accent bar -->
                    <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,16">
                        <Border Background="#FF6D00" CornerRadius="2" Width="3" Height="20"
                                VerticalAlignment="Center" Margin="0,0,8,0"/>
                        <TextBlock Text="生成授权" FontSize="16" FontWeight="SemiBold"
                                   Foreground="#1A237E"/>
                    </StackPanel>
 
                    <!-- 授权地点 -->
                    <Grid Grid.Row="1" Margin="0,0,0,12">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="82"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="授权地点" Style="{StaticResource FieldLabel}"/>
                        <TextBox Grid.Column="1" x:Name="txtAdress" Height="30"/>
                    </Grid>
 
                    <!-- 授权期限 -->
                    <Grid Grid.Row="2" Margin="0,0,0,12">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="82"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="授权期限" Style="{StaticResource FieldLabel}"/>
                        <DatePicker Grid.Column="1" x:Name="dateTimePicker" Height="30"
                                    SelectedDateFormat="Short"/>
                        <TextBox Grid.Column="2" x:Name="timeTextBox" Text="00:00:00"
                                 Width="72" Height="30" Margin="6,0,0,0"
                                 ToolTip="时间格式:HH:mm:ss"/>
                    </Grid>
 
                    <!-- 数量配置 -->
                    <Grid Grid.Row="3" Margin="0,0,0,12">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="82"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="数量配置" Style="{StaticResource FieldLabel}"/>
                        <StackPanel Grid.Column="1" Orientation="Horizontal">
                            <TextBlock Text="无人机" VerticalAlignment="Center"
                                       Foreground="#546E7A" FontSize="12.5" Margin="0,0,6,0"/>
                            <TextBox x:Name="txtDroneNum" Text="5" Width="58" Height="30"/>
                            <TextBlock Text="机场" VerticalAlignment="Center"
                                       Foreground="#546E7A" FontSize="12.5"
                                       Margin="18,0,6,0"/>
                            <TextBox x:Name="txtDockNum" Text="3" Width="58" Height="30"/>
                        </StackPanel>
                    </Grid>
 
                    <!-- 机器码 -->
                    <Grid Grid.Row="4" Margin="0,0,0,12">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="82"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="机器码" Style="{StaticResource FieldLabel}"/>
                        <TextBox Grid.Column="1" x:Name="txtJQM" Height="30"/>
                        <Button Grid.Column="2" x:Name="OpenCodeBtn" Content="识别二维码"
                                Width="82" Height="30" Margin="6,0,0,0"
                                Style="{StaticResource SecondaryButton}"
                                Click="OpenCodeBtn_Click"/>
                    </Grid>
 
                    <!-- Separator -->
                    <Rectangle Grid.Row="5" Height="1" Fill="#E0E4E8" Margin="0,4,0,14"/>
 
                    <!-- Generate Button -->
                    <Button Grid.Row="7" x:Name="generateBtn" Content="生 成 授 权"
                            Height="42" Width="200" HorizontalAlignment="Center"
                            Style="{StaticResource AccentButton}"
                            Click="GenerateBtn_Click"/>
                </Grid>
            </Border>
 
            <!-- ===== Right Card: Decrypt ===== -->
            <Border Grid.Column="2" Style="{StaticResource CardBorder}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
 
                    <!-- Title with accent bar -->
                    <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,16">
                        <Border Background="#3949AB" CornerRadius="2" Width="3" Height="20"
                                VerticalAlignment="Center" Margin="0,0,8,0"/>
                        <TextBlock Text="解密授权" FontSize="16" FontWeight="SemiBold"
                                   Foreground="#1A237E"/>
                    </StackPanel>
 
                    <!-- License目录 -->
                    <Grid Grid.Row="1" Margin="0,0,0,12">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="82"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="License目录" Style="{StaticResource FieldLabel}"/>
                        <TextBox Grid.Column="1" x:Name="txtPath" Height="30"
                                 IsReadOnly="True" Background="#F8F9FB"/>
                        <Button Grid.Column="2" x:Name="ViewPathBtn" Content="选择文件"
                                Width="82" Height="30" Margin="6,0,0,0"
                                Style="{StaticResource SecondaryButton}"
                                Click="ViewPathBtn_Click"/>
                    </Grid>
 
                    <!-- 机器码 -->
                    <Grid Grid.Row="2" Margin="0,0,0,12">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="82"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="机器码" Style="{StaticResource FieldLabel}"/>
                        <TextBox Grid.Column="1" x:Name="JQMTb" Height="30"/>
                        <Button Grid.Column="2" x:Name="OpenCode1Btn" Content="识别二维码"
                                Width="82" Height="30" Margin="6,0,0,0"
                                Style="{StaticResource SecondaryButton}"
                                Click="OpenCode1Btn_Click"/>
                    </Grid>
 
                    <!-- Separator -->
                    <Rectangle Grid.Row="3" Height="1" Fill="#E0E4E8" Margin="0,4,0,14"/>
 
                    <!-- Decrypt Button -->
                    <Button Grid.Row="5" x:Name="ParsLicenseBtn" Content="解 密 授 权"
                            Height="42" Width="200" HorizontalAlignment="Center"
                            Style="{StaticResource PrimaryButton}"
                            Click="ParsLicenseBtn_Click"/>
                </Grid>
            </Border>
        </Grid>
 
        <!-- ===== Status Bar ===== -->
        <Border Grid.Row="3" Background="#263238" Padding="18,0">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.Column="0" Orientation="Horizontal"
                            VerticalAlignment="Center">
                    <Ellipse Width="6" Height="6" Fill="#4CAF50" Margin="0,0,6,0"/>
                    <TextBlock Text="系统运行中  |  时间:" FontSize="11"
                               Foreground="#78909C" VerticalAlignment="Center"/>
                    <TextBlock x:Name="nowTimeLb" Text="" FontSize="11"
                               Foreground="#B0BEC5" VerticalAlignment="Center" MinWidth="170"/>
                </StackPanel>
                <StackPanel Grid.Column="1" Orientation="Horizontal"
                            VerticalAlignment="Center">
                    <TextBlock Text="© 智云3.0平台  |  版本 " FontSize="11"
                               Foreground="#78909C" VerticalAlignment="Center"/>
                    <TextBlock x:Name="labelX9" Text="20251008" FontSize="11"
                               Foreground="#B0BEC5" VerticalAlignment="Center"/>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</Window>