Skip to content
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
139 changes: 118 additions & 21 deletions nppRandomStringGenerator/Forms/ConfigAndGenerate.Designer.cs

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

11 changes: 7 additions & 4 deletions nppRandomStringGenerator/Forms/ConfigAndGenerate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Kbg.NppPluginNET.PluginInfrastructure;
using nppRandomStringGenerator.Modules;
using nppRandomStringGenerator.Storage;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button;

namespace Kbg.NppPluginNET
{
Expand Down Expand Up @@ -44,6 +41,10 @@ public ConfigAndGenerate()
this.Editor = new ScintillaGateway(PluginBase.GetCurrentScintilla());
this.Notepad = new NotepadPPGateway();
ButtonCancel.Enabled = false;
numericUpDownCores.Maximum = Environment.ProcessorCount;
numericUpDownCores.Value = (int)(Environment.ProcessorCount / 2);
CheckboxDarkMode.Visible = false;
TabControl1.TabPages.Remove(tabPageAdvanced);
}

public void LoadSettings()
Expand Down Expand Up @@ -185,6 +186,7 @@ private async void ButtonGenerate_Click(Object sender, EventArgs e)
IsDuplicate = CheckboxDuplicate.Checked,
IsSequential = CheckboxSequential.Checked,
Prefix = TextboxPrefix.Text,
Suffix = TextboxSuffix.Text,
RandomMinimumLength = (int)NumericUpDownRandomMin.Value,
RandomMaximumLength = (int)NumericUpDownRandomMax.Value,
DoRandom = CheckboxDoRandom.Checked,
Expand All @@ -194,7 +196,8 @@ private async void ButtonGenerate_Click(Object sender, EventArgs e)
StringQuantity = (int)NumericUpDownQuantity.Value,
DoGuids = TabControl1.SelectedTab == TabPageGUID,
GuidFormat = ComboBoxGUIDFormat.Text,
GuidQuantity = (int)NumericUpDownGUIDQuantity.Value
GuidQuantity = (int)NumericUpDownGUIDQuantity.Value,
Cores = (int)numericUpDownCores.Value
};

ButtonGenerate.Enabled = false;
Expand Down
Loading