2026-04-28 10:23:58 +08:00
|
|
|
<UserControl x:Class="YY.Admin.Views.Dialogs.ServerSettingsDialogView"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:ctls="clr-namespace:YY.Admin.Core.Controls;assembly=YY.Admin.Core"
|
2026-04-30 15:28:20 +08:00
|
|
|
Width="520" Height="420"
|
|
|
|
|
Loaded="UserControl_Loaded">
|
2026-04-28 10:23:58 +08:00
|
|
|
<Border Background="White" BorderBrush="#f0f0f0" BorderThickness="1" CornerRadius="4">
|
|
|
|
|
<Grid Margin="0">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<Border Grid.Row="0" Background="#fafafa" Height="42" CornerRadius="4,4,0,0" BorderThickness="0,0,0,1" BorderBrush="#f0f0f0">
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="16,0">
|
|
|
|
|
<TextBlock Text="服务器设置" VerticalAlignment="Center" FontWeight="SemiBold" Foreground="#333333"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="1" Margin="20,16,20,0">
|
|
|
|
|
<TextBlock Text="IP" Margin="0,0,0,6"/>
|
2026-04-30 15:28:20 +08:00
|
|
|
<TextBox Text="{Binding Ip, UpdateSourceTrigger=PropertyChanged}" Height="32" IsEnabled="{Binding IsConnectionFieldsEnabled}"/>
|
2026-04-28 10:23:58 +08:00
|
|
|
|
|
|
|
|
<TextBlock Text="端口" Margin="0,12,0,6"/>
|
2026-04-30 15:28:20 +08:00
|
|
|
<TextBox Text="{Binding Port, UpdateSourceTrigger=PropertyChanged}" Height="32" IsEnabled="{Binding IsConnectionFieldsEnabled}"/>
|
2026-04-28 10:23:58 +08:00
|
|
|
|
|
|
|
|
<TextBlock Text="WebSocket 地址(可选)" Margin="0,12,0,6"/>
|
2026-04-30 15:28:20 +08:00
|
|
|
<TextBox Text="{Binding WebSocketUrl, UpdateSourceTrigger=PropertyChanged}" Height="32" IsEnabled="{Binding IsConnectionFieldsEnabled}"/>
|
2026-04-28 10:23:58 +08:00
|
|
|
|
|
|
|
|
<TextBlock Text="后端上下文路径" Margin="0,12,0,6"/>
|
2026-04-30 15:28:20 +08:00
|
|
|
<TextBox Text="{Binding BasePath, UpdateSourceTrigger=PropertyChanged}" Height="32" IsEnabled="{Binding IsConnectionFieldsEnabled}"/>
|
|
|
|
|
|
|
|
|
|
<DockPanel Margin="0,12,0,0" LastChildFill="False">
|
|
|
|
|
<TextBlock Text="断开连接" VerticalAlignment="Center"/>
|
|
|
|
|
<ToggleButton DockPanel.Dock="Right"
|
|
|
|
|
IsChecked="{Binding DisconnectConnection, Mode=TwoWay}"
|
|
|
|
|
Style="{StaticResource ToggleButtonSwitch}"/>
|
|
|
|
|
</DockPanel>
|
2026-04-28 10:23:58 +08:00
|
|
|
|
|
|
|
|
<TextBlock Text="{Binding ErrorMessage}" Foreground="Red" Margin="0,12,0,0"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<Border Grid.Row="2" Background="#fafafa" Height="62" CornerRadius="0,0,4,4" BorderThickness="0,1,0,0" BorderBrush="#f0f0f0">
|
|
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
|
|
<Button Command="{Binding SaveCommand}" Width="90" Height="34" Margin="0,0,12,0" Background="#1890ff" Foreground="White" BorderThickness="0">
|
|
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
|
|
|
|
<ctls:FontAwesomeIcon Icon="" IconFamily="Solid" Margin="0,0,6,0"/>
|
|
|
|
|
<TextBlock Text="保存"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Button>
|
|
|
|
|
<Button Command="{Binding CancelCommand}" Width="90" Height="34" Background="Transparent" BorderBrush="#d9d9d9">
|
|
|
|
|
<TextBlock Text="取消"/>
|
|
|
|
|
</Button>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</UserControl>
|