muddesigner/Project Manager/Program.cs
Scionwest_cp 2a8c023aca Room Designer:
* New Project added.

Mud HUB:
 * Moved ExecuteApp method from frmMain.cs to Program.cs
2009-11-07 10:29:00 -08:00

43 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using MUDEngine;
using MUDEngine.Objects;
using MUDEngine.Objects.Environment;
using MUDEngine.FileSystem;
namespace Project_Manager
{
static class Program
{
internal static MUDEngine.ProjectInformation project;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
//Make sure all our paths are created before we start working with the editor.
Engine.ValidateProjectPath(Application.StartupPath);
FileSystem.FileType = FileSystem.OutputFormats.XML;
project = new ProjectInformation();
//check if a project file exists, or use the new instance
if (System.IO.File.Exists(Application.StartupPath + @"\Data\project.xml"))
{
project = (ProjectInformation)FileSystem.Load(Application.StartupPath + @"\Data\project.xml", project);
}
//run the app
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain());
FileSystem.Save(Application.StartupPath + @"\Data\project.xml", project);
}
}
}