Skip to content

Commit b1f9afc

Browse files
authored
Merge pull request #50 from cmbsolutions/develop
Adds suffix option, core selection and settings upgrade
2 parents 04ecb23 + 98dd3d9 commit b1f9afc

File tree

7 files changed

+192
-59
lines changed

7 files changed

+192
-59
lines changed

nppRandomStringGenerator/Forms/ConfigAndGenerate.Designer.cs

Lines changed: 118 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nppRandomStringGenerator/Forms/ConfigAndGenerate.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33
using System.Drawing;
44
using System.Linq;
55
using System.Reflection;
6-
using System.Text;
76
using System.Text.RegularExpressions;
8-
using System.Threading;
97
using System.Threading.Tasks;
108
using System.Windows.Forms;
119
using Kbg.NppPluginNET.PluginInfrastructure;
1210
using nppRandomStringGenerator.Modules;
1311
using nppRandomStringGenerator.Storage;
14-
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button;
1512

1613
namespace Kbg.NppPluginNET
1714
{
@@ -44,6 +41,10 @@ public ConfigAndGenerate()
4441
this.Editor = new ScintillaGateway(PluginBase.GetCurrentScintilla());
4542
this.Notepad = new NotepadPPGateway();
4643
ButtonCancel.Enabled = false;
44+
numericUpDownCores.Maximum = Environment.ProcessorCount;
45+
numericUpDownCores.Value = (int)(Environment.ProcessorCount / 2);
46+
CheckboxDarkMode.Visible = false;
47+
TabControl1.TabPages.Remove(tabPageAdvanced);
4748
}
4849

4950
public void LoadSettings()
@@ -185,6 +186,7 @@ private async void ButtonGenerate_Click(Object sender, EventArgs e)
185186
IsDuplicate = CheckboxDuplicate.Checked,
186187
IsSequential = CheckboxSequential.Checked,
187188
Prefix = TextboxPrefix.Text,
189+
Suffix = TextboxSuffix.Text,
188190
RandomMinimumLength = (int)NumericUpDownRandomMin.Value,
189191
RandomMaximumLength = (int)NumericUpDownRandomMax.Value,
190192
DoRandom = CheckboxDoRandom.Checked,
@@ -194,7 +196,8 @@ private async void ButtonGenerate_Click(Object sender, EventArgs e)
194196
StringQuantity = (int)NumericUpDownQuantity.Value,
195197
DoGuids = TabControl1.SelectedTab == TabPageGUID,
196198
GuidFormat = ComboBoxGUIDFormat.Text,
197-
GuidQuantity = (int)NumericUpDownGUIDQuantity.Value
199+
GuidQuantity = (int)NumericUpDownGUIDQuantity.Value,
200+
Cores = (int)numericUpDownCores.Value
198201
};
199202

200203
ButtonGenerate.Enabled = false;

0 commit comments

Comments
 (0)