// We add this to our window as a callback // It tells us when the window is closed so we can keep the button in sync public void OnChecklistWindowClosed(object sender, EventArgs e) { // _logger.Trace( "OnChecklistWindowClosed" ); if (_checklistButton != null) { _checklistButton.SetOff( ); } UpdateChecklistVisibility(false); }
// We add this to our window as a callback // It tells us when the window is closed so we can keep the button in sync public void OnStatusWindowClosed(object sender, EventArgs e) { // _logger.Trace( "OnWindowClosed" ); if (_statusButton != null) { _statusButton.SetOff( ); } UpdateStatusVisibility(false); }
private void ChecklistButton_RightClick(object sender, EventArgs e) { //WarezCrawler 20190410 - Try to get experiments to update around mun //_mustDoFullRefresh = true; //ScheduleExperimentUpdate(); //ScienceContext.LoadStatus.OnboardScienceUnloadedVessels = false; //ScienceContext.LoadStatus.Experiments = false; //ScienceContext.LoadStatus.ScienceSubjects = false; ScienceContext.LoadStatus.ExperimentCache = false; //ScienceContext.LoadStatus.KSCBiomes = false; if (Config.RighClickMutesMusic) { // Toggle the muted state Muted = !Muted; ScreenMessages.PostScreenMessage("[x] Science! - Music Mute"); } else { if (_active && UiActive( )) { if (GameHelper.AllowStatusWindow( )) { bool NewVisibility = !_statusWindow.IsVisible( ); _statusWindow.SetVisible(NewVisibility); UpdateStatusVisibility(NewVisibility); if (_statusWindow.IsVisible( )) { if (_statusButton != null) { _statusButton.SetOn( ); } ScienceEventHandler.ScheduleExperimentUpdate( ); } else { if (_statusButton != null) { _statusButton.SetOff( ); } } } } } }
private void ChecklistButton_RightClick(object sender, EventArgs e) { if (Config.RighClickMutesMusic) { // Toggle the muted state Muted = !Muted; ScreenMessages.PostScreenMessage("[x] Science! - Music Mute"); } else { if (_active && UiActive( )) { if (GameHelper.AllowStatusWindow( )) { bool NewVisibility = !_statusWindow.IsVisible( ); _statusWindow.SetVisible(NewVisibility); UpdateStatusVisibility(NewVisibility); if (_statusWindow.IsVisible( )) { if (_statusButton != null) { _statusButton.SetOn( ); } ScienceEventHandler.ScheduleExperimentUpdate( ); } else { if (_statusButton != null) { _statusButton.SetOff( ); } } } } } }