Skip to content

Commit

Permalink
* Retain option to use duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDead committed May 11, 2019
1 parent 97349ca commit 1a0b026
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Advanced PassGen/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
<setting name="SetMaxLength" serializeAs="String">
<value>1</value>
</setting>
<setting name="SetDuplicates" serializeAs="String">
<value>False</value>
</setting>
</Advanced_PassGen.Properties.Settings>
</userSettings>
</configuration>
12 changes: 12 additions & 0 deletions Advanced PassGen/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Advanced PassGen/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,8 @@
<Setting Name="SetMaxLength" Type="System.Int32" Scope="User">
<Value Profile="(Default)">1</Value>
</Setting>
<Setting Name="SetDuplicates" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
2 changes: 1 addition & 1 deletion Advanced PassGen/Windows/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox x:Name="ChbAllowDuplicates" Content="Allow duplicates" Margin="3">
<CheckBox x:Name="ChbAllowDuplicates" Content="Allow duplicates" Margin="3" Checked="SetCheckBox_OnChecked" Unchecked="SetCheckBox_OnChecked">
<CheckBox.ToolTip>
<ToolTip Content="Allow duplicate passwords to be generated." />
</CheckBox.ToolTip>
Expand Down
2 changes: 2 additions & 0 deletions Advanced PassGen/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ private void SaveSetSettings()
if (ChbBase64.IsChecked != null) Properties.Settings.Default.SetBase64 = ChbBase64.IsChecked.Value;
if (TxtMinLength.Value != null) Properties.Settings.Default.SetMinLength = (int) TxtMinLength.Value.Value;
if (TxtMaxLength.Value != null) Properties.Settings.Default.SetMaxLength = (int) TxtMaxLength.Value.Value;
if (ChbAllowDuplicates.IsChecked != null) Properties.Settings.Default.SetDuplicates = ChbAllowDuplicates.IsChecked.Value;

Properties.Settings.Default.Save();
}
Expand Down Expand Up @@ -187,6 +188,7 @@ private void LoadSetSettings()
ChbBase64.IsChecked = Properties.Settings.Default.SetBase64;
TxtMinLength.Value = Properties.Settings.Default.SetMinLength;
TxtMaxLength.Value = Properties.Settings.Default.SetMaxLength;
ChbAllowDuplicates.IsChecked = Properties.Settings.Default.SetDuplicates;
_loadingSetSettings = false;
}

Expand Down

0 comments on commit 1a0b026

Please sign in to comment.