Files
qhmes/yy-admin-master/YY.Admin/Views/Dialogs/ServerSettingsDialogView.xaml

60 lines
3.6 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<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"
MinWidth="520">
<Border Background="White" BorderBrush="#f0f0f0" BorderThickness="1" CornerRadius="4">
<Grid Margin="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<!-- Auto按表单实际高度排列避免固定窗体高度时中间行被压扁裁切 -->
<RowDefinition Height="Auto"/>
<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"/>
<TextBox Text="{Binding Ip, UpdateSourceTrigger=PropertyChanged}" Height="32" IsEnabled="{Binding IsConnectionFieldsEnabled}"/>
<TextBlock Text="端口" Margin="0,12,0,6"/>
<TextBox Text="{Binding Port, UpdateSourceTrigger=PropertyChanged}" Height="32" IsEnabled="{Binding IsConnectionFieldsEnabled}"/>
<TextBlock Text="WebSocket 地址(可选)" Margin="0,12,0,6"/>
<TextBox Text="{Binding WebSocketUrl, UpdateSourceTrigger=PropertyChanged}" Height="32" IsEnabled="{Binding IsConnectionFieldsEnabled}"/>
<TextBlock Text="后端上下文路径" Margin="0,12,0,6"/>
<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>
<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="&#xf0c7;" 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>