/// <summary> /// Updates the opened windows. /// </summary> /// <param name="value">The value.</param> private void UpdateOpenedWindows(Plan value) { // If the EFTLoadoutImportationForm is open, assign the new plan // We do the check here as we need to catch the previous plan value LoadoutImportationWindow eftloadoutImportation = WindowsFactory.GetByTag <LoadoutImportationWindow, Character>(m_character); if (eftloadoutImportation != null) { eftloadoutImportation.Plan = value; } // If the ShipLoadoutSelectWindow is open, assign the new plan ShipLoadoutSelectWindow loadoutSelect = WindowsFactory.GetByTag <ShipLoadoutSelectWindow, Character>(m_character); if (loadoutSelect != null) { loadoutSelect.Plan = value; } // If the SkillExplorerWindow is open, assign the new plan SkillExplorerWindow skillExplorer = WindowsFactory.GetByTag <SkillExplorerWindow, Character>(m_character); if (skillExplorer != null) { skillExplorer.Plan = value; } }
/// <summary> /// Updates the controls when the selection is changed. /// </summary> protected override void OnSelectionChanged() { base.OnSelectionChanged(); if (SelectedObject == null) { return; } // Description tbDescription.Text = SelectedObject.Description; // Required Skills requiredSkillsControl.Object = SelectedObject; // Update the Mastery tab masteryTreeDisplayControl.MasteryShip = Character?.MasteryShips.GetMasteryShipByID(SelectedObject.ID); ShipLoadoutSelectWindow loadoutSelect = WindowsFactory.GetByTag <ShipLoadoutSelectWindow, Character>(Character); if (loadoutSelect != null) { loadoutSelect.Ship = shipSelectControl.SelectedObject; } // Update the eligibity controls UpdateEligibility(); }
/// <summary> /// On closing, we unsubscribe the global events to help the GC. /// </summary> /// <param name="e"></param> protected override void OnFormClosing(FormClosingEventArgs e) { // Save settings if this one is the last activated and up-to-date if (s_lastActivated == this) { Settings.UI.PlanWindow.Columns = planEditor.ExportColumnSettings().ToArray(); s_lastActivated = null; } // Unsubscribe global events EveClient.PlanChanged -= new EventHandler <PlanChangedEventArgs>(EveClient_PlanChanged); Settings.Save(); // Tell the skill explorer we're closing down if (!(e.CloseReason == CloseReason.ApplicationExitCall) && // and Application.Exit() was not called !(e.CloseReason == CloseReason.TaskManagerClosing) && // and the user isn't trying to shut the program down for some reason !(e.CloseReason == CloseReason.WindowsShutDown)) // and Windows is not shutting down { WindowsFactory <SkillExplorerWindow> .CloseByTag(this); } // Tell the attributes optimization window we're closing if (m_attributesOptimizerWindow != null) { m_attributesOptimizerWindow.Close(); m_attributesOptimizerWindow = null; } // Tell the implant window we're closing if (m_implantCalcWindow != null) { m_implantCalcWindow.Close(); m_implantCalcWindow = null; } // Tells the loadout browser we're closing if (m_loadoutForm != null) { m_loadoutForm.Close(); m_loadoutForm = null; } base.OnFormClosing(e); }
public LoadoutListSorter(ShipLoadoutSelectWindow ls) { m_loadouts = ls.lvLoadouts; OrderOfSort = SortOrder.Ascending; }