Skip to content

Commit 3834b1d

Browse files
authored
Massive Update
1 parent 1de5fc3 commit 3834b1d

13 files changed

+1831
-565
lines changed

Helper.cs

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.IO;
34
using System.Linq;
45
using System.Text;
56
using System.Threading.Tasks;
@@ -28,9 +29,73 @@ public static void Indent(TextBox tb, bool indent)
2829
{
2930
if(indent)
3031
{
31-
tb.AppendText(" ");
32+
tb.AppendText(" ");
3233
}
3334
}
3435

36+
public static void DeleteIndent(TextBox tb, int charToDelete)
37+
{
38+
tb.Focus();
39+
40+
for (int i = 0; i < charToDelete; i++)
41+
{
42+
SendKeys.Send("{DELETE}");
43+
}
44+
}
45+
46+
public static String fileParse()
47+
{
48+
49+
List<String> final = new List<String>();
50+
String fs = String.Empty;
51+
52+
using (OpenFileDialog fd = new OpenFileDialog())
53+
{
54+
fd.InitialDirectory = Application.StartupPath;
55+
fd.Filter = "ahk files (*.ahk)|*.ahk";
56+
fd.FilterIndex = 1;
57+
fd.RestoreDirectory = true;
58+
59+
if (fd.ShowDialog() == DialogResult.OK)
60+
{
61+
fs = fd.FileName;
62+
}
63+
}
64+
65+
return fs;
66+
}
67+
68+
public static void WriteToBox(CheckBox insertCheck, CheckBox newLineCheck, CheckBox sendCheck, String toPut, TextBox textBox, int position)
69+
{
70+
StringBuilder sb = new StringBuilder();
71+
String newLine = String.Empty;
72+
String send = String.Empty;
73+
74+
75+
if (newLineCheck.Checked)
76+
{
77+
newLine = "\r\n";
78+
}
79+
80+
if (sendCheck.Checked)
81+
{
82+
send = "Send, ";
83+
}
84+
85+
sb.Append(send);
86+
sb.Append(toPut);
87+
sb.Append(newLine);
88+
89+
if (insertCheck.Checked)
90+
{
91+
textBox.Text = textBox.Text.Insert(position, sb.ToString());
92+
}
93+
else
94+
{
95+
textBox.AppendText(toPut);
96+
}
97+
}
98+
99+
35100
}
36101
}

Main.Designer.cs

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

0 commit comments

Comments
 (0)