forked from Paril/mcskin3d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MCSkin3DAppContext.cs
45 lines (38 loc) · 1.01 KB
/
MCSkin3DAppContext.cs
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
using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using MCSkin3D.Forms;
namespace MCSkin3D
{
class MCSkin3DAppContext : ApplicationContext
{
public Form Form;
public Splash SplashForm;
public UpdateSystem.UpdateChecker Updater;
public MCSkin3DAppContext()
{
Program.Context = this;
Environment.CurrentDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
GlobalSettings.Load();
try
{
if (Directory.Exists(GlobalSettings.GetDataURI("__updateFiles")))
Directory.Delete(GlobalSettings.GetDataURI("__updateFiles"), true);
}
catch
{
}
SplashForm = new Splash();
Updater = new UpdateSystem.UpdateChecker("http://alteredsoftworks.com/mcskin3d/update");
Form = new Editor();
Form.FormClosing += (sender, e) => GlobalSettings.Save();
Form.FormClosed += (sender, e) => ExitThread();
SplashForm.Show();
}
public void DoneLoadingSplash()
{
Form.Show();
}
}
}