private static void LoadWindows() { //waiting = true; //foreach (var del in WindowLoadingDelegates) //{ // waiting = true; // del.DynamicInvoke(); // while (waiting) { } //} RunningDispatchers = new ConcurrentDictionary <int, Dispatcher>(); LoadCooldownWindow(); LoadClassWindow(); LoadGroupWindow(); LoadNpcWindow(); LoadCharWindow(); LoadBuffBarWindow(); FlightDurationWindow = new FlightDurationWindow(); if (FlightDurationWindow.WindowSettings.Enabled) { FlightDurationWindow.Show(); } CivilUnrestWindow = new CivilUnrestWindow(); if (CivilUnrestWindow.WindowSettings.Enabled) { CivilUnrestWindow.Show(); } FloatingButton = new FloatingButtonWindow(); if (FloatingButton.WindowSettings.Enabled) { FloatingButton.Show(); } //LfgListWindow = new LfgListWindow(); //Dashboard = new Dashboard(); ChatWindowManager.Instance.InitWindows(); }
private static async Task LoadWindows() { // TODO: TccModules should define and create their own windows var b1 = new TccWidgetBuilder <CharacterWindow, CharacterWindowViewModel>(App.Settings.CharacterWindowSettings); CharacterWindow = await b1.GetWindow(); ViewModels.CharacterVM = await b1.GetViewModel(); var b2 = new TccWidgetBuilder <CooldownWindow, CooldownWindowViewModel>(App.Settings.CooldownWindowSettings); CooldownWindow = await b2.GetWindow(); ViewModels.CooldownsVM = await b2.GetViewModel(); var b3 = new TccWidgetBuilder <ClassWindow, ClassWindowViewModel>(App.Settings.ClassWindowSettings); ClassWindow = await b3.GetWindow(); ViewModels.ClassVM = await b3.GetViewModel(); var b4 = new TccWidgetBuilder <GroupWindow, GroupWindowViewModel>(App.Settings.GroupWindowSettings); GroupWindow = await b4.GetWindow(); ViewModels.GroupVM = await b4.GetViewModel(); var b5 = new TccWidgetBuilder <BossWindow, NpcWindowViewModel>(App.Settings.NpcWindowSettings); BossWindow = await b5.GetWindow(); ViewModels.NpcVM = await b5.GetViewModel(); var b6 = new TccWidgetBuilder <BuffWindow, AbnormalityWindowViewModel>(App.Settings.BuffWindowSettings); BuffWindow = await b6.GetWindow(); ViewModels.AbnormalVM = await b6.GetViewModel(); var b7 = new TccWidgetBuilder <NotificationAreaWindow, NotificationAreaViewModel>(App.Settings.NotificationAreaSettings); NotificationArea = await b7.GetWindow(); ViewModels.NotificationAreaVM = await b7.GetViewModel(); var b8 = new TccWidgetBuilder <FloatingButtonWindow, FloatingButtonViewModel>(App.Settings.FloatingButtonSettings); FloatingButton = await b8.GetWindow(); ViewModels.FloatingButtonVM = await b8.GetViewModel(); var b9 = new TccWidgetBuilder <Dashboard, DashboardViewModel>(null); DashboardWindow = await b9.GetWindow(); ViewModels.DashboardVM = await b9.GetViewModel(); var b10 = new TccWidgetBuilder <PerfMonitorWindow, PerfMonitorViewModel>(App.Settings.PerfMonitorSettings); PerfMonitor = await b10.GetWindow(); ViewModels.PervMonitorVM = await b10.GetViewModel(); FlightDurationWindow = new FlightDurationWindow(ViewModels.FlightGaugeVM); if (FlightDurationWindow.WindowSettings.Enabled) { FlightDurationWindow.Show(); } CivilUnrestWindow = new CivilUnrestWindow(ViewModels.CivilUnrestVM); if (CivilUnrestWindow.WindowSettings.Enabled) { CivilUnrestWindow.Show(); } LfgListWindow = new LfgListWindow(ViewModels.LfgVM); ViewModels.PlayerMenuVM = new PlayerMenuViewModel(); ChatManager.Start(); }