diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/.idea/.idea.ZalGen/.idea/.gitignore b/.idea/.idea.ZalGen/.idea/.gitignore
new file mode 100644
index 0000000..0110b99
--- /dev/null
+++ b/.idea/.idea.ZalGen/.idea/.gitignore
@@ -0,0 +1,2 @@
+# Default ignored files
+/workspace.xml
\ No newline at end of file
diff --git a/.idea/.idea.ZalGen/.idea/encodings.xml b/.idea/.idea.ZalGen/.idea/encodings.xml
new file mode 100644
index 0000000..df87cf9
--- /dev/null
+++ b/.idea/.idea.ZalGen/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.ZalGen/.idea/modules.xml b/.idea/.idea.ZalGen/.idea/modules.xml
new file mode 100644
index 0000000..926f257
--- /dev/null
+++ b/.idea/.idea.ZalGen/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.ZalGen/.idea/vcs.xml b/.idea/.idea.ZalGen/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/.idea.ZalGen/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.ZalGen/riderModule.iml b/.idea/.idea.ZalGen/riderModule.iml
new file mode 100644
index 0000000..1a4e0d9
--- /dev/null
+++ b/.idea/.idea.ZalGen/riderModule.iml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ZalGen.sln b/ZalGen.sln
index d09656a..3ea42d0 100644
--- a/ZalGen.sln
+++ b/ZalGen.sln
@@ -5,11 +5,6 @@ VisualStudioVersion = 16.0.29324.140
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZalGen", "ZalGen\ZalGen.csproj", "{5F66EB15-54FD-4B45-92E7-EDA1070D867F}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C11CFC18-C557-435A-A049-FD6A797B03DA}"
- ProjectSection(SolutionItems) = preProject
- TextFile1.txt = TextFile1.txt
- EndProjectSection
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
diff --git a/ZalGen/App.config b/ZalGen/App.config
deleted file mode 100644
index 193aecc..0000000
--- a/ZalGen/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ZalGen/Form1.Designer.cs b/ZalGen/Form1.Designer.cs
index 4798306..7f7c4a5 100644
--- a/ZalGen/Form1.Designer.cs
+++ b/ZalGen/Form1.Designer.cs
@@ -1,11 +1,14 @@
-namespace Zalgen
+using System.ComponentModel;
+using System.Windows.Forms;
+
+namespace Zalgen
{
partial class Form1
{
///
/// Required designer variable.
///
- private System.ComponentModel.IContainer components = null;
+ private IContainer components = null;
///
/// Clean up any resources being used.
@@ -167,15 +170,15 @@
#endregion
- private System.Windows.Forms.TextBox text;
- private System.Windows.Forms.Button run;
- private System.Windows.Forms.Panel controlPanel;
- private System.Windows.Forms.CheckBox fuck_down;
- private System.Windows.Forms.CheckBox fuck_up;
- private System.Windows.Forms.CheckBox fuck_mid;
- private System.Windows.Forms.Button refSheet;
- private System.Windows.Forms.TrackBar strengthBar;
- private System.Windows.Forms.Label strengthLabel;
+ private TextBox text;
+ private Button run;
+ private Panel controlPanel;
+ private CheckBox fuck_down;
+ private CheckBox fuck_up;
+ private CheckBox fuck_mid;
+ private Button refSheet;
+ private TrackBar strengthBar;
+ private Label strengthLabel;
}
}
diff --git a/ZalGen/Form1.cs b/ZalGen/Form1.cs
index 2904452..4fd31d1 100644
--- a/ZalGen/Form1.cs
+++ b/ZalGen/Form1.cs
@@ -1,28 +1,43 @@
using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
using System.Linq;
-using System.Text;
using System.Threading;
-using System.Threading.Tasks;
using System.Windows.Forms;
+using static System.Environment;
namespace Zalgen
{
public partial class Form1 : Form
{
+ private readonly char[] _downChars =
+ {
+ '\u0316', '\u0317', '\u0318', '\u0319', '\u031C', '\u031D', '\u031E', '\u031F', '\u0320', '\u0321',
+ '\u0322', '\u0323', '\u0324', '\u0325', '\u0326', '\u0327',
+ '\u0328', '\u0329', '\u032A', '\u032B', '\u032C', '\u032D', '\u032E', '\u032F', '\u0330', '\u0331',
+ '\u0332', '\u0333', '\u0339', '\u033A', '\u033B', '\u033C', '\u0345', '\u0347',
+ '\u0348', '\u0349', '\u034D', '\u034E', '\u0353', '\u0354', '\u0355', '\u0356', '\u0359', '\u035A',
+ '\u035C', '\u035F', '\u0362', '\u1DFF', '\u0656', '\u065F'
+ };
+
+ private readonly char[] _midChars =
+ {
+ '\u0730', '\u073F', '\u0743', '\u074A', '\u0F18', '\u0F19', '\u0F35', '\u0F37', '\u0F72', '\u0F73',
+ '\u0F7A', '\u0F81', '\u0F84', '\uFC5E', '\uFC62', '\u0334',
+ '\u0335', '\u0336', '\u0337', '\u0338', '\u05C7', '\u0610', '\u061A', '\u06D6', '\u06ED', '\u0711'
+ };
+
+ private readonly char[] _upChars =
+ {
+ '\u0300', '\u0301', '\u0301', '\u0302', '\u0303', '\u0304', '\u0305', '\u0306', '\u0307', '\u0308',
+ '\u0309', '\u030A', '\u030B', '\u030C', '\u030D', '\u030E',
+ '\u030F', '\u0310', '\u0311', '\u0312', '\u0313', '\u0314', '\u0315', '\u031A', '\u031B', '\u033D',
+ '\u033E', '\u033F', '\u0340', '\u0341', '\u0342', '\u0343', '\u0344', '\u0346',
+ '\u034A', '\u034B', '\u034C', '\u0350', '\u0351', '\u0352', '\u0357', '\u0358', '\u035B', '\u035D',
+ '\u035E', '\u0360', '\u0361', '\u0363', '\u0364', '\u0365', '\u0366', '\u0367',
+ '\u0368', '\u0369', '\u036A', '\u036B', '\u036C', '\u036D', '\u036E', '\u036F', '\u1DC0', '\uFE20',
+ '\u0483', '\u0486', '\u0670'
+ };
+
public Form1() => InitializeComponent();
- char[] upChars = new char[] { '\u0300', '\u0301', '\u0301', '\u0302', '\u0303', '\u0304', '\u0305', '\u0306', '\u0307', '\u0308', '\u0309', '\u030A', '\u030B', '\u030C', '\u030D', '\u030E',
- '\u030F', '\u0310', '\u0311', '\u0312', '\u0313', '\u0314', '\u0315', '\u031A', '\u031B', '\u033D', '\u033E', '\u033F', '\u0340', '\u0341', '\u0342', '\u0343', '\u0344', '\u0346',
- '\u034A', '\u034B', '\u034C', '\u0350', '\u0351', '\u0352', '\u0357', '\u0358', '\u035B', '\u035D', '\u035E', '\u0360', '\u0361', '\u0363', '\u0364', '\u0365', '\u0366', '\u0367',
- '\u0368', '\u0369', '\u036A', '\u036B', '\u036C', '\u036D', '\u036E', '\u036F', '\u1DC0', '\uFE20', '\u0483', '\u0486', '\u0670' };
- char[] midChars = new char[] { '\u0730', '\u073F', '\u0743', '\u074A', '\u0F18', '\u0F19', '\u0F35', '\u0F37', '\u0F72', '\u0F73', '\u0F7A', '\u0F81', '\u0F84', '\uFC5E', '\uFC62', '\u0334',
- '\u0335', '\u0336', '\u0337', '\u0338', '\u05C7', '\u0610', '\u061A', '\u06D6', '\u06ED', '\u0711' };
- char[] downChars = new char[] { '\u0316', '\u0317', '\u0318', '\u0319', '\u031C', '\u031D', '\u031E', '\u031F', '\u0320', '\u0321', '\u0322', '\u0323', '\u0324', '\u0325', '\u0326', '\u0327',
- '\u0328', '\u0329', '\u032A', '\u032B', '\u032C', '\u032D', '\u032E', '\u032F', '\u0330', '\u0331', '\u0332', '\u0333', '\u0339', '\u033A', '\u033B', '\u033C', '\u0345', '\u0347',
- '\u0348', '\u0349', '\u034D', '\u034E', '\u0353', '\u0354', '\u0355', '\u0356', '\u0359', '\u035A', '\u035C', '\u035F', '\u0362', '\u1DFF', '\u0656', '\u065F' };
private void button1_Click(object sender, EventArgs e)
{
@@ -30,31 +45,24 @@ namespace Zalgen
string[] f = text.Text.Replace("\r\n", "\r").ToCharArray().Select(s => s.ToString()).ToArray();
Random rnd = new Random();
if (fuck_up.Checked)
- {
for (int i = 0; i < f.Length; i++)
- for (int j = 0; j < strengthBar.Value; j++)
- f[i] = upChars[rnd.Next(upChars.Length)].ToString() + f[i];
- }
+ for (int j = 0; j < strengthBar.Value; j++)
+ f[i] = _upChars[rnd.Next(_upChars.Length)] + f[i];
if (fuck_mid.Checked)
- {
for (int i = 0; i < f.Length; i++)
if (rnd.Next(strengthBar.Value) > 4)
- f[i] = midChars[rnd.Next(midChars.Length)].ToString() + f[i];
- }
+ f[i] = _midChars[rnd.Next(_midChars.Length)] + f[i];
if (fuck_down.Checked)
- {
for (int i = 0; i < f.Length; i++)
- for (int j = 0; j < strengthBar.Value; j++)
- f[i] = downChars[rnd.Next(downChars.Length)].ToString() + f[i];
- }
+ for (int j = 0; j < strengthBar.Value; j++)
+ f[i] = _downChars[rnd.Next(_downChars.Length)] + f[i];
Clipboard.SetText(string.Join("", f).Replace("\r", "\r\n"));
}
private void refSheet_Click(object sender, EventArgs e)
{
- MessageBox.Show("Going up: " + string.Join(", ", upChars.Select(s => "a" + s.ToString())) +
- "\r\n\r\nMiddle: " + string.Join(", ", midChars.Select(s => "a" + s.ToString())) +
- "\r\n\r\nGoing down: " + string.Join(", ", downChars.Select(s => "a" + s.ToString())));
+ MessageBox.Show(
+ $"Going up: {string.Join(", ", _upChars.Select(s => $"a{s}"))}{NewLine}{NewLine}Middle: {string.Join(", ", _midChars.Select(s => $"a{s}"))}{NewLine}{NewLine}Going down: {string.Join(", ", _downChars.Select(s => $"a{s}"))}");
}
}
-}
+}
\ No newline at end of file
diff --git a/ZalGen/Program.cs b/ZalGen/Program.cs
index 0509019..f466728 100644
--- a/ZalGen/Program.cs
+++ b/ZalGen/Program.cs
@@ -1,22 +1,19 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using System.Windows.Forms;
namespace Zalgen
{
- static class Program
+ internal static class Program
{
///
- /// The main entry point for the application.
+ /// The main entry point for the application.
///
[STAThread]
- static void Main()
+ private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
-}
+}
\ No newline at end of file
diff --git a/ZalGen/Properties/AssemblyInfo.cs b/ZalGen/Properties/AssemblyInfo.cs
index c6247a5..c41cd5f 100644
--- a/ZalGen/Properties/AssemblyInfo.cs
+++ b/ZalGen/Properties/AssemblyInfo.cs
@@ -1,5 +1,4 @@
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
@@ -32,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
\ No newline at end of file
diff --git a/ZalGen/Properties/Resources.Designer.cs b/ZalGen/Properties/Resources.Designer.cs
deleted file mode 100644
index 3d7971b..0000000
--- a/ZalGen/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Zalgen.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Zalgen.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ZalGen/Properties/Resources.resx b/ZalGen/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/ZalGen/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/ZalGen/Properties/Settings.Designer.cs b/ZalGen/Properties/Settings.Designer.cs
deleted file mode 100644
index 8070c4a..0000000
--- a/ZalGen/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Zalgen.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/ZalGen/Properties/Settings.settings b/ZalGen/Properties/Settings.settings
deleted file mode 100644
index 3964565..0000000
--- a/ZalGen/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/ZalGen/ZalGen.csproj b/ZalGen/ZalGen.csproj
index ede0b77..373cc36 100644
--- a/ZalGen/ZalGen.csproj
+++ b/ZalGen/ZalGen.csproj
@@ -1,83 +1,12 @@
-
-
-
+
- Debug
- AnyCPU
- {5F66EB15-54FD-4B45-92E7-EDA1070D867F}
+ netcoreapp3.1
WinExe
- Zalgen
- ZalGen
- v4.8
- 512
- true
- true
+ false
+ true
+ false
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
+
+ if exist "$(SolutionDir)Data\pkgtool.exe" ($(SolutionDir)Data\pkgtool.exe build --noLogo --binDir .) else if exist "%appdata%\UpTool2\Apps\0e35d154-d0d3-45e0-b080-62f521263a44\app\pkgtool.exe" ("%appdata%\UpTool2\Apps\0e35d154-d0d3-45e0-b080-62f521263a44\app\pkgtool.exe" build --noLogo --binDir .) else echo Cound not find Package build tools, skipping
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Form
-
-
- Form1.cs
-
-
-
-
- Form1.cs
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
- Designer
-
-
- True
- Resources.resx
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
- True
- Settings.settings
- True
-
-
-
-
-
-
\ No newline at end of file