// We add this to our window as a callback // It tells us when the window is opened so we can keep the button in sync public void OnChecklistWindowOpened(object sender, EventArgs e) { // _logger.Trace( "OnChecklistWindowOpened" ); if (_checklistButton != null) { _checklistButton.SetOn( ); } UpdateChecklistVisibility(true); }
// We add this to our window as a callback // It tells us when the window is opened so we can keep the button in sync public void OnStatusWindowOpened(object sender, EventArgs e) { // _logger.Trace( "OnWindowOpened" ); if (_statusButton != null) { _statusButton.SetOn( ); } UpdateStatusVisibility(true); }
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( ); } } } } } }