Beispiel #1
0
 /// <summary>
 /// Compares equality with other GuiKerbalsFilter.
 /// </summary>
 public bool Equals(GuiKerbalsFilter other)
 {
     return(Crew == other.Crew &&
            Applicants == other.Applicants &&
            Tourists == other.Tourists &&
            Pilots == other.Pilots &&
            Engineeers == other.Engineeers &&
            Scientists == other.Scientists &&
            Others == other.Others);
 }
Beispiel #2
0
 /// <summary>
 /// Copies a GuiKerbalsFilter.
 /// </summary>
 public GuiKerbalsFilter(GuiKerbalsFilter copyFrom)
 {
     Crew       = copyFrom.Crew;
     Applicants = copyFrom.Applicants;
     Tourists   = copyFrom.Tourists;
     Pilots     = copyFrom.Pilots;
     Engineeers = copyFrom.Engineeers;
     Scientists = copyFrom.Scientists;
     Others     = copyFrom.Others;
 }
Beispiel #3
0
        /// <summary>
        /// Creates a GuiKebalsManager to link and manage the given two ListViews.
        /// </summary>
        /// <param name="master">The master GuiTabsManager</param>
        /// <param name="kerbalsList">The ListView to manage the kerbal list</param>
        /// <param name="kerbalsDetails">The ListView to manage the kerbal details</param>
        /// <param name="kerbalsCount">The Label to display the visible items count</param>
        public GuiKebalsManager(GuiTabsManager master, ListView kerbalsList, ListView kerbalsDetails, Label kerbalsCount)
        {
            Filter = new GuiKerbalsFilter();

            Master = master;

            Kerbals        = new List <KmlKerbal>();
            KerbalsList    = kerbalsList;
            KerbalsDetails = kerbalsDetails;
            KerbalsCount   = kerbalsCount;

            KerbalsList.SelectionChanged += KerbalsList_SelectionChanged;
        }
Beispiel #4
0
        private void KerbalsFilterTrait_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
        {
            GuiKerbalsFilter copy = new GuiKerbalsFilter(TabsManager.KerbalsManager.Filter);

            TabsManager.KerbalsManager.Filter.SetAllTrait(false);
            KerbalsFilterSetProperty(sender, true);
            // Imitate KSP behaviour to un-single-select this kind
            if (copy.Equals(TabsManager.KerbalsManager.Filter))
            {
                TabsManager.KerbalsManager.Filter.SetAllTrait(true);
            }
            KerbalsFilterUpdateAll(sender);
            TabsManager.KerbalsManager.UpdateVisibility();
        }