添加的登录界面,使用固定账号和密码测试登录逻辑成功
This commit is contained in:
47
WorkStation.Client/Views/Dialogs/LoginView.xaml
Normal file
47
WorkStation.Client/Views/Dialogs/LoginView.xaml
Normal file
@ -0,0 +1,47 @@
|
||||
<UserControl
|
||||
x:Class="WorkStation.Client.Views.Dialogs.LoginView"
|
||||
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:WorkStation.Client.Views.Dialogs"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Width="800"
|
||||
Height="450"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
<ColumnDefinition Width="1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image
|
||||
Grid.Column="0"
|
||||
Margin="10"
|
||||
Source="/Images/LoginImage.png" />
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="50"
|
||||
Text="登录" />
|
||||
<TextBlock
|
||||
FontSize="20"
|
||||
Text="账号" />
|
||||
<TextBox
|
||||
Width="200"
|
||||
Margin="5"
|
||||
Text="{Binding Account}" />
|
||||
<TextBlock
|
||||
FontSize="20"
|
||||
Text="密码" />
|
||||
<TextBox
|
||||
Width="200"
|
||||
Margin="5"
|
||||
Text="{Binding Password}" />
|
||||
<Button
|
||||
Command="{Binding LoginCommand}"
|
||||
Content="登录" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
28
WorkStation.Client/Views/Dialogs/LoginView.xaml.cs
Normal file
28
WorkStation.Client/Views/Dialogs/LoginView.xaml.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace WorkStation.Client.Views.Dialogs
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for LoginView.xaml
|
||||
/// </summary>
|
||||
public partial class LoginView : UserControl
|
||||
{
|
||||
public LoginView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
13
WorkStation.Client/Views/MainWindow.xaml
Normal file
13
WorkStation.Client/Views/MainWindow.xaml
Normal file
@ -0,0 +1,13 @@
|
||||
<Window
|
||||
x:Class="WorkStation.Client.Views.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
Title="{Binding Title}"
|
||||
Width="525"
|
||||
Height="350"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True">
|
||||
<Grid>
|
||||
<Button />
|
||||
</Grid>
|
||||
</Window>
|
15
WorkStation.Client/Views/MainWindow.xaml.cs
Normal file
15
WorkStation.Client/Views/MainWindow.xaml.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace WorkStation.Client.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user