-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCode-Snips.txt
76 lines (64 loc) · 2.35 KB
/
Code-Snips.txt
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Launch Button
string arma3Path;
string selectedMods;
// string steamFolder64 = @"C:\Program Files (x86)\Steam\steamapps\common\Arma 3";
// string steamFolder32 = @"C:\Program Files\Steam\steamapps\common\Arma 3";
if (IntPtr.Size == 8)
{
//arma3Path = steamFolder64 + "arma3.exe";
arma3Path = @"C:\Program Files (x86)\Steam\steamapps\common\Arma 3\arma3.exe";
}
else
{
//arma3Path = steamFolder32 + "arma3.exe";
arma3Path = @"C:\Program Files\Steam\steamapps\common\Arma 3\arma3.exe";
}
if (ckb4thID.Checked && !ckbCba3a.Checked)
{
selectedMods = "-mod=@4thID;";
}
else if (ckbCba3a.Checked && !ckb4thID.Checked)
{
selectedMods = "-mod=@CBA_A3;";
}
else if (ckb4thID.Checked && ckbCba3a.Checked)
{
selectedMods = "-mod=@4thID; -mod=@CBA_A3;";
}
else
{
selectedMods = "";
}
// Error Catching
// If No Mod Radio Button is Checked
if (rdoNomod.Checked)
{
// Start Game
Process.Start(arma3Path);
}
// If With Mod Radio Button is Checked
else if (rdoMod.Checked)
{
if (!ckb4thID.Checked && !ckbCba3a.Checked)
{
MessageBox.Show("Error No Mods Selected.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
else
{
// Start Game With Mods
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = arma3Path;
// WORK IN PROGRESS
info.Arguments = selectedMods;
Process.Start(info);
}
}
if (chkPlayClose.Checked)
{
this.Close();
}
if (ckbxlSMods.CheckedItems != null)
{
foreach (string s in ckbxlSMods.CheckedItems)
selectedMods = "-mod=" + s + ";";
}