-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
129 lines (123 loc) · 4.41 KB
/
Program.cs
File metadata and controls
129 lines (123 loc) · 4.41 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
using System;
using System.Diagnostics;
using System.IO;
using SSXMultiTool.Utilities;
using SSXLibrary.JsonFiles.Tricky;
using SSXLibrary;
namespace SSXMultiTool
{
internal static class Program
{
public static string Version = "0.2.0";
public static bool Start = true;
public static SSXMultitoolHubpage hubpage = new SSXMultitoolHubpage();
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
if (args.Length == 0)
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(hubpage);
}
else
{
if (args[0].ToLower().Contains(".big"))
{
if(File.Exists(args[0]))
{
ApplicationConfiguration.Initialize();
Application.Run(new BigArchiveTool(args[0]));
}
}
if (args[0].ToLower().Contains(".ssh"))
{
if (File.Exists(args[0]))
{
ApplicationConfiguration.Initialize();
Application.Run(new SSHImageTools(args[0]));
}
}
if (args[0].ToLower()=="big")
{
BigLaunchOptions(args);
}
if(args[0].ToLower() == "trickylevel")
{
SSXTrickyProjectBuild(args);
}
}
}
static void BigLaunchOptions(string[] args)
{
if(args.Length == 1)
{
ApplicationConfiguration.Initialize();
Application.Run(new BigArchiveTool());
}
else
{
MessageBox.Show("Unknown Arguments");
}
}
static void SSXTrickyProjectBuild(string[] args)
{
if(args.Length==1)
{
ApplicationConfiguration.Initialize();
Application.Run(new TrickyProjectWindow());
}
else
{
if (args[1].ToLower() == "trickybuild")
{
if (Directory.Exists(args[2]))
{
ConsoleWindow.GenerateConsole();
try
{
SSXTrickyConfig config = new SSXTrickyConfig();
config = SSXTrickyConfig.Load(args[2]+ "/ConfigTricky.ssx");
if (args.Length < 4)
{
if (config.BuildPath != "")
{
TrickyLevelInterface trickyLevelInterface = new TrickyLevelInterface();
trickyLevelInterface.BuildTrickyLevelFiles(args[2], config.BuildPath);
MessageBox.Show("Level Built");
}
else
{
MessageBox.Show("Please Build Project Once to Set Build Path or provide a build path");
}
}
else
{
TrickyLevelInterface trickyLevelInterface = new TrickyLevelInterface();
trickyLevelInterface.BuildTrickyLevelFiles(args[2], args[3]);
MessageBox.Show("Level Built");
}
}
catch
{
MessageBox.Show("Unknown Error Building");
}
ConsoleWindow.CloseConsole();
}
else
{
MessageBox.Show("Unknown Input Path");
}
}
else
{
MessageBox.Show("Unknown Arguments");
}
}
}
}
}