Skip to content

Commit 32f08f2

Browse files
committed
Changed variable names
1 parent f3079dc commit 32f08f2

14 files changed

+106
-106
lines changed

.vs/EasyBot/v16/.suo

0 Bytes
Binary file not shown.
32 KB
Binary file not shown.
2.54 MB
Binary file not shown.

Models/BotAction.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ namespace EasyBot.Classes
88
{
99
public class BotAction
1010
{
11-
public int Delay { get; set; }
11+
public int delay { get; set; }
1212

13-
public string Name { get; set; }
13+
public string name { get; set; }
1414

15-
public string DisplayColor { get; set; }
15+
public string displayColor { get; set; }
1616
}
1717
}

Models/KeyBoardBotAction.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ namespace EasyBot.Classes
99
public class KeyBoardBotAction : BotAction
1010
{
1111

12-
public string Text { get; set; }
12+
public string text { get; set; }
1313

14-
public KeyBoardBotAction(string Text, int Delay)
14+
public KeyBoardBotAction(string text, int delay)
1515
{
16-
this.Text = Text;
17-
this.Delay = Delay;
18-
this.Name = "Text: \"" + Text + "\"";
19-
this.DisplayColor = "#1dd1a1";
16+
this.text = text;
17+
this.delay = delay;
18+
this.name = "Text: \"" + text + "\"";
19+
this.displayColor = "#1dd1a1";
2020
}
2121

2222
}

Models/MouseBotAction.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ namespace EasyBot.Classes
99
public class MouseBotAction : BotAction
1010
{
1111

12-
public int X, Y;
13-
public bool Left_Click { get; set; }
12+
public int x, y;
13+
public bool leftClick { get; set; }
1414

15-
public MouseBotAction(int X, int Y, bool Left_Click, int Delay)
15+
public MouseBotAction(int x, int y, bool leftClick, int delay)
1616
{
17-
this.X = X;
18-
this.Y = Y;
19-
this.Left_Click = Left_Click;
20-
this.Delay = Delay;
21-
this.Name = Name;
17+
this.x = x;
18+
this.y = y;
19+
this.leftClick = leftClick;
20+
this.delay = delay;
21+
this.name = name;
2222

23-
if (Left_Click)
23+
if (leftClick)
2424
{
25-
DisplayColor = "#74b9ff";
26-
Name = "Leftclick";
25+
displayColor = "#74b9ff";
26+
name = "Leftclick";
2727
}
2828
else
2929
{
30-
DisplayColor = "#e84393";
31-
Name = "Rightclick";
30+
displayColor = "#e84393";
31+
name = "Rightclick";
3232
}
3333
}
3434

Views/CreateKeyboardActionWindow.xaml.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ private void TextBox_Delay_PreviewTextInput(object sender, TextCompositionEventA
2929

3030
private void Button_Create_Click(object sender, RoutedEventArgs e)
3131
{
32-
string Text = TextBox_Text.Text;
32+
string text = TextBox_Text.Text;
3333

34-
int Delay;
34+
int delay;
3535

3636
try{
37-
Delay = Convert.ToInt32(TextBox_Delay.Text);
37+
delay = Convert.ToInt32(TextBox_Delay.Text);
3838
}
3939
catch
4040
{
41-
Delay = 0;
41+
delay = 0;
4242
}
4343

44-
KeyBoardBotAction keyBoardBotAction = new KeyBoardBotAction(Text, Delay);
44+
KeyBoardBotAction keyBoardBotAction = new KeyBoardBotAction(text, delay);
4545

4646
MainWindow.AddBotAction(keyBoardBotAction);
4747

Views/CreateMouseActionWindow.xaml.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace EasyBot.Views
1414
public partial class CreateMouseActionWindow : Window
1515
{
1616

17-
bool SetMouseLocation = false;
17+
bool setMouseLocation = false;
1818

1919

2020
public CreateMouseActionWindow()
@@ -41,30 +41,30 @@ private void SetPosition(int x, int y)
4141

4242
private void Button_Create_Click(object sender, RoutedEventArgs e)
4343
{
44-
int X = Convert.ToInt32(Label_X_Value.Content);
45-
int Y = Convert.ToInt32(Label_Y_Value.Content);
46-
int Delay;
47-
bool Left_Click;
44+
int x = Convert.ToInt32(Label_X_Value.Content);
45+
int y = Convert.ToInt32(Label_Y_Value.Content);
46+
int delay;
47+
bool leftClick;
4848

4949
try
5050
{
51-
Delay = Convert.ToInt32(TextBox_Delay.Text);
51+
delay = Convert.ToInt32(TextBox_Delay.Text);
5252
}
5353
catch
5454
{
55-
Delay = 0;
55+
delay = 0;
5656
}
5757

5858
if ((bool)RadioButton_Leftclick.IsChecked)
5959
{
60-
Left_Click = true;
60+
leftClick = true;
6161
}
6262
else
6363
{
64-
Left_Click = false;
64+
leftClick = false;
6565
}
6666

67-
MouseBotAction mouseBotAction = new MouseBotAction(X, Y, Left_Click, Delay);
67+
MouseBotAction mouseBotAction = new MouseBotAction(x, y, leftClick, delay);
6868

6969
MainWindow.AddBotAction(mouseBotAction);
7070

@@ -76,36 +76,36 @@ private void Button_Create_Click(object sender, RoutedEventArgs e)
7676

7777
private void Button_SetLocation_Click(object sender, RoutedEventArgs e)
7878
{
79-
SetMouseLocation = true;
79+
setMouseLocation = true;
8080
Label_SetLocationInfo.Visibility = Visibility.Visible;
8181

8282

8383
}
8484

8585
private void Window_KeyDown(object sender, KeyEventArgs e)
8686
{
87-
if(e.Key == Key.F8 && SetMouseLocation)
87+
if(e.Key == Key.F8 && setMouseLocation)
8888
{
8989

90-
System.Drawing.Point MousePositionPoint = wf.Control.MousePosition;
90+
System.Drawing.Point mousePositionPoint = wf.Control.MousePosition;
9191

92-
Label_X_Value.Content = MousePositionPoint.X.ToString();
93-
Label_Y_Value.Content = MousePositionPoint.Y.ToString();
92+
Label_X_Value.Content = mousePositionPoint.X.ToString();
93+
Label_Y_Value.Content = mousePositionPoint.Y.ToString();
9494

9595
Label_SetLocationInfo.Visibility = Visibility.Collapsed;
9696

97-
SetMouseLocation = false;
97+
setMouseLocation = false;
9898
}
9999
}
100100

101101

102102
private void Button_TestLocation_Click(object sender, RoutedEventArgs e)
103103
{
104104

105-
int X = Convert.ToInt32(Label_X_Value.Content);
106-
int Y = Convert.ToInt32(Label_Y_Value.Content);
105+
int x = Convert.ToInt32(Label_X_Value.Content);
106+
int y = Convert.ToInt32(Label_Y_Value.Content);
107107

108-
SetPosition(X, Y);
108+
SetPosition(x, y);
109109

110110
}
111111

Views/KeyBoardBotActionSettings.xaml.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ public KeyBoardBotActionSettings(KeyBoardBotAction keyBoardBotAction)
1414
{
1515
InitializeComponent();
1616

17-
TextBox_Text.Text = keyBoardBotAction.Text;
17+
TextBox_Text.Text = keyBoardBotAction.text;
1818

19-
TextBox_Delay.Text = keyBoardBotAction.Delay.ToString();
19+
TextBox_Delay.Text = keyBoardBotAction.delay.ToString();
2020

2121
Button_Close.Click += (s, e) => Close();
2222

@@ -27,20 +27,20 @@ public KeyBoardBotActionSettings(KeyBoardBotAction keyBoardBotAction)
2727
private void Button_Save_Click(object sender, RoutedEventArgs e)
2828
{
2929

30-
string Text = TextBox_Text.Text;
30+
string text = TextBox_Text.Text;
3131

32-
int Delay;
32+
int delay;
3333

3434
try
3535
{
36-
Delay = Convert.ToInt32(TextBox_Delay.Text);
36+
delay = Convert.ToInt32(TextBox_Delay.Text);
3737
}
3838
catch
3939
{
40-
Delay = 0;
40+
delay = 0;
4141
}
4242

43-
KeyBoardBotAction keyBoardBotAction = new KeyBoardBotAction(Text, Delay);
43+
KeyBoardBotAction keyBoardBotAction = new KeyBoardBotAction(text, delay);
4444

4545
MainWindow.ChangeBotAction(keyBoardBotAction);
4646

Views/MainWindow.xaml.cs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ namespace EasyBot.Views
1313
public partial class MainWindow : Window
1414
{
1515

16-
private static List<BotAction> Actions = new List<BotAction>();
16+
private static List<BotAction> actions = new List<BotAction>();
1717

1818
public static ListBox listBox;
1919

20-
public static int Loops = 0;
20+
public static int loops = 0;
2121

22-
public static int Delay = 0;
22+
public static int delay = 0;
2323

2424
public MainWindow()
2525
{
@@ -32,7 +32,7 @@ public MainWindow()
3232

3333
listBox = ListBox_Actions;
3434

35-
listBox.ItemsSource = Actions;
35+
listBox.ItemsSource = actions;
3636

3737
}
3838

@@ -44,7 +44,7 @@ private void Button_Add_Click(object sender, RoutedEventArgs e)
4444

4545
public static void AddBotAction(BotAction botAction)
4646
{
47-
Actions.Add(botAction);
47+
actions.Add(botAction);
4848
}
4949

5050
public static void RefreshListBox()
@@ -60,13 +60,13 @@ private void Button_UP_Click(object sender, RoutedEventArgs e)
6060

6161
if(ListBox_Actions.SelectedIndex != -1 && ListBox_Actions.SelectedIndex != 0) {
6262

63-
int NewIndex = ListBox_Actions.SelectedIndex - 1;
63+
int newIndex = ListBox_Actions.SelectedIndex - 1;
6464

6565
BotAction botAction = (BotAction) ListBox_Actions.SelectedItem;
6666

67-
Actions.Remove(botAction);
67+
actions.Remove(botAction);
6868

69-
Actions.Insert(NewIndex, botAction);
69+
actions.Insert(newIndex, botAction);
7070

7171

7272
RefreshListBox();
@@ -76,16 +76,16 @@ private void Button_UP_Click(object sender, RoutedEventArgs e)
7676

7777
private void Button_DOWN_Click(object sender, RoutedEventArgs e)
7878
{
79-
if(ListBox_Actions.SelectedIndex != -1 && ListBox_Actions.SelectedIndex != Actions.Count - 1)
79+
if(ListBox_Actions.SelectedIndex != -1 && ListBox_Actions.SelectedIndex != actions.Count - 1)
8080
{
8181

82-
int NewIndex = ListBox_Actions.SelectedIndex + 1;
82+
int newIndex = ListBox_Actions.SelectedIndex + 1;
8383

8484
BotAction botAction = (BotAction)ListBox_Actions.SelectedItem;
8585

86-
Actions.Remove(botAction);
86+
actions.Remove(botAction);
8787

88-
Actions.Insert(NewIndex, botAction);
88+
actions.Insert(newIndex, botAction);
8989

9090
RefreshListBox();
9191

@@ -126,19 +126,19 @@ public static void ChangeBotAction(BotAction botAction)
126126

127127
listBox.SelectedItem = botAction;
128128

129-
int Index = listBox.SelectedIndex;
129+
int index = listBox.SelectedIndex;
130130

131-
Actions.Remove((BotAction)listBox.SelectedItem);
131+
actions.Remove((BotAction)listBox.SelectedItem);
132132

133-
Actions.Insert(Index, botAction);
133+
actions.Insert(index, botAction);
134134

135135
RefreshListBox();
136136

137137
}
138138

139139
public static void DeleteBotAction()
140140
{
141-
Actions.Remove((BotAction)listBox.SelectedItem);
141+
actions.Remove((BotAction)listBox.SelectedItem);
142142

143143
RefreshListBox();
144144
}
@@ -179,40 +179,40 @@ private void Button_Start_Click(object sender, RoutedEventArgs e)
179179

180180
this.Hide();
181181

182-
if (Actions.Count >= 1)
182+
if (actions.Count >= 1)
183183
{
184-
Thread.Sleep(Delay);
184+
Thread.Sleep(delay);
185185

186-
for(int l = 0; l <= Loops; l++) {
186+
for(int l = 0; l <= loops; l++) {
187187

188-
for (int i = 0; i <= Actions.Count - 1; i++)
188+
for (int i = 0; i <= actions.Count - 1; i++)
189189
{
190-
if (Actions[i] is MouseBotAction)
190+
if (actions[i] is MouseBotAction)
191191
{
192-
MouseBotAction mouseBotAction = (MouseBotAction)Actions[i];
192+
MouseBotAction mouseBotAction = (MouseBotAction)actions[i];
193193

194-
int X = mouseBotAction.X;
195-
int Y = mouseBotAction.Y;
194+
int x = mouseBotAction.x;
195+
int y = mouseBotAction.y;
196196

197-
if (mouseBotAction.Left_Click)
197+
if (mouseBotAction.leftClick)
198198
{
199-
LeftMouseClick(X, Y);
199+
LeftMouseClick(x, y);
200200
}
201201
else
202202
{
203-
RightMouseClick(X, Y);
203+
RightMouseClick(x, y);
204204
}
205205
}
206-
else if (Actions[i] is KeyBoardBotAction)
206+
else if (actions[i] is KeyBoardBotAction)
207207
{
208-
KeyBoardBotAction keyBoardBotAction = (KeyBoardBotAction)Actions[i];
208+
KeyBoardBotAction keyBoardBotAction = (KeyBoardBotAction)actions[i];
209209

210210
InputSimulator inputSimulator = new InputSimulator();
211211

212-
inputSimulator.Keyboard.TextEntry(keyBoardBotAction.Text);
212+
inputSimulator.Keyboard.TextEntry(keyBoardBotAction.text);
213213
}
214214

215-
Thread.Sleep(Actions[i].Delay);
215+
Thread.Sleep(actions[i].delay);
216216
}
217217
}
218218
}

0 commit comments

Comments
 (0)