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 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(); }
//public static bool ClickThru //{ // get => clickThru; // set // { // if (clickThru != value) // { // clickThru = value; // ClickThruChanged?.Invoke(null, new PropertyChangedEventArgs("ClickThruMode")); // } // } //} //public static bool IsTccVisible //{ // get // { // if (SessionManager.Logged && !SessionManager.LoadingScreen && IsFocused) // { // isTccVisible = true; // return isTccVisible; // } // else // { // isTccVisible = false || App.Debug; // return isTccVisible; // } // } // set // { // if (isTccVisible != value) // { // isTccVisible = value; // NotifyVisibilityChanged(); // } // } //} //public static bool IsFocused //{ // get => isFocused; // set // { // if (!FocusManager.Running) return; // //if (isFocused == value) // //{ // // //if(focusCount > 3) // // //{ // // // return; // // //} // // return; // //} // isFocused = value; // //if (isFocused) // //{ // // focusCount++; // //} // //else // //{ // // focusCount = 0; // //} // NotifyVisibilityChanged(); // } //} //public static bool SkillsEnded //{ // get => skillsEnded; // set // { // if (value == false) // { // _undimTimer.Stop(); // _undimTimer.Start(); // } // if (skillsEnded == value) return; // skillsEnded = value; // CombatChanged?.Invoke(); // NotifyDimChanged(); // } //} //public static bool IsTccDim //{ // get => SkillsEnded && !SessionManager.Encounter; // add more conditions here if needed //} public static void Init() { ForegroundManager = new ForegroundManager(); FocusManager.Init(); LoadWindows(); FloatingButton = new FloatingButtonWindow(); FloatingButton.Show(); _contextMenu = new ContextMenu(); DefaultIcon = new Icon(Application.GetResourceStream(new Uri("resources/tcc-logo.ico", UriKind.Relative)).Stream); ConnectedIcon = new Icon(Application.GetResourceStream(new Uri("resources/tcc-logo-on.ico", UriKind.Relative)).Stream); TrayIcon = new NotifyIcon() { Icon = DefaultIcon, Visible = true }; TrayIcon.MouseDown += NI_MouseDown; TrayIcon.MouseDoubleClick += TrayIcon_MouseDoubleClick; var v = Assembly.GetExecutingAssembly().GetName().Version; TrayIcon.Text = string.Format("TCC v{0}.{1}.{2}", v.Major, v.Minor, v.Build); var CloseButton = new MenuItem() { Header = "Close" }; CloseButton.Click += (s, ev) => App.CloseApp(); _contextMenu.Items.Add(CloseButton); //_undimTimer.Elapsed += _undimTimer_Elapsed; Settings = new SettingsWindow(); if (SettingsManager.UseHotkeys) { KeyboardHook.Instance.RegisterKeyboardHook(); } //TccWindow.RecreateWindow += TccWindow_RecreateWindow; FocusManager.FocusTimer.Start(); }