Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.8.0.2110 #85

Merged
merged 17 commits into from
Oct 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Passliss.Setup/Setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Passliss"
#define MyAppVersion "1.7.0.2109"
#define MyAppFullVersion "1.7.0.2109"
#define MyAppVersion "1.8.0.2110"
#define MyAppFullVersion "1.8.0.2110"
#define MyAppPublisher "L�o Corporation"
#define MyAppURL "https://leocorporation.dev/"
#define MyAppExeName "Passliss.exe"
Expand Down
6 changes: 0 additions & 6 deletions Passliss/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ MIT License
SOFTWARE.
*/
using Passliss.Classes;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace Passliss
Expand Down
4 changes: 2 additions & 2 deletions Passliss/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static class Global
/// <summary>
/// The current version of Passliss.
/// </summary>
public static string Version => "1.7.0.2109";
public static string Version => "1.8.0.2110";

/// <summary>
/// GitHub link for the last version (<see cref="string"/>).
Expand Down Expand Up @@ -146,7 +146,7 @@ public static void ChangeTheme()

App.Current.Resources.MergedDictionaries.Add(resourceDictionary); // Add the dictionary
}

public static bool IsSystemThemeDark()
{
if (Env.WindowsVersion != WindowsVersion.Windows10)
Expand Down
5 changes: 0 additions & 5 deletions Passliss/Classes/PasswordConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ MIT License
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Passliss.Classes
{
Expand Down
3 changes: 0 additions & 3 deletions Passliss/Classes/PasswordConfigurationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ MIT License
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Xml.Serialization;

Expand Down
4 changes: 0 additions & 4 deletions Passliss/Classes/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ MIT License
using LeoCorpLibrary;
using Passliss.Enums;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Xml.Serialization;

Expand Down
5 changes: 0 additions & 5 deletions Passliss/Enums/DefaultPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ MIT License
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Passliss.Enums
{
Expand Down
5 changes: 0 additions & 5 deletions Passliss/Enums/PasswordStrenght.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ MIT License
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Passliss.Enums
{
Expand Down
3 changes: 0 additions & 3 deletions Passliss/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ MIT License
*/
using Passliss.Classes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Passliss.Extensions
{
Expand Down
Binary file added Passliss/Fonts/FluentSystemIcons-Filled.ttf
Binary file not shown.
18 changes: 4 additions & 14 deletions Passliss/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,11 @@ MIT License
using Passliss.Classes;
using Passliss.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
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.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Passliss
{
Expand All @@ -65,15 +55,15 @@ public MainWindow()
private void InitUI()
{
HelloTxt.Text = Global.GetHiSentence; // Set the "Hi" message
PageContent.Content = Global.Settings.StartupPage switch
{
PageContent.Content = Global.Settings.StartupPage switch
{
DefaultPage.Generate => Global.GeneratePage,
DefaultPage.Strength => Global.StrenghtPage,
_ => Global.GeneratePage
}; // Set startup page

CheckButton(Global.Settings.StartupPage switch
{
CheckButton(Global.Settings.StartupPage switch
{
DefaultPage.Generate => GenerateTabBtn,
DefaultPage.Strength => StrenghtTabBtn,
_ => GenerateTabBtn
Expand Down
24 changes: 20 additions & 4 deletions Passliss/Pages/GeneratePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,21 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{x:Static lang:Resources.Password}" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="16"/>
<Button Content="&#xF4D7;" Padding="5" x:Name="RandomizeBtn" Click="RandomizeBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="1" Style="{DynamicResource TabButtonStyle}" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" FontSize="14" Margin="0,0,5,0"/>
<Button Content="&#xF160;" Padding="5" x:Name="ShowFullPasswordBtn" Click="ShowFullPasswordBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="2" Style="{DynamicResource TabButtonStyle}" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" FontSize="14" Margin="0,0,5,0"/>
<Button Content="&#xF47F;" Padding="5" x:Name="HistoryBtn" Click="HistoryBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="3" Style="{DynamicResource TabButtonStyle}" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" FontSize="14"/>
<Button Content="&#xF4D7;" Padding="5" x:Name="RandomizeBtn" Click="RandomizeBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="1" Style="{DynamicResource TabButtonStyle}" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" FontSize="14" Margin="0,0,5,0">
<Button.ToolTip>
<ToolTip Content="{x:Static lang:Resources.RandomizePasswordConfiguration}" Foreground="{Binding Source={StaticResource Foreground1}}" Background="{Binding Source={StaticResource Background1}}"/>
</Button.ToolTip>
</Button>
<Button Content="&#xF160;" Padding="5" x:Name="ShowFullPasswordBtn" Click="ShowFullPasswordBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="2" Style="{DynamicResource TabButtonStyle}" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" FontSize="14" Margin="0,0,5,0">
<Button.ToolTip>
<ToolTip Content="{x:Static lang:Resources.ShowFullPassword}" Foreground="{Binding Source={StaticResource Foreground1}}" Background="{Binding Source={StaticResource Background1}}"/>
</Button.ToolTip>
</Button>
<Button Content="&#xF47F;" Padding="5" x:Name="HistoryBtn" Click="HistoryBtn_Click" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Grid.Column="3" Style="{DynamicResource TabButtonStyle}" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" FontSize="14">
<Button.ToolTip>
<ToolTip Content="{x:Static lang:Resources.History}" Foreground="{Binding Source={StaticResource Foreground1}}" Background="{Binding Source={StaticResource Background1}}"/>
</Button.ToolTip>
</Button>
</Grid>
<StackPanel x:Name="Header">
<TextBlock x:Name="PasswordTxt" d:Text="PasswordGoHere" HorizontalAlignment="Center" FontWeight="Bold" FontSize="24" Margin="0 10 0 0" Foreground="{Binding Source={StaticResource Foreground1}}"/>
Expand All @@ -55,7 +67,11 @@
<StackPanel Orientation="Horizontal" Grid.Column="1" VerticalAlignment="Top">
<TextBlock Text="{x:Static lang:Resources.Lenght}" Foreground="{Binding Source={StaticResource Foreground1}}" Margin="0,0,10,0" FontWeight="Bold" FontSize="14" VerticalAlignment="Center"/>
<TextBox x:Name="LenghtTxt" PreviewTextInput="LenghtTxt_PreviewTextInput" Style="{DynamicResource TextBoxStyle1}" Width="50" FontSize="14" FontWeight="Bold" Background="{x:Null}" BorderBrush="#FF007FFF" Foreground="{Binding Source={StaticResource Foreground1}}" CaretBrush="{Binding Source={StaticResource Foreground1}}" SelectionBrush="#FF007AF5"/>
<Button x:Name="RandomizeLength" Click="RandomizeLength_Click" Content="&#xea4b;" Cursor="Hand" Padding="7,5,7,5" FontFamily="..\Fonts\#FluentlyIcons" Style="{StaticResource TabButtonStyle}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" Background="{Binding Source={StaticResource AccentColor}}" Margin="5,0,0,0"/>
<Button x:Name="RandomizeLength" Click="RandomizeLength_Click" Content="&#xea4b;" Cursor="Hand" Padding="7,5,7,5" FontFamily="..\Fonts\#FluentlyIcons" Style="{StaticResource TabButtonStyle}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" Background="{Binding Source={StaticResource AccentColor}}" Margin="5,0,0,0">
<Button.ToolTip>
<ToolTip Content="{x:Static lang:Resources.GenerateRandomLength}" Foreground="{Binding Source={StaticResource Foreground1}}" Background="{Binding Source={StaticResource Background1}}"/>
</Button.ToolTip>
</Button>
</StackPanel>
</Grid>

Expand Down
14 changes: 3 additions & 11 deletions Passliss/Pages/GeneratePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,10 @@ MIT License
using Passliss.UserControls;
using Passliss.Windows;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
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 Passliss.Pages
{
Expand Down Expand Up @@ -95,6 +85,7 @@ public GeneratePage()
private void GenerateBtn_Click(object sender, RoutedEventArgs e)
{
LenghtTxt.Text = LenghtTxt.Text.Replace(" ", ""); // Remove whitespaces
HistoryBtn.Visibility = Visibility.Visible; // Set visibility
if (LenghtTxt.Text.Length <= 0 || !(int.Parse(LenghtTxt.Text) > 0))
{
MessageBox.Show(Properties.Resources.PleaseSpecifyLenghtMsg, Properties.Resources.Passliss, MessageBoxButton.OK, MessageBoxImage.Information); // Show message
Expand Down Expand Up @@ -208,6 +199,7 @@ internal void HistoryBtn_Click(object sender, RoutedEventArgs e)
{
if (PasswordHistory.Children.Count > 0)
{
HistoryBtn.Visibility = Visibility.Visible; // Set visibility
if (sender is not PasswordHistoryItem)
{
if (Header.Visibility == Visibility.Visible)
Expand Down Expand Up @@ -244,7 +236,7 @@ internal void HistoryBtn_Click(object sender, RoutedEventArgs e)
HistoryScroll.Visibility = Visibility.Collapsed; // Hide

HistoryBtn.Content = "\uF47F"; // Set text

HistoryBtn.Visibility = Visibility.Collapsed; // Set visibility
if (sender is not PasswordHistoryItem)
{
MessageBox.Show(Properties.Resources.HistoryEmpty, Properties.Resources.Passliss, MessageBoxButton.OK, MessageBoxImage.Information); // Show
Expand Down
23 changes: 14 additions & 9 deletions Passliss/Pages/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
xmlns:local="clr-namespace:Passliss.Pages"
xmlns:lang="clr-namespace:Passliss.Properties"
mc:Ignorable="d"
FontFamily="../Fonts/#Montserrat"
FontFamily="../Fonts/#Montserrat" Foreground="{Binding Source={StaticResource Foreground1}}"
d:DesignHeight="450" d:DesignWidth="700"
Title="SettingsPage">

<ScrollViewer HorizontalScrollBarVisibility="Hidden" Template="{DynamicResource ScrollViewerControlTemplate}" CanContentScroll="True" Height="344">
<Grid Height="980">
<Grid Height="1060">
<StackPanel Margin="10,40,10,10" Grid.Row="0">
<TextBlock Text="{x:Static lang:Resources.Settings}" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="16"/>

Expand Down Expand Up @@ -99,14 +99,19 @@
<TextBlock Text="{x:Static lang:Resources.Startup}" Foreground="{Binding Source={StaticResource Foreground1}}" FontWeight="Bold" FontSize="20" Margin="0,10,0,0"/>
<TextBlock Text="{x:Static lang:Resources.StartupPage}" Foreground="{Binding Source={StaticResource Foreground1}}" FontSize="14"/>

<StackPanel Orientation="Horizontal">
<ComboBox SelectionChanged="PageComboBox_SelectionChanged" BorderThickness="2" Padding="5" Style="{DynamicResource ComboBoxStyle1}" x:Name="PageComboBox" Background="Transparent" BorderBrush="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource Foreground1}}" HorizontalAlignment="Left" Margin="0,5,10,0" VerticalAlignment="Center"/>
<Button x:Name="PageApplyBtn" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" Padding="10,5,10,5" Style="{StaticResource TabButtonStyle}" FontWeight="Bold" Cursor="Hand" VerticalAlignment="Center" Click="PageApplyBtn_Click" Visibility="Hidden">
<StackPanel Orientation="Horizontal">
<TextBlock Text="&#xE98E;" FontWeight="Regular" FontFamily="..\Fonts\#FluentlyIcons" Margin="0,0,5,0" VerticalAlignment="Center"/>
<TextBlock Text="{x:Static lang:Resources.Apply}" VerticalAlignment="Center"/>
<StackPanel Orientation="Horizontal">
<Border x:Name="GeneratePageBorder" CornerRadius="10" Margin="5" Background="{Binding Source={StaticResource Background1}}" BorderThickness="3" BorderBrush="{x:Null}" MouseEnter="Border_MouseEnter_1" MouseLeave="Border_MouseLeave_1" Cursor="Hand" MouseLeftButtonUp="GeneratePageBorder_MouseLeftButtonUp">
<StackPanel Orientation="Vertical">
<TextBlock Text="&#xFC23;" Margin="20" FontSize="64" FontFamily="..\Fonts\#FluentSystemIcons-Regular" HorizontalAlignment="Center"/>
<RadioButton Style="{DynamicResource RadioButtonStyle1}" x:Name="GeneratePageRadioBtn" Checked="GeneratePageRadioBtn_Checked" GroupName="StartupPageRadioGroup" Content="{x:Static lang:Resources.Generate}" Foreground="{Binding Source={StaticResource Foreground1}}" Background="{Binding Source={StaticResource Background1}}" BorderBrush="#2153E0" FontWeight="Bold" FontSize="13" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2"/>
</StackPanel>
</Button>
</Border>
<Border x:Name="StrengthPageBorder" CornerRadius="10" Margin="5" Background="{Binding Source={StaticResource Background1}}" BorderThickness="3" BorderBrush="{x:Null}" MouseEnter="Border_MouseEnter_1" MouseLeave="Border_MouseLeave_1" Cursor="Hand" MouseLeftButtonUp="StrengthPageBorder_MouseLeftButtonUp">
<StackPanel Orientation="Vertical">
<TextBlock Text="&#xF6BF;" Margin="20" FontSize="64" FontFamily="..\Fonts\#FluentSystemIcons-Regular" HorizontalAlignment="Center"/>
<RadioButton Style="{DynamicResource RadioButtonStyle1}" x:Name="StrengthPageRadioBtn" Checked="StrengthPageRadioBtn_Checked" GroupName="StartupPageRadioGroup" Content="{x:Static lang:Resources.Strenght}" Foreground="{Binding Source={StaticResource Foreground1}}" Background="{Binding Source={StaticResource Background1}}" BorderBrush="#2153E0" FontWeight="Bold" FontSize="13" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2"/>
</StackPanel>
</Border>
</StackPanel>

<TextBlock Text="{x:Static lang:Resources.PasswordConfigurations}" Foreground="{Binding Source={StaticResource Foreground1}}" FontWeight="Bold" FontSize="20" Margin="0,10,0,0"/>
Expand Down
Loading