update
This commit is contained in:
parent
b63d2b668f
commit
29830df36c
14
Models/MainWindowModel.cs
Normal file
14
Models/MainWindowModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace VideoConcat.Models
|
||||||
|
{
|
||||||
|
internal class MainWindowModel
|
||||||
|
{
|
||||||
|
public string? UserName { get; set; }
|
||||||
|
public string? PassWord { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -28,9 +28,4 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Models\" />
|
|
||||||
<Folder Include="ViewModels\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
21
ViewModels/MainWindowViewModel.cs
Normal file
21
ViewModels/MainWindowViewModel.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using VideoConcat.Models;
|
||||||
|
|
||||||
|
namespace VideoConcat.ViewModels
|
||||||
|
{
|
||||||
|
internal class MainWindowViewModel
|
||||||
|
{
|
||||||
|
|
||||||
|
public MainWindowModel MainWindowsModel { get; set; } = new MainWindowModel();
|
||||||
|
|
||||||
|
public void Login()
|
||||||
|
{
|
||||||
|
string userName = MainWindowsModel.UserName;
|
||||||
|
string passWord = MainWindowsModel.PassWord;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<Window x:Class="VideoConcat.MainWindow"
|
<Window x:Class="VideoConcat.Views.MainWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
@ -33,7 +33,7 @@
|
|||||||
<materialDesign:PackIcon
|
<materialDesign:PackIcon
|
||||||
Width="30" Height="30"
|
Width="30" Height="30"
|
||||||
Kind="User" Margin="10,0,10,0"/>
|
Kind="User" Margin="10,0,10,0"/>
|
||||||
<TextBox x:Name="txtUserName" Width="400"
|
<TextBox Text="{Binding MainWindowModel.UserName}" Width="400"
|
||||||
Margin="10,0" BorderBrush="White"
|
Margin="10,0" BorderBrush="White"
|
||||||
CaretBrush="#FFD94448"
|
CaretBrush="#FFD94448"
|
||||||
SelectionBrush="#FFD94448"
|
SelectionBrush="#FFD94448"
|
||||||
@ -43,23 +43,26 @@
|
|||||||
<materialDesign:PackIcon
|
<materialDesign:PackIcon
|
||||||
Width="30" Height="30"
|
Width="30" Height="30"
|
||||||
Kind="Lock" Margin="10,0,10,0"/>
|
Kind="Lock" Margin="10,0,10,0"/>
|
||||||
<PasswordBox x:Name="txtPassword" Width="400"
|
<PasswordBox
|
||||||
|
Width="400"
|
||||||
Margin="10,0" BorderBrush="White"
|
Margin="10,0" BorderBrush="White"
|
||||||
CaretBrush="#FFD94448"
|
CaretBrush="#FFD94448"
|
||||||
SelectionBrush="#FFD94448"
|
SelectionBrush="#FFD94448"
|
||||||
materialDesign:HintAssist.Hint="输入 密码"
|
materialDesign:HintAssist.Hint="输入 密码"
|
||||||
/>
|
local:MainWindowModel="{Binding MainWindowModel.Password}"
|
||||||
|
>
|
||||||
|
</PasswordBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Margin="10" HorizontalAlignment="Center" VerticalAlignment="Center">
|
<StackPanel Margin="10" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
<Button x:Name="btnLogin" Width="100" Height="40"
|
<Button x:Name="btnLogin" Width="100" Height="40"
|
||||||
materialDesign:ButtonAssist.CornerRadius="10"
|
materialDesign:ButtonAssist.CornerRadius="5"
|
||||||
Background="#D94448" BorderBrush="#D94448" BorderThickness="2"
|
Background="#40568D" BorderBrush="#7F7F7F" BorderThickness="2"
|
||||||
Content="登录" ToolTip="登录"
|
Content="登录" ToolTip="登录"
|
||||||
Style="{StaticResource MaterialDesignRaisedButton}" Click="BtnLogin_Click"/>
|
Style="{StaticResource MaterialDesignRaisedButton}" Click="BtnLogin_Click"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
using VideoConcat.Models;
|
||||||
|
|
||||||
namespace VideoConcat
|
namespace VideoConcat.Views
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for MainWindow.xaml
|
/// Interaction logic for MainWindow.xaml
|
||||||
@ -11,6 +12,7 @@ namespace VideoConcat
|
|||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.DataContext = new MainWindowModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnExit_Click(object sender, RoutedEventArgs e)
|
private void BtnExit_Click(object sender, RoutedEventArgs e)
|
||||||
@ -18,14 +20,6 @@ namespace VideoConcat
|
|||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
|
|
||||||
{
|
|
||||||
if (Mouse.LeftButton == MouseButtonState.Pressed)
|
|
||||||
{
|
|
||||||
this.DragMove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BtnLogin_Click(object sender, RoutedEventArgs e)
|
private void BtnLogin_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user