This repository was archived by the owner on Mar 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathposSelector.cs
More file actions
58 lines (49 loc) · 1.55 KB
/
posSelector.cs
File metadata and controls
58 lines (49 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace GFBattleTester
{
public partial class posSelector : Form
{
int selpos = 0;
int num = 0;
public posSelector(Control c, int p, int n)
{
InitializeComponent();
this.Text = string.Format(Form1.frm.lang_data["posselector_title"].ToString(), n.ToString());
selpos = p;
num = n;
}
private void PosSelector_Load(object sender, EventArgs e)
{
for(int i=1; i <= 9; i++)
{
if(i == selpos)
{
Button button = (Button)Controls.Find("button" + i.ToString(), true)[0];
button.BackColor = ColorTranslator.FromHtml("#ff6542");
button.Select();
}
}
}
private void Button_Click(object sender, EventArgs e)
{
Control _sender = (Control)sender;
for (int i = 1; i <= 5; i++)
{
if(num == i)
{
NumericUpDown Num = (NumericUpDown)Form1.frm.Controls.Find("gunpos_" + i.ToString() + "_number", true)[0];
Num.Value = decimal.Parse(_sender.Name.Replace("button", ""));
}
}
Close();
}
}
}