public void InitUI(MainEditorForm inEditorForm)
 {
     EditorForm        = inEditorForm;
     CurrentEditorMode = EditorModes.BaseReadOnly;
     //ReloadData();
 }
        static void Main()
        {
            //UNCOMMENT TO RUN THE LOAD CODE GENERATOR (most of the source files in /Data/) you can find the results alongside the exe
            //VD2LoadCodeGenerator.GenerateCodeFilesFromXMLFiles();


            //UNCOMMENT TO RUN TAG NAME REPORTS ON THE BASE DATA, creates human readable versions of the information the code generator goes off.
            //results can be found as extensionless text files alongside the exe
            //C:\Steam\steamapps\common\Void Destroyer 2\Data\Ships\Destroyers
            //ShipData mendozadata = new ShipData("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\Destroyers\\Mendoza.xml");

            /*List<Dictionary<string, TagNameReportEntry>> rootreports = new List<Dictionary<string, TagNameReportEntry>>();
             * List<Dictionary<string, Dictionary<string, TagNameReportEntry>>> childreports = new List<Dictionary<string, Dictionary<string, TagNameReportEntry>>>();
             * Dictionary<string, TagNameReportEntry> fighterroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> fighterchildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\Fighters", "FightersReport", out fighterroottagresults, out fighterchildtagresults);
             * rootreports.Add(fighterroottagresults);
             * childreports.Add(fighterchildtagresults);
             * Dictionary<string, TagNameReportEntry> droneroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> dronechildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\Drones", "DronesReport", out droneroottagresults, out dronechildtagresults);
             * rootreports.Add(droneroottagresults);
             * childreports.Add(dronechildtagresults);
             * Dictionary<string, TagNameReportEntry> gunshiproottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> gunshipchildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\GunShips", "GunshipsReport", out gunshiproottagresults, out gunshipchildtagresults);
             * rootreports.Add(gunshiproottagresults);
             * childreports.Add(gunshipchildtagresults);
             * Dictionary<string, TagNameReportEntry> corvetteroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> corvettechildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\Corvettes", "CorvettesReport", out corvetteroottagresults, out corvettechildtagresults);
             * rootreports.Add(corvetteroottagresults);
             * childreports.Add(corvettechildtagresults);
             * Dictionary<string, TagNameReportEntry> frigateroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> frigatechildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\Frigates", "FrigatesReport", out frigateroottagresults, out frigatechildtagresults);
             * rootreports.Add(frigateroottagresults);
             * childreports.Add(frigatechildtagresults);
             * Dictionary<string, TagNameReportEntry> destroyerroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> destroyerchildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\Destroyers", "DestroyersReport", out destroyerroottagresults, out destroyerchildtagresults);
             * rootreports.Add(destroyerroottagresults);
             * childreports.Add(destroyerchildtagresults);
             * Dictionary<string, TagNameReportEntry> cruiserroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> cruiserchildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\Cruisers", "CruisersReport", out cruiserroottagresults, out cruiserchildtagresults);
             * rootreports.Add(cruiserroottagresults);
             * childreports.Add(cruiserchildtagresults);
             * Dictionary<string, TagNameReportEntry> carrierroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> carrierchildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\Carriers", "CarriersReport", out carrierroottagresults, out carrierchildtagresults);
             * rootreports.Add(carrierroottagresults);
             * childreports.Add(carrierchildtagresults);
             * Dictionary<string, TagNameReportEntry> dreadroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> dreadchildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\Dread", "DreadnaughtsReport", out dreadroottagresults, out dreadchildtagresults);
             * rootreports.Add(dreadroottagresults);
             * childreports.Add(dreadchildtagresults);
             * ParseHelpers.CombinedTagReport(rootreports, childreports, "ShipsTotalReport");
             * rootreports.Clear();
             * childreports.Clear();
             * Dictionary<string, TagNameReportEntry> primaryupgraderoottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> primaryupgradechildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\Upgrades", "PrimaryUpgradesReport", out primaryupgraderoottagresults, out primaryupgradechildtagresults);
             * rootreports.Add(primaryupgraderoottagresults);
             * childreports.Add(primaryupgradechildtagresults);
             * Dictionary<string, TagNameReportEntry> activeupgraderoottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> activeupgradechildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Ships\\Upgrades\\Active", "ActiveUpgradesReport", out activeupgraderoottagresults, out activeupgradechildtagresults);
             * rootreports.Add(activeupgraderoottagresults);
             * childreports.Add(activeupgradechildtagresults);
             * ParseHelpers.CombinedTagReport(rootreports, childreports, "UpgradesTotalReport");
             * rootreports.Clear();
             * childreports.Clear();
             * Dictionary<string, TagNameReportEntry> weaponsroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> weaponschildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Weapons", "WeaponsReport", out weaponsroottagresults, out weaponschildtagresults);
             * rootreports.Add(weaponsroottagresults);
             * childreports.Add(weaponschildtagresults);
             * Dictionary<string, TagNameReportEntry> ammoroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> ammochildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Weapons\\Ammo", "AmmoReport", out ammoroottagresults, out ammochildtagresults);
             * rootreports.Add(ammoroottagresults);
             * childreports.Add(ammochildtagresults);
             * Dictionary<string, TagNameReportEntry> hangarsroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> hangarschildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Weapons\\Hangars", "HangarsReport", out hangarsroottagresults, out hangarschildtagresults);
             * rootreports.Add(hangarsroottagresults);
             * childreports.Add(hangarschildtagresults);
             * Dictionary<string, TagNameReportEntry> launchersroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> launcherschildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Weapons\\Launchers", "LaunchersReport", out launchersroottagresults, out launcherschildtagresults);
             * rootreports.Add(launchersroottagresults);
             * childreports.Add(launcherschildtagresults);
             * Dictionary<string, TagNameReportEntry> Minesroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> Mineschildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Weapons\\Mines", "MinesReport", out Minesroottagresults, out Mineschildtagresults);
             * rootreports.Add(Minesroottagresults);
             * childreports.Add(Mineschildtagresults);
             * Dictionary<string, TagNameReportEntry> Missilesroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> Missileschildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Weapons\\Missiles", "MissilesReport", out Missilesroottagresults, out Missileschildtagresults);
             * rootreports.Add(Missilesroottagresults);
             * childreports.Add(Missileschildtagresults);
             * Dictionary<string, TagNameReportEntry> Turretsroottagresults = new Dictionary<string, TagNameReportEntry>();
             * Dictionary<string, Dictionary<string, TagNameReportEntry>> Turretschildtagresults = new Dictionary<string, Dictionary<string, TagNameReportEntry>>();
             * ParseHelpers.GetTagNameListWithUseNumberReportFromXMLFiles("C:\\Steam\\steamapps\\common\\Void Destroyer 2\\Data\\Weapons\\Turrets", "TurretsReport", out Turretsroottagresults, out Turretschildtagresults);
             * rootreports.Add(Turretsroottagresults);
             * childreports.Add(Turretschildtagresults);
             * ParseHelpers.CombinedTagReport(rootreports, childreports, "WeaponsTotalReport");*/

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new MainEditorForm());

            /*OgreRenderer.Renderer.InitOgre();
             *
             * if (OgreRenderer.Renderer.OgreRoot == null)
             * {
             *  return;
             * }*/

            SplashScreenForm splash     = new SplashScreenForm();
            DialogResult     initresult = splash.ShowDialog();

            if (initresult == DialogResult.Abort)
            {
                return;
            }


            MainEditorForm mainform = new MainEditorForm();

            //Application.Run(mainform);
            mainform.Show();


            while (OgreRenderer.Renderer.EditorRS.IsActive() && OgreRenderer.Renderer.EditorRS.Render())
            {
                Application.DoEvents();
            }
        }