private static void LoadWindows() { //waiting = true; //foreach (var del in WindowLoadingDelegates) //{ // waiting = true; // del.DynamicInvoke(); // while (waiting) { } //} GroupWindow = new GroupWindow(); CooldownWindow = new CooldownWindow(); BossWindow = new BossWindow(); BuffWindow = new BuffWindow(); CharacterWindow = new CharacterWindow(); ClassWindow = new ClassWindow(); InfoWindow = new InfoWindow(); FlightDurationWindow = new FlightDurationWindow(); LfgListWindow = new LfgListWindow(); SkillConfigWindow = new SkillConfigWindow(); GroupAbnormalConfigWindow = new GroupAbnormalConfigWindow(); CivilUnrestWindow = new CivilUnrestWindow(); FloatingButton = new FloatingButtonWindow(); ChatWindowManager.Instance.InitWindows(); //GroupWindow.Show(); //CooldownWindow.Show(); //BossWindow.Show(); //BuffWindow.Show(); //CharacterWindow.Show(); //ClassWindow.Show(); }
private static void LoadBossGaugeWindow() { var bossGaugeThread = new Thread(new ThreadStart(() => { SynchronizationContext.SetSynchronizationContext(new DispatcherSynchronizationContext(Dispatcher.CurrentDispatcher)); BossWindow = new BossWindow(); //BossWindow.AllowsTransparency = SettingsManager.BossWindowSettings.AllowTransparency; BossWindow.Show(); waiting = false; Dispatcher.Run(); })); bossGaugeThread.Name = "Boss gauge thread"; bossGaugeThread.SetApartmentState(ApartmentState.STA); bossGaugeThread.Start(); Debug.WriteLine("Boss window loaded"); }
private static void LoadNpcWindow() { var bossGaugeThread = new Thread(() => { SynchronizationContext.SetSynchronizationContext(new DispatcherSynchronizationContext(Dispatcher.CurrentDispatcher)); BossWindow = new BossWindow(); if (BossWindow.WindowSettings.Enabled) { BossWindow.Show(); } AddDispatcher(Thread.CurrentThread.ManagedThreadId, Dispatcher.CurrentDispatcher); Dispatcher.Run(); RemoveDispatcher(Thread.CurrentThread.ManagedThreadId); }) { Name = "Boss" }; bossGaugeThread.SetApartmentState(ApartmentState.STA); bossGaugeThread.Start(); }