Jelajahi Sumber

refactor(ui): 优化主界面布局与操作引导文案

重组左侧面板结构,将网卡选择与探测结果合并;
更新右侧按钮及步骤提示文案,增加序号以明确操作流程。
yangkaixiang 1 bulan lalu
induk
melakukan
8efd16566e
1 mengubah file dengan 71 tambahan dan 63 penghapusan
  1. 71 63
      windows/QuickIP.Client/MainWindow.xaml

+ 71 - 63
windows/QuickIP.Client/MainWindow.xaml

@@ -46,8 +46,6 @@
                     CornerRadius="12">
                 <Grid>
                     <Grid.RowDefinitions>
-                        <RowDefinition Height="Auto" />
-                        <RowDefinition Height="Auto" />
                         <RowDefinition Height="Auto" />
                         <RowDefinition Height="*" />
                     </Grid.RowDefinitions>
@@ -55,56 +53,77 @@
                     <TextBlock FontSize="20"
                                FontWeight="SemiBold"
                                Foreground="#111827"
-                               Text="本机网卡与连接" />
+                               Text="① 连接准备" />
 
-                    <StackPanel Grid.Row="1" Margin="0,20,0,0">
-                        <TextBlock FontSize="13"
-                                   Foreground="#374151"
-                                   Text="本机有线网卡" />
-                        <Grid Margin="0,8,0,0">
-                            <Grid.ColumnDefinitions>
-                                <ColumnDefinition Width="*" />
-                                <ColumnDefinition Width="Auto" />
-                            </Grid.ColumnDefinitions>
-                            <ComboBox x:Name="AdapterComboBox"
-                                      MinHeight="36"
-                                      DisplayMemberPath="DisplayName"
-                                      SelectionChanged="AdapterComboBox_OnSelectionChanged" />
-                            <Button x:Name="RefreshAdaptersButton"
-                                    Grid.Column="1"
-                                    Margin="8,0,0,0"
-                                    MinHeight="36"
-                                    Padding="14,0"
-                                    Click="RefreshAdaptersButton_OnClick"
-                                    Content="刷新" />
-                        </Grid>
-                    </StackPanel>
+                    <Grid Grid.Row="1" Margin="0,20,0,0">
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="Auto" />
+                            <RowDefinition Height="Auto" />
+                            <RowDefinition Height="*" />
+                        </Grid.RowDefinitions>
 
-                    <Border Grid.Row="2" Margin="0,24,0,0" Padding="16" Background="#ECFDF5" CornerRadius="10" VerticalAlignment="Top">
-                        <StackPanel>
-                            <TextBlock FontSize="12" Foreground="#065F46" Text="管理口探测结果" />
-                            <TextBlock x:Name="AdapterProbeTextBlock"
-                                       Margin="0,8,0,0"
-                                       FontSize="16"
-                                       FontWeight="SemiBold"
-                                       Foreground="#065F46"
-                                       Text="-" />
-                        </StackPanel>
-                    </Border>
+                        <Border Padding="16" Background="#F9FAFB" CornerRadius="10">
+                            <StackPanel>
+                                <TextBlock FontSize="13" FontWeight="SemiBold" Foreground="#111827" Text="本机网卡与连接" />
+                                <TextBlock Margin="0,12,0,0"
+                                           FontSize="13"
+                                           Foreground="#374151"
+                                           Text="本机有线网卡" />
+                                <Grid Margin="0,8,0,0">
+                                    <Grid.ColumnDefinitions>
+                                        <ColumnDefinition Width="*" />
+                                        <ColumnDefinition Width="Auto" />
+                                    </Grid.ColumnDefinitions>
+                                    <ComboBox x:Name="AdapterComboBox"
+                                              MinHeight="36"
+                                              DisplayMemberPath="DisplayName"
+                                              SelectionChanged="AdapterComboBox_OnSelectionChanged" />
+                                    <Button x:Name="RefreshAdaptersButton"
+                                            Grid.Column="1"
+                                            Margin="8,0,0,0"
+                                            MinHeight="36"
+                                            Padding="14,0"
+                                            Click="RefreshAdaptersButton_OnClick"
+                                            Content="刷新" />
+                                </Grid>
+                                <Border Margin="0,16,0,0" Padding="14" Background="#ECFDF5" CornerRadius="10">
+                                    <StackPanel>
+                                        <TextBlock FontSize="12" Foreground="#065F46" Text="管理口探测结果" />
+                                        <TextBlock x:Name="AdapterProbeTextBlock"
+                                                   Margin="0,8,0,0"
+                                                   FontSize="16"
+                                                   FontWeight="SemiBold"
+                                                   Foreground="#065F46"
+                                                   Text="-" />
+                                    </StackPanel>
+                                </Border>
+                            </StackPanel>
+                        </Border>
 
-                    <Border Grid.Row="3" Margin="0,16,0,0" Padding="16" Background="#F3F4F6" CornerRadius="10" VerticalAlignment="Bottom">
-                        <Grid>
-                            <Grid.RowDefinitions>
-                                <RowDefinition Height="Auto" />
-                                <RowDefinition Height="*" />
-                            </Grid.RowDefinitions>
-                            <TextBlock FontSize="13" FontWeight="SemiBold" Foreground="#111827" Text="运行日志" />
-                            <ListBox x:Name="EventLogListBox"
-                                      Grid.Row="1"
-                                      Margin="0,12,0,0"
-                                      Height="108" />
-                        </Grid>
-                    </Border>
+                        <Border Grid.Row="1" Margin="0,16,0,0" Padding="16" Background="#F9FAFB" CornerRadius="10">
+                            <StackPanel>
+                                <TextBlock FontSize="13" FontWeight="SemiBold" Foreground="#111827" Text="操作顺序" />
+                                <TextBlock Margin="0,12,0,0" Foreground="#4B5563" Text="1. 选择本机有线网卡" />
+                                <TextBlock Margin="0,8,0,0" Foreground="#4B5563" Text="2. 输入或确认管理密码" />
+                                <TextBlock Margin="0,8,0,0" Foreground="#4B5563" Text="3. 点击连接设备" />
+                                <TextBlock Margin="0,8,0,0" Foreground="#4B5563" Text="4. 如果连接失败,再切换到维护网络后重试" />
+                            </StackPanel>
+                        </Border>
+
+                        <Border Grid.Row="2" Margin="0,16,0,0" Padding="16" Background="#F3F4F6" CornerRadius="10">
+                            <Grid>
+                                <Grid.RowDefinitions>
+                                    <RowDefinition Height="Auto" />
+                                    <RowDefinition Height="*" />
+                                </Grid.RowDefinitions>
+                                <TextBlock FontSize="13" FontWeight="SemiBold" Foreground="#111827" Text="运行日志" />
+                                <ListBox x:Name="EventLogListBox"
+                                          Grid.Row="1"
+                                          Margin="0,12,0,0"
+                                          Height="108" />
+                            </Grid>
+                        </Border>
+                    </Grid>
 
                 </Grid>
             </Border>
@@ -119,15 +138,13 @@
                             <RowDefinition Height="Auto" />
                             <RowDefinition Height="Auto" />
                             <RowDefinition Height="Auto" />
-                            <RowDefinition Height="Auto" />
-                            <RowDefinition Height="Auto" />
                             <RowDefinition Height="*" />
                         </Grid.RowDefinitions>
 
                     <TextBlock FontSize="20"
                                FontWeight="SemiBold"
                                Foreground="#111827"
-                               Text="操作" />
+                               Text="② 连接与操作" />
 
                     <Border Grid.Row="1" Margin="0,20,0,0" Padding="16" Background="#F9FAFB" CornerRadius="10">
                         <StackPanel>
@@ -175,14 +192,14 @@
                             Margin="0,16,0,0"
                             MinHeight="42"
                             Click="SwitchMaintenanceButton_OnClick"
-                            Content="切换到维护网络" />
+                            Content="切换到维护网络(可选)" />
 
                     <Button x:Name="DiscoverConnectButton"
                             Grid.Row="3"
                             Margin="0,12,0,0"
                             MinHeight="42"
                             Click="DiscoverConnectButton_OnClick"
-                            Content="发现并连接" />
+                            Content="④ 连接设备" />
 
                     <Border Grid.Row="4" Margin="0,16,0,0" Padding="12" Background="#FEF3C7" CornerRadius="10">
                         <TextBlock x:Name="AdminStateTextBlock"
@@ -192,15 +209,6 @@
                                    Text="管理员状态:未知" />
                     </Border>
 
-                    <Border Grid.Row="5" Margin="0,16,0,0" Padding="16" Background="#F9FAFB" CornerRadius="10">
-                        <StackPanel>
-                            <TextBlock FontSize="13" FontWeight="SemiBold" Foreground="#111827" Text="当前执行顺序" />
-                            <TextBlock Margin="0,12,0,0" Foreground="#4B5563" Text="1. 选择本机有线网卡" />
-                            <TextBlock Margin="0,8,0,0" Foreground="#4B5563" Text="2. 先尝试直接访问 169.254.100.2" />
-                            <TextBlock Margin="0,8,0,0" Foreground="#4B5563" Text="3. 如果直连失败,再切换到维护网络" />
-                            <TextBlock Margin="0,8,0,0" Foreground="#4B5563" Text="4. 自动带出或输入密码并验证连接" />
-                        </StackPanel>
-                    </Border>
                 </Grid>
             </Border>
         </Grid>