forked from SolarLiner/kOS-IDE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
32 lines (28 loc) · 981 Bytes
/
Program.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace kOS_IDE
{
static class Program
{
/// <summary>
/// Point d'entrée principal de l'application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
OpenedForms.Init();
Application.ApplicationExit += new EventHandler(Application_ApplicationExit);
try { AppOptions.Load("./config.cfg"); }
catch { AppOptions.Default(); MessageBox.Show("Cannot load config file. Loading factory default ...", "IO Error", MessageBoxButtons.OK, MessageBoxIcon.Information); }
Application.Run(new TextEditor());
}
static void Application_ApplicationExit(object sender, EventArgs e)
{
AppOptions.Save("config.cfg");
}
}
}