diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-20 19:43:15 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-20 19:43:15 +0300 |
| commit | 51afc4f6a17383e91a72c2ce060e82604d43c3a8 (patch) | |
| tree | c0aa029d9864fc8f03b69716a42eda5efe65ccd5 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication | |
| parent | 2ea6653199844f5607d17a8912eb7a99e2471610 (diff) | |
| download | Tango-51afc4f6a17383e91a72c2ce060e82604d43c3a8.tar.gz Tango-51afc4f6a17383e91a72c2ce060e82604d43c3a8.zip | |
Working on new Machine Studio DB.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs index ee9337eb3..b8e6e1670 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -43,21 +43,10 @@ namespace Tango.MachineStudio.UI.StudioApplication _navigationManager = navigationManager; _openedWindows = new List<Window>(); - Task.Factory.StartNew(() => + Application.Current.MainWindow.ContentRendered += (_, __) => { - while (MainWindow.Instance == null) - { - Thread.Sleep(100); - } - - InvokeUI(() => - { - MainWindow.Instance.ContentRendered += (_, __) => - { - TangoIOC.Default.GetAllInstancesByBase<IStudioViewModel>().ToList().ForEach(x => x.OnApplicationStarted()); - }; - }); - }); + TangoIOC.Default.GetAllInstancesByBase<IStudioViewModel>().ToList().ForEach(x => x.OnApplicationStarted()); + }; } /// <summary> @@ -305,5 +294,10 @@ namespace Tango.MachineStudio.UI.StudioApplication return EmbeddedResourceHelper.GetEmbeddedResourceText("Tango.MachineStudio.UI.ChangeLog.txt"); } } + + public void NotifyApplicationReady() + { + TangoIOC.Default.GetAllInstancesByBase<IStudioViewModel>().ToList().ForEach(x => x.OnApplicationReady()); + } } } |
