CHEN-ZW\acer e24ee57355 1
2025-09-23 16:38:40 +08:00

91 lines
3.7 KiB
XML

<Window
x:Class="SWS.CAD.Views.Login"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:SWS.CAD.Views.CustomControl"
xmlns:local2="clr-namespace:SWS.Commons;assembly=SWS.Commons"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Width="300"
Height="250"
AllowsTransparency="True"
Background="White"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
WindowStyle="None">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/SWS.CAD;component/Views/Style/CustomStyles.xaml" />
</Window.Resources>
<telerik:RadBusyIndicator BusyContent="{Binding BusyContent}" IsBusy="{Binding IsBusy}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<!-- 自定义标题栏 -->
<local:customWindowTitleBar />
<!-- 主要内容区 -->
<Grid Grid.Row="1" Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="30" />
<RowDefinition Height="auto" />
<RowDefinition Height="30" />
<RowDefinition Height="30" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<TextBlock Style="{StaticResource sysLabel}" Text="用户名:" />
<telerik:RadWatermarkTextBox
Grid.Row="1"
Style="{StaticResource sysTextBox}"
Text="{Binding UserName, Mode=TwoWay}" />
<TextBlock
Grid.Row="2"
Style="{StaticResource sysLabel}"
Text="密码:" />
<telerik:RadPasswordBox
x:Name="passwordBox"
Grid.Row="3"
Style="{StaticResource sysTextBox}">
<i:Interaction.Behaviors>
<local2:PasswordBoxBehavior Password="{Binding sPASSWORD, Mode=TwoWay}" />
</i:Interaction.Behaviors>
</telerik:RadPasswordBox>
<TextBlock
Grid.Row="4"
Style="{StaticResource sysLabel}"
Text="{Binding curServer}" />
<StackPanel Grid.Row="5" Orientation="Horizontal">
<CheckBox Content="记住密码" IsChecked="{Binding rememberPs}" />
</StackPanel>
</Grid>
<Border
Grid.Row="2"
Height="30"
Background="{StaticResource ColorPrimary}">
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<telerik:RadButton
Margin="5"
Command="{Binding CloseCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
Content="取消"
Style="{StaticResource sysBtn2}" />
<telerik:RadButton
Margin="5"
Command="{Binding OKCommand}"
CommandParameter="{Binding ElementName=passwordBox}"
Content="登录"
Style="{StaticResource sysBtn}" />
</StackPanel>
</Border>
</Grid>
</telerik:RadBusyIndicator>
</Window>