EPLAN_PROD_Plugin/Sinvo.EplanHpD.Plugin.WPFUI/View/LoginWindow.xaml

198 lines
7.2 KiB
Plaintext
Raw Normal View History

<Window
x:Class="Sinvo.EplanHpD.Plugin.WPFUI.View.LoginWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodel="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.ViewModel"
Title="登录"
Width="320"
Height="280"
d:DataContext="{d:DesignInstance Type=viewmodel:LoginViewModel}"
2025-04-10 10:19:41 +08:00
Loaded="Window_Loaded"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Sinvo.EplanHpD.Plugin.WPFUI;component/Themes/Theme.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<StackPanel
x:Name="mainPanel"
Height="Auto"
VerticalAlignment="Top">
<Image
x:Name="LogoImg"
Height="50"
Source="\\192.168.1.160\plm系统文档\新版本集成插件\Depends\SinvoLogo.png" />
<Grid Margin="20,0">
<Grid.RowDefinitions>
<RowDefinition Height="0.7*" />
<RowDefinition Height="3" />
<RowDefinition Height="*" />
<RowDefinition Height="0.5*" />
<RowDefinition Height="5" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Row="0"
Grid.Column="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="用户名" />
<TextBox
x:Name="UsernameTxt"
Grid.Row="0"
Grid.Column="1"
Width="190"
LostFocus="UsernameTxt_LostFocus"
Text="{Binding User.UserName}" />
<TextBlock
Grid.Row="2"
Grid.Column="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="密码" />
<PasswordBox
x:Name="PasswordTxt"
Grid.Row="2"
Grid.Column="1"
Width="190" />
<TextBlock
x:Name="msgTxt"
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalAlignment="Center" />
</Grid>
<Expander
x:Name="optExp"
Margin="20,0"
Padding="0,0"
Background="#eeeeee"
Collapsed="Expander_Collapsed"
Expanded="Expander_Expanded"
Foreground="#1976D2"
Header="更多"
IsExpanded="False">
<StackPanel
Height="80"
Margin="10"
Orientation="Vertical">
<StackPanel Height="40" Orientation="Horizontal">
<TextBlock
Grid.Row="0"
Grid.Column="0"
Width="50"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="部门" />
<ComboBox
x:Name="groupCbx"
Grid.Row="0"
Grid.Column="1"
Width="190"
DisplayMemberPath="Name"
ItemsSource="{Binding Groups}"
SelectedIndex="0"
SelectedValuePath="ID"
SelectionChanged="groupCbx_SelectionChanged" />
</StackPanel>
<StackPanel Height="40" Orientation="Horizontal">
<TextBlock
Grid.Row="1"
Grid.Column="0"
Width="50"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="角色" />
<ComboBox
x:Name="roleCbx"
Grid.Row="1"
Grid.Column="1"
Width="190"
MinWidth="190"
DisplayMemberPath="Name"
ItemsSource="{Binding Roles}"
SelectedIndex="0"
SelectedValuePath="ID" />
</StackPanel>
<!--<StackPanel Height="40" Orientation="Horizontal">
<TextBlock
Grid.Row="2"
Grid.Column="0"
Width="50"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="服务器" />
<ComboBox
x:Name="serverCbx"
Grid.Row="2"
Grid.Column="1"
Width="190"
MaxWidth="190"
DisplayMemberPath="ServerName"
ItemsSource="{Binding Servers}"
SelectedIndex="0"
SelectedValuePath="ServerUrl"
SelectionChanged="serverCbx_SelectionChanged" />
</StackPanel>-->
</StackPanel>
</Expander>
<CheckBox
x:Name="rememberChk"
Margin="20,10"
HorizontalAlignment="Right"
Content="记住登录信息"
IsChecked="{Binding IsRemember}" />
<StackPanel
Height="30"
Margin="20,10"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
x:Name="loginBtn"
Width="50"
Margin="5,0"
Click="loginBtn_Click"
DockPanel.Dock="Right"
Style="{StaticResource ButtonPrimary}">
<Button.Content>
<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Text="登录" />
</StackPanel>
</Button.Content>
</Button>
<Button
x:Name="cancelBtn"
Width="50"
Margin="5,0"
Click="cancelBtn_Click"
DockPanel.Dock="Right">
<Button.Content>
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<TextBlock Text="取消" />
</StackPanel>
</Button.Content>
</Button>
</StackPanel>
</StackPanel>
</Window>