Skip to content

Commit 1a0b026

Browse files
committed
* Retain option to use duplicates
1 parent 97349ca commit 1a0b026

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

Advanced PassGen/App.config

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585
<setting name="SetMaxLength" serializeAs="String">
8686
<value>1</value>
8787
</setting>
88+
<setting name="SetDuplicates" serializeAs="String">
89+
<value>False</value>
90+
</setting>
8891
</Advanced_PassGen.Properties.Settings>
8992
</userSettings>
9093
</configuration>

Advanced PassGen/Properties/Settings.Designer.cs

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Advanced PassGen/Properties/Settings.settings

+3
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,8 @@
7474
<Setting Name="SetMaxLength" Type="System.Int32" Scope="User">
7575
<Value Profile="(Default)">1</Value>
7676
</Setting>
77+
<Setting Name="SetDuplicates" Type="System.Boolean" Scope="User">
78+
<Value Profile="(Default)">False</Value>
79+
</Setting>
7780
</Settings>
7881
</SettingsFile>

Advanced PassGen/Windows/MainWindow.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
<RowDefinition Height="Auto" />
157157
<RowDefinition Height="Auto" />
158158
</Grid.RowDefinitions>
159-
<CheckBox x:Name="ChbAllowDuplicates" Content="Allow duplicates" Margin="3">
159+
<CheckBox x:Name="ChbAllowDuplicates" Content="Allow duplicates" Margin="3" Checked="SetCheckBox_OnChecked" Unchecked="SetCheckBox_OnChecked">
160160
<CheckBox.ToolTip>
161161
<ToolTip Content="Allow duplicate passwords to be generated." />
162162
</CheckBox.ToolTip>

Advanced PassGen/Windows/MainWindow.xaml.cs

+2
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ private void SaveSetSettings()
159159
if (ChbBase64.IsChecked != null) Properties.Settings.Default.SetBase64 = ChbBase64.IsChecked.Value;
160160
if (TxtMinLength.Value != null) Properties.Settings.Default.SetMinLength = (int) TxtMinLength.Value.Value;
161161
if (TxtMaxLength.Value != null) Properties.Settings.Default.SetMaxLength = (int) TxtMaxLength.Value.Value;
162+
if (ChbAllowDuplicates.IsChecked != null) Properties.Settings.Default.SetDuplicates = ChbAllowDuplicates.IsChecked.Value;
162163

163164
Properties.Settings.Default.Save();
164165
}
@@ -187,6 +188,7 @@ private void LoadSetSettings()
187188
ChbBase64.IsChecked = Properties.Settings.Default.SetBase64;
188189
TxtMinLength.Value = Properties.Settings.Default.SetMinLength;
189190
TxtMaxLength.Value = Properties.Settings.Default.SetMaxLength;
191+
ChbAllowDuplicates.IsChecked = Properties.Settings.Default.SetDuplicates;
190192
_loadingSetSettings = false;
191193
}
192194

0 commit comments

Comments
 (0)