-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
651 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<Window x:Class="PassWordManager.PassWord" | ||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:PassWordManager" | ||
mc:Ignorable="d" | ||
Title="PassWordManager" Height="500" Width="800" ResizeMode="NoResize" Closed="Window_Closed"> | ||
|
||
<Grid VerticalAlignment="Center"> | ||
<Frame x:Name="Defaut" Source ="PassWordPage.xaml" Height="450" Width="800" VerticalAlignment="Center" HorizontalAlignment="Center"/> | ||
</Grid> | ||
</Window> | ||
<Window x:Class="PassWordManager.PassWord" | ||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:PassWordManager" | ||
mc:Ignorable="d" | ||
Title="PassWordManager" Height="500" Width="800" ResizeMode="NoResize" Closed="Window_Closed"> | ||
|
||
<Grid VerticalAlignment="Center"> | ||
<Frame x:Name="Defaut" Source ="PassWordPage.xaml" Height="450" Width="800" VerticalAlignment="Center" HorizontalAlignment="Center"/> | ||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
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.Shapes; | ||
using Microsoft.Extensions.Hosting; | ||
|
||
namespace PassWordManager | ||
{ | ||
/// <summary> | ||
/// PassWord.xaml 的交互逻辑 | ||
/// </summary> | ||
public partial class PassWord : Window, IHostedService | ||
{ | ||
//public App App; | ||
|
||
public PassWord() | ||
{ | ||
InitializeComponent(); | ||
//App = app; | ||
} | ||
|
||
public async Task StartAsync(CancellationToken cancellationToken) | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
public async Task StopAsync(CancellationToken cancellationToken) | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void Window_Closed(object sender, EventArgs e) | ||
{ | ||
//App.Over(); | ||
Application.Current.Shutdown(); | ||
} | ||
} | ||
} | ||
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.Shapes; | ||
using Microsoft.Extensions.Hosting; | ||
|
||
namespace PassWordManager | ||
{ | ||
/// <summary> | ||
/// PassWord.xaml 的交互逻辑 | ||
/// </summary> | ||
public partial class PassWord : Window, IHostedService | ||
{ | ||
//public App App; | ||
|
||
public PassWord() | ||
{ | ||
InitializeComponent(); | ||
//App = app; | ||
} | ||
|
||
public async Task StartAsync(CancellationToken cancellationToken) | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
public async Task StopAsync(CancellationToken cancellationToken) | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void Window_Closed(object sender, EventArgs e) | ||
{ | ||
//App.Over(); | ||
Application.Current.Shutdown(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,87 @@ | ||
<Page x:Name="PassWordManage" x:Class="PassWordManager.PassWordPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:PassWordManager" | ||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" | ||
mc:Ignorable="d" | ||
Height="450" Width="800" | ||
Title="PassWordPage"> | ||
|
||
<Grid x:Name="PageGrid" Background="White" Height="450" Width="800" VerticalAlignment="Center" HorizontalAlignment="Center"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="53*"/> | ||
<ColumnDefinition Width="147*"/> | ||
</Grid.ColumnDefinitions> | ||
<ui:Button x:Name="Launch" Content="加密" VerticalAlignment="Top" Width="750" Margin="25,405,0,0" Height="35" Click="Launch_Click" Background="#F0F0F0" BorderBrush="#0078D7" Grid.ColumnSpan="2" Foreground="Black"/> | ||
|
||
<Border Background="#E0E0E7" CornerRadius="5" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="123,135,0,0" Width="440" Height="54" BorderBrush="#0078D7" BorderThickness="1" Grid.Column="1"> | ||
<StackPanel x:Name="LogPanel" Orientation="Horizontal" Margin="0,0,0,-1" > | ||
<ui:Button x:Name = "LogB1" Content = "禁用日志" Tag = "0" Width="135" Margin="8,0,0,0" MouseRightButtonDown="MethodMove" Background="White" Click="LogBClick" Foreground="Black"/> | ||
<ui:Button x:Name = "LogB2" Content = "简单日志" Tag = "1" Width="135" Margin="8,0,0,0" MouseRightButtonDown="MethodMove" Background="White" Click="LogBClick" Foreground="Black"/> | ||
<ui:Button x:Name = "LogB3" Content = "完整日志" Tag = "2" Width="135" Margin="8,0,0,0" MouseRightButtonDown="MethodMove" Background="White" Click="LogBClick" Foreground="Black"/> | ||
</StackPanel> | ||
</Border> | ||
|
||
<Border Background="#E0E0E7" CornerRadius="5" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25,331,0,0" Width="750" Height="60" BorderBrush="#0078D7" BorderThickness="4" Grid.ColumnSpan="2"> | ||
<StackPanel x:Name="MethodPanel" Orientation="Horizontal"> | ||
<ui:Button x:Name = "EnA1" Content="算法1" Tag = "0" Width="135" Margin="12,0,0,0" Click="MethodChoosen" MouseRightButtonDown="MethodMove" Background="White" Foreground="Black"/> | ||
<ui:Button x:Name = "EnA2" Content="算法2" Tag = "1" Width="135" Margin="12,0,0,0" Click="MethodChoosen" MouseRightButtonDown="MethodMove" Background="White" Foreground="Black"/> | ||
<ui:Button x:Name = "EnA3" Content="算法3" Tag = "2" Width="135" Margin="12,0,0,0" Click="MethodChoosen" MouseRightButtonDown="MethodMove" Background="White" Foreground="Black"/> | ||
<ui:Button x:Name = "EnA4" Content="算法4" Tag = "3" Width="135" Margin="12,0,0,0" Click="MethodChoosen" MouseRightButtonDown="MethodMove" Background="White" Foreground="Black"/> | ||
<ui:Button x:Name = "EnA5" Content="算法5" Tag = "4" Width="135" Margin="12,0,0,0" Click="MethodChoosen" MouseRightButtonDown="MethodMove" Background="White" Foreground="Black"/> | ||
</StackPanel> | ||
</Border> | ||
|
||
|
||
<Border x:Name="ExtraLengthZone" Background="#E0E0E7" BorderThickness="5" CornerRadius="10" Height="100" VerticalAlignment="Top" HorizontalAlignment="Left" Width="440" Margin="123,18,0,0" BorderBrush="#0078D7" Grid.Column="1"> | ||
<Grid Margin="5,5,5,3" > | ||
<Slider x:Name ="ExtraLength" VerticalAlignment="Top" HorizontalAlignment="Left" Background="White" Foreground="White" | ||
AutoToolTipPlacement="BottomRight" | ||
AutoToolTipPrecision="0" | ||
IsSnapToTickEnabled="True" | ||
Maximum="4" | ||
Minimum="0" | ||
TickFrequency="1" | ||
TickPlacement="BottomRight" | ||
Value="0" Margin="5,46,0,0" RenderTransformOrigin="0.5,0.5" Height="26" Width="405" /> | ||
<ui:TextBlock x:Name="ExtraLengthBlock" HorizontalAlignment="Left" Margin="5,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="29" Width="163" FontSize="20" Text="额外密码长度挡位"/> | ||
</Grid> | ||
</Border> | ||
|
||
|
||
<Border Background="#E0E0E7" Margin="25,18,475,133" Width="300" CornerRadius="10" BorderThickness="5" BorderBrush="#0078D7" Grid.ColumnSpan="2" > | ||
<Grid Margin="5,5,5,5" > | ||
<ui:TextBlock x:Name="KeyBlock" HorizontalAlignment="Left" Height="30" Margin="10,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="57" IsEnabled="False" FontSize="20" Foreground="Black" > | ||
<Run Language="zh-cn" Text="密钥"/> | ||
</ui:TextBlock> | ||
<ui:TextBox x:Name ="KeyBox" HorizontalAlignment="Left" Margin="8,45,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="270" FontSize="20" MinWidth="260" Background="White" Foreground="Black" /> | ||
<ui:TextBlock x:Name="PassWordBlock" HorizontalAlignment="Left" Height="30" Margin="10,91,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="85" IsEnabled="False" FontSize="20"> | ||
<Run Language="zh-cn" Text="原始密码"/> | ||
</ui:TextBlock> | ||
<ui:TextBox x:Name="WordBox" HorizontalAlignment="Left" Margin="10,126,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="265" FontSize="20" MinWidth="260" Background="White" Foreground="Black" /> | ||
<ui:TextBlock x:Name="ResultBlock" HorizontalAlignment="Left" Height="30" Margin="10,185,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="255" IsEnabled="False" FontSize="20" > | ||
<Run Language="zh-cn" Text="加密结果"/> | ||
</ui:TextBlock> | ||
<ui:TextBox x:Name="ResultBox" IsReadOnly="True" HorizontalAlignment="Center" Margin="0,220,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="212" FontSize="20" MinWidth="260" Background="White" Foreground="Black" /> | ||
</Grid> | ||
</Border> | ||
<Border Background="#E0E0E7" CornerRadius="10" BorderThickness="5" BorderBrush="#0078D7" Margin="0,204,25,133" HorizontalAlignment="Right" Width="440" Grid.Column="1" > | ||
<TextBlock HorizontalAlignment="Left" Margin="5,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" Height="93" Width="297" ><Run Language="zh-cn" Text="关于"/><Run Text="
"/><Run Language="zh-cn" Text="软件作者:"/><Run Text=" Disbai"/><LineBreak/><Run Text="
WPF UI:https://github.com/lepoco/wpfui
Github:"/></TextBlock> | ||
</Border> | ||
</Grid> | ||
</Page> | ||
|
||
<Page x:Name="PassWordManage" x:Class="PassWordManager.PassWordPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:PassWordManager" | ||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" | ||
mc:Ignorable="d" | ||
Height="450" Width="800" | ||
Title="PassWordPage"> | ||
|
||
<Grid x:Name="PageGrid" Background="White" Height="450" Width="800" VerticalAlignment="Center" HorizontalAlignment="Center"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="53*"/> | ||
<ColumnDefinition Width="147*"/> | ||
</Grid.ColumnDefinitions> | ||
<ui:Button x:Name="Launch" Content="加密" VerticalAlignment="Top" Width="750" Margin="25,405,0,0" Height="35" Click="Launch_Click" Background="#F0F0F0" BorderBrush="#0078D7" Grid.ColumnSpan="2" Foreground="Black"/> | ||
|
||
<Border Background="#E0E0E7" CornerRadius="5" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="123,135,0,0" Width="440" Height="54" BorderBrush="#0078D7" BorderThickness="1" Grid.Column="1"> | ||
<StackPanel x:Name="LogPanel" Orientation="Horizontal" Margin="0,0,0,-1" > | ||
<ui:Button x:Name = "LogB1" Content = "禁用日志" Tag = "0" Width="135" Margin="8,0,0,0" MouseRightButtonDown="MethodMove" Background="White" Click="LogBClick" Foreground="Black"/> | ||
<ui:Button x:Name = "LogB2" Content = "简单日志" Tag = "1" Width="135" Margin="8,0,0,0" MouseRightButtonDown="MethodMove" Background="White" Click="LogBClick" Foreground="Black"/> | ||
<ui:Button x:Name = "LogB3" Content = "完整日志" Tag = "2" Width="135" Margin="8,0,0,0" MouseRightButtonDown="MethodMove" Background="White" Click="LogBClick" Foreground="Black"/> | ||
</StackPanel> | ||
</Border> | ||
|
||
<Border Background="#E0E0E7" CornerRadius="5" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25,331,0,0" Width="750" Height="60" BorderBrush="#0078D7" BorderThickness="4" Grid.ColumnSpan="2"> | ||
<StackPanel x:Name="MethodPanel" Orientation="Horizontal"> | ||
<ui:Button x:Name = "EnA1" Content="算法1" Tag = "0" Width="135" Margin="12,0,0,0" Click="MethodChoosen" MouseRightButtonDown="MethodMove" Background="White" Foreground="Black"/> | ||
<ui:Button x:Name = "EnA2" Content="算法2" Tag = "1" Width="135" Margin="12,0,0,0" Click="MethodChoosen" MouseRightButtonDown="MethodMove" Background="White" Foreground="Black"/> | ||
<ui:Button x:Name = "EnA3" Content="算法3" Tag = "2" Width="135" Margin="12,0,0,0" Click="MethodChoosen" MouseRightButtonDown="MethodMove" Background="White" Foreground="Black"/> | ||
<ui:Button x:Name = "EnA4" Content="算法4" Tag = "3" Width="135" Margin="12,0,0,0" Click="MethodChoosen" MouseRightButtonDown="MethodMove" Background="White" Foreground="Black"/> | ||
<ui:Button x:Name = "EnA5" Content="算法5" Tag = "4" Width="135" Margin="12,0,0,0" Click="MethodChoosen" MouseRightButtonDown="MethodMove" Background="White" Foreground="Black"/> | ||
</StackPanel> | ||
</Border> | ||
|
||
|
||
<Border x:Name="ExtraLengthZone" Background="#E0E0E7" BorderThickness="5" CornerRadius="10" Height="100" VerticalAlignment="Top" HorizontalAlignment="Left" Width="440" Margin="123,18,0,0" BorderBrush="#0078D7" Grid.Column="1"> | ||
<Grid Margin="5,5,5,3" > | ||
<Slider x:Name ="ExtraLength" VerticalAlignment="Top" HorizontalAlignment="Left" Background="White" Foreground="White" | ||
AutoToolTipPlacement="BottomRight" | ||
AutoToolTipPrecision="0" | ||
IsSnapToTickEnabled="True" | ||
Maximum="4" | ||
Minimum="0" | ||
TickFrequency="1" | ||
TickPlacement="BottomRight" | ||
Value="0" Margin="5,46,0,0" RenderTransformOrigin="0.5,0.5" Height="26" Width="405" ValueChanged="ExtraLength_ValueChanged" /> | ||
<ui:TextBlock x:Name="ExtraLengthBlock" HorizontalAlignment="Left" Margin="5,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="29" Width="163" FontSize="20" Text="额外密码长度挡位"/> | ||
</Grid> | ||
</Border> | ||
|
||
|
||
<Border Background="#E0E0E7" Margin="25,18,475,133" Width="300" CornerRadius="10" BorderThickness="5" BorderBrush="#0078D7" Grid.ColumnSpan="2" > | ||
<Grid Margin="5,5,5,5" > | ||
<ui:TextBlock x:Name="KeyBlock" HorizontalAlignment="Left" Height="30" Margin="10,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="57" IsEnabled="False" FontSize="20" Foreground="Black" > | ||
<Run Language="zh-cn" Text="密钥"/> | ||
</ui:TextBlock> | ||
<ui:TextBox x:Name ="KeyBox" HorizontalAlignment="Left" Margin="8,45,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="270" FontSize="20" MinWidth="260" Background="White" Foreground="Black" /> | ||
<ui:TextBlock x:Name="PassWordBlock" HorizontalAlignment="Left" Height="30" Margin="10,91,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="85" IsEnabled="False" FontSize="20"> | ||
<Run Language="zh-cn" Text="原始密码"/> | ||
</ui:TextBlock> | ||
<ui:TextBox x:Name="WordBox" HorizontalAlignment="Left" Margin="10,126,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="265" FontSize="20" MinWidth="260" Background="White" Foreground="Black" /> | ||
<ui:TextBlock x:Name="ResultBlock" HorizontalAlignment="Left" Height="30" Margin="10,185,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="255" IsEnabled="False" FontSize="20" > | ||
<Run Language="zh-cn" Text="加密结果"/> | ||
</ui:TextBlock> | ||
<ui:TextBox x:Name="ResultBox" IsReadOnly="True" HorizontalAlignment="Center" Margin="0,220,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="212" FontSize="20" MinWidth="260" Background="White" Foreground="Black" /> | ||
</Grid> | ||
</Border> | ||
<Border Background="#E0E0E7" CornerRadius="10" BorderThickness="5" BorderBrush="#0078D7" Margin="0,194,25,133" HorizontalAlignment="Right" Width="440" Grid.Column="1" > | ||
<Grid> | ||
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Height="39" Width="354" Margin="10,10,0,0" ><Run Text="关于"/><Run Text="
"/><Run Text="软件作者:"/><Run Text=" "/><Run Text=" Disbai"/><InlineUIContainer/></TextBlock> | ||
<ui:HyperlinkButton | ||
Margin="10,85,0,0" | ||
Padding="0" | ||
Content="WPF UI : https://wpfui.lepo.co/" | ||
NavigateUri="https://wpfui.lepo.co/" Click="HyperlinkButton_Click" VerticalAlignment="Top" /> | ||
<ui:HyperlinkButton | ||
Margin="10,67,0,0" | ||
Padding="0" | ||
Content="Github : https://github.com/DISBAIC/PassWordManager" | ||
NavigateUri="https://github.com/DISBAIC/PassWordManager" Click="HyperlinkButton_Click" VerticalAlignment="Top" /> | ||
</Grid> | ||
</Border> | ||
</Grid> | ||
</Page> | ||
|
Oops, something went wrong.