muddesigner/Project Manager/Program.cs
Scionwest_cp 1cc477f23c MUD Engine:
- Changed ValidateProjectPath to ValidateDataPaths. Now can use the engines current install location if a path is not supplied
 - ValidateDataPaths iterates through a new enumerator containing all of the data paths, and creates the directories if they dont exist.
 - GetDataPath method added for returning the absolute path to any of the save directories specified in the argument.
 - BaseObject now contains a readonly Filename property that returns the objects Name with it's Type assigned as the files extension.
 - BaseObject's Script property was added.
 - Room.StatDrain re-added. Changed property Type to boolean instead of custom struct.
 - Room Designer's constructor code was refracted to help clean it up. Plugin loading, doorway list compiling and room setup is now contained in three different methods.
 - Room Designer can now Save scripts.
 - Room Designer now has default scripts generated.
 - Changing the Object Management tabs to 'Script' now refreshes the script to display correctly.
 - Room Designer now accepts a single argument for specifying the name of a room to Load. Use "room=Room Name.room" as the syntax.
 - Room loading is implemented, but only via a supplied argument during application launch.
2009-11-25 21:21:50 -08:00

43 lines
1.3 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.
MUDEngine.Engine.ValidateDataPaths();
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);
}
}
}