예제 #1
0
            public string Description;          // must be non zero length to be user selectable

            public PanelInfo(PanelIDs p, Type t, string wintitle, string refname, string description)
            {
                PopoutID      = p;
                PopoutType    = t;
                WindowTitle   = wintitle;
                WindowRefName = refname;
                Description   = description;
            }
예제 #2
0
 public PanelInfo(PanelIDs p, Type t, string wintitle, string refname, string description, bool?transparent = null)
 {
     PopoutID             = p;
     PopoutType           = t;
     WindowTitle          = wintitle;
     WindowRefName        = refname;
     Description          = description;
     SupportsTransparency = transparent != null;
     DefaultTransparent   = transparent ?? false;
 }
예제 #3
0
 public PanelInfo(PanelIDs p, Type t, string prefix, string rf, string tooltip, bool?transparent = null)
 {
     PopoutID             = p;
     PopoutType           = t;
     WindowTitlePrefix    = prefix;
     WindowRefName        = rf;
     Tooltip              = tooltip;
     SupportsTransparency = transparent != null;
     DefaultTransparent   = transparent ?? false;
 }
예제 #4
0
 public static System.Windows.Forms.ToolStripMenuItem MakeToolStripMenuItem(PanelIDs p, System.EventHandler h)
 {
     PanelInformation.PanelInfo             pi = GetPanelInfoByPanelID(p);
     System.Windows.Forms.ToolStripMenuItem mi = new System.Windows.Forms.ToolStripMenuItem();
     mi.Text   = pi.Description;
     mi.Size   = new System.Drawing.Size(250, 22);
     mi.Tag    = pi.PopoutID;
     mi.Image  = pi.TabIcon;
     mi.Click += h;
     return(mi);
 }
예제 #5
0
        public static UserControlCommonBase Create(PanelIDs p)  // can fail if P is crap
        {
            PanelInfo pi = GetPanelInfoByPanelID(p);

            if (pi != null)
            {
                var uccb = (UserControls.UserControlCommonBase)Activator.CreateInstance(pi.PopoutType, null);
                uccb.panelid = p;
                return(uccb);
            }

            return(null);
        }
예제 #6
0
        public static UserControlCommonBase Create(PanelIDs p)  // can fail if P is crap
        {
            PanelInfo pi = GetPanelInfoByPanelID(p);

            return(pi != null ? (UserControls.UserControlCommonBase)Activator.CreateInstance(pi.PopoutType, null) : null);
        }
예제 #7
0
        static public PanelInfo GetPanelInfoByPanelID(PanelIDs p)    // null if p is invalid
        {
            int i = displayablepanels.FindIndex(x => x.PopoutID == p);

            return(i >= 0 ? displayablepanels[i] : null);
        }
예제 #8
0
 public PanelInfo(string s)
 {
     PopoutID    = PanelIDs.GroupMarker;
     WindowTitle = s;
     Description = string.Empty;
 }
예제 #9
0
        public static UserControlCommonBase Create(PanelIDs p)  // can fail if P is crap
        {
            int index = GetPanelIndexByEnum(p);

            return(index >= 0 ? (UserControls.UserControlCommonBase)Activator.CreateInstance(PanelList[index].PopoutType, null) : null);
        }
예제 #10
0
 static public PanelInfo GetPanelInfoByEnum(PanelIDs p)
 {
     return(PanelList[PanelList.FindIndex(x => x.PopoutID == p)]);
 }
예제 #11
0
 static public int GetPanelIndexByEnum(PanelIDs p)
 {
     return(PanelList.FindIndex(x => x.PopoutID == p));
 }
예제 #12
0
        static public PanelInfo GetPanelInfoByPanelID(PanelIDs p)    // null if p is invalid
        {
            int i = PanelList.FindIndex(x => x.PopoutID == p);

            return(i >= 0 ? PanelList[i] : null);
        }
예제 #13
0
        public static UserControlCommonBase Create(PanelIDs p)  // can fail if P is crap
        {
            Type t = GetPanelTypeByEnum(p);

            return(t != null ? (UserControls.UserControlCommonBase)Activator.CreateInstance(t, null) : null);
        }
예제 #14
0
        static public Type GetPanelTypeByEnum(PanelIDs p)       // null if panel ID is bad.
        {
            int index = GetPanelIndexByEnum(p);

            return(index >= 0 ? PanelList[index].PopoutType : null);
        }