This commit is contained in:
Michael Becker 2019-09-24 15:58:24 -04:00
parent 4912b59a8e
commit 40cd38911d
2 changed files with 21 additions and 27 deletions

View File

@ -46,6 +46,11 @@ namespace UniversalEditor.UserInterface
System.Threading.Thread.Sleep(500);
}
splasher.Hide();
AfterInitializationInternal();
AfterInitialization();
OpenWindow(SelectedFileNames.ToArray<string>());
}
#region implemented abstract members of Engine
@ -1428,11 +1433,6 @@ namespace UniversalEditor.UserInterface
Initialize();
AfterInitializationInternal();
AfterInitialization();
OpenWindow(SelectedFileNames.ToArray<string>());
MainLoop();
SessionManager.Save();

View File

@ -47,38 +47,28 @@ namespace UniversalEditor.UserInterface
// this.Controls.Add(lbl, new BoxLayout.Constraints(true, true));
}
private static bool created = false;
protected override void OnCreated(EventArgs e)
protected override void OnRealize(EventArgs e)
{
base.OnRealize(e);
OnShown(e);
}
private static bool created = false;
protected override void OnMapped(EventArgs e)
{
base.OnMapped(e);
if (created) return;
created = true;
// less do this
Application.ShortName = "mbs-editor";
// Application.Title = "Universal Editor";
Application.DoEvents();
// Initialize the XML files before anything else, since this also loads string tables needed
// to display the application title
Engine.CurrentEngine.InitializeXMLConfiguration();
System.Threading.Thread threadLoader = new System.Threading.Thread(threadLoader_ThreadStart);
threadLoader.Name = "Initialization Thread";
threadLoader.Start();
}
public void SetStatus(string message, int progressValue, int progressMinimum, int progressMaximum)
{
}
private void threadLoader_ThreadStart()
{
/*
if (Configuration.SplashScreen.Enabled)
{
while (splasher == null) System.Threading.Thread.Sleep(500);
}
*/
Engine.CurrentEngine.UpdateSplashScreenStatus("Loading object models...");
UniversalEditor.Common.Reflection.GetAvailableObjectModels();
@ -96,9 +86,13 @@ created = true;
// Initialize Session Manager
Engine.CurrentEngine.SessionManager.DataFileName = Engine.DataPath + System.IO.Path.DirectorySeparatorChar.ToString() + "Sessions.xml";
Engine.CurrentEngine.SessionManager.Load();
Engine.CurrentEngine.HideSplashScreen();
}
public void SetStatus(string message, int progressValue, int progressMinimum, int progressMaximum)
{
}
}