This repository was archived by the owner on Feb 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathYGOProHelper.cs
More file actions
60 lines (52 loc) · 1.31 KB
/
YGOProHelper.cs
File metadata and controls
60 lines (52 loc) · 1.31 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
59
60
using System.Diagnostics;
using System.Windows.Forms;
namespace ReDevPro
{
public static class YGOProHelper
{
private static void Open(string args = "")
{
try
{
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo(Config.GetString("YGOProEXE","ygopro.exe"), args)
{
UseShellExecute = false,
WindowStyle = ProcessWindowStyle.Normal
};
process.StartInfo = startInfo;
process.EnableRaisingEvents = true;
process.Start();
}
catch
{
MessageBox.Show("Unable to find YGOPro", "Missing File");
}
}
public static void OpenDeckEdit()
{
Open("-d");
}
public static void OpenOffline()
{
Open();
}
public static void OpenReplays()
{
Open("-r");
}
public static void OpenSingle()
{
Open("-s");
}
public static void OpenAI()
{
Open("-ai");
}
public static void OpenDuel()
{
Config.SaveConfig();
Open("-c");
}
}
}