DeviceDetailsWindow.xaml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <Window x:Class="QuickIP.Client.DeviceDetailsWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. Title="设备信息与接口配置"
  5. Height="760"
  6. Width="1100"
  7. MinHeight="680"
  8. MinWidth="1000"
  9. WindowStartupLocation="CenterOwner">
  10. <Grid Background="#F5F7FB" Margin="20">
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="Auto" />
  13. <RowDefinition Height="Auto" />
  14. <RowDefinition Height="Auto" />
  15. <RowDefinition Height="Auto" />
  16. <RowDefinition Height="*" />
  17. </Grid.RowDefinitions>
  18. <TextBlock FontSize="22"
  19. FontWeight="SemiBold"
  20. Foreground="#111827"
  21. Text="设备信息与 Linux 接口" />
  22. <UniformGrid Grid.Row="1" Margin="0,12,0,0" Columns="4">
  23. <Border Margin="0,0,12,0" Padding="14" Background="White" CornerRadius="10">
  24. <StackPanel>
  25. <TextBlock FontSize="12" Foreground="#6B7280" Text="设备 ID" />
  26. <TextBlock x:Name="RemoteDeviceIdTextBlock" Margin="0,8,0,0" FontSize="14" FontWeight="SemiBold" Foreground="#111827" Text="-" />
  27. </StackPanel>
  28. </Border>
  29. <Border Margin="0,0,12,0" Padding="14" Background="White" CornerRadius="10">
  30. <StackPanel>
  31. <TextBlock FontSize="12" Foreground="#6B7280" Text="主机名" />
  32. <TextBlock x:Name="RemoteHostnameTextBlock" Margin="0,8,0,0" FontSize="14" FontWeight="SemiBold" Foreground="#111827" Text="-" />
  33. </StackPanel>
  34. </Border>
  35. <Border Margin="0,0,12,0" Padding="14" Background="White" CornerRadius="10">
  36. <StackPanel>
  37. <TextBlock FontSize="12" Foreground="#6B7280" Text="Ubuntu 版本" />
  38. <TextBlock x:Name="RemoteOsVersionTextBlock" Margin="0,8,0,0" FontSize="14" FontWeight="SemiBold" Foreground="#111827" Text="-" />
  39. </StackPanel>
  40. </Border>
  41. <Border Padding="14" Background="White" CornerRadius="10">
  42. <StackPanel>
  43. <TextBlock FontSize="12" Foreground="#6B7280" Text="Agent 版本" />
  44. <TextBlock x:Name="RemoteAgentVersionTextBlock" Margin="0,8,0,0" FontSize="14" FontWeight="SemiBold" Foreground="#111827" Text="-" />
  45. </StackPanel>
  46. </Border>
  47. </UniformGrid>
  48. <Border Grid.Row="2" Margin="0,12,0,0" Padding="14" Background="White" CornerRadius="10">
  49. <StackPanel>
  50. <TextBlock FontSize="13" FontWeight="SemiBold" Foreground="#111827" Text="目标接口" />
  51. <ComboBox x:Name="RemoteTargetInterfaceComboBox"
  52. Margin="0,10,0,0"
  53. MinHeight="36"
  54. DisplayMemberPath="DisplayName"
  55. SelectionChanged="RemoteTargetInterfaceComboBox_OnSelectionChanged" />
  56. <TextBlock x:Name="RemoteSummaryTextBlock"
  57. Margin="0,12,0,0"
  58. FontSize="12"
  59. Foreground="#3730A3"
  60. TextWrapping="Wrap"
  61. Text="正在读取 Linux 管理接口和建议目标接口。" />
  62. </StackPanel>
  63. </Border>
  64. <Border Grid.Row="3" Margin="0,12,0,0" Padding="14" Background="White" CornerRadius="10">
  65. <UniformGrid Columns="4">
  66. <Border Margin="0,0,12,0" Padding="12" Background="#EEF2FF" CornerRadius="10">
  67. <StackPanel>
  68. <TextBlock FontSize="12" Foreground="#6B7280" Text="接口名" />
  69. <TextBlock x:Name="RemoteConfigInterfaceTextBlock" Margin="0,8,0,0" FontSize="14" FontWeight="SemiBold" Foreground="#111827" Text="-" />
  70. </StackPanel>
  71. </Border>
  72. <Border Margin="0,0,12,0" Padding="12" Background="#EEF2FF" CornerRadius="10">
  73. <StackPanel>
  74. <TextBlock FontSize="12" Foreground="#6B7280" Text="当前 IP" />
  75. <TextBlock x:Name="RemoteConfigIpTextBlock" Margin="0,8,0,0" FontSize="14" FontWeight="SemiBold" Foreground="#111827" Text="-" />
  76. </StackPanel>
  77. </Border>
  78. <Border Margin="0,0,12,0" Padding="12" Background="#EEF2FF" CornerRadius="10">
  79. <StackPanel>
  80. <TextBlock FontSize="12" Foreground="#6B7280" Text="当前网关" />
  81. <TextBlock x:Name="RemoteConfigGatewayTextBlock" Margin="0,8,0,0" FontSize="14" FontWeight="SemiBold" Foreground="#111827" Text="-" />
  82. </StackPanel>
  83. </Border>
  84. <Border Padding="12" Background="#EEF2FF" CornerRadius="10">
  85. <StackPanel>
  86. <TextBlock FontSize="12" Foreground="#6B7280" Text="当前 DNS" />
  87. <TextBlock x:Name="RemoteConfigDnsTextBlock" Margin="0,8,0,0" FontSize="14" FontWeight="SemiBold" Foreground="#111827" Text="-" />
  88. </StackPanel>
  89. </Border>
  90. </UniformGrid>
  91. </Border>
  92. <Border Grid.Row="4" Margin="0,12,0,0" Padding="14" Background="White" CornerRadius="10">
  93. <Grid>
  94. <Grid.RowDefinitions>
  95. <RowDefinition Height="Auto" />
  96. <RowDefinition Height="Auto" />
  97. <RowDefinition Height="Auto" />
  98. <RowDefinition Height="Auto" />
  99. <RowDefinition Height="Auto" />
  100. </Grid.RowDefinitions>
  101. <TextBlock FontSize="13" FontWeight="SemiBold" Foreground="#111827" Text="新配置" />
  102. <StackPanel Grid.Row="1" Margin="0,12,0,0" Orientation="Horizontal">
  103. <Button x:Name="ReloadInterfaceConfigButton" MinHeight="36" Padding="14,0" Click="ReloadInterfaceConfigButton_OnClick" Content="1. 读取当前配置" />
  104. <Button x:Name="ValidateConfigButton" Margin="10,0,0,0" MinHeight="36" Padding="14,0" Click="ValidateConfigButton_OnClick" Content="2. 校验配置" />
  105. <Button x:Name="ApplyConfigButton" Margin="10,0,0,0" MinHeight="36" Padding="14,0" Click="ApplyConfigButton_OnClick" Content="3. 应用配置" />
  106. </StackPanel>
  107. <UniformGrid Grid.Row="2" Margin="0,12,0,0" Columns="2">
  108. <StackPanel Margin="0,0,12,12">
  109. <TextBlock FontSize="12" Foreground="#6B7280" Text="IP 地址" />
  110. <TextBox x:Name="NewIpTextBox" Margin="0,8,0,0" MinHeight="32" TextChanged="ConfigInputChanged_OnChanged" />
  111. </StackPanel>
  112. <StackPanel Margin="0,0,0,12">
  113. <TextBlock FontSize="12" Foreground="#6B7280" Text="子网掩码" />
  114. <TextBox x:Name="NewMaskTextBox" Margin="0,8,0,0" MinHeight="32" TextChanged="ConfigInputChanged_OnChanged" />
  115. </StackPanel>
  116. <StackPanel Margin="0,0,12,0">
  117. <TextBlock FontSize="12" Foreground="#6B7280" Text="网关" />
  118. <TextBox x:Name="NewGatewayTextBox" Margin="0,8,0,0" MinHeight="32" TextChanged="ConfigInputChanged_OnChanged" />
  119. </StackPanel>
  120. <StackPanel Margin="0,0,0,0">
  121. <TextBlock FontSize="12" Foreground="#6B7280" Text="首选 DNS" />
  122. <TextBox x:Name="NewDnsTextBox" Margin="0,8,0,0" MinHeight="32" TextChanged="ConfigInputChanged_OnChanged" />
  123. </StackPanel>
  124. </UniformGrid>
  125. <Border Grid.Row="3" Margin="0,12,0,0" Padding="10" Background="#EEF2FF" CornerRadius="10">
  126. <TextBlock x:Name="ConfigValidationTextBlock" FontSize="12" Foreground="#3730A3" TextWrapping="Wrap" Text="点击 1/2/3 按顺序操作:先读取当前配置,再校验,最后应用。" />
  127. </Border>
  128. <Border Grid.Row="4" Margin="0,12,0,0" Padding="10" Background="#ECFDF5" CornerRadius="10">
  129. <TextBlock x:Name="ApplyTaskStatusTextBlock" FontSize="12" Foreground="#065F46" TextWrapping="Wrap" Text="尚未提交配置任务。" />
  130. </Border>
  131. </Grid>
  132. </Border>
  133. </Grid>
  134. </Window>