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; }
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; }
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; }
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); }
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); }
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); }
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); }
public PanelInfo(string s) { PopoutID = PanelIDs.GroupMarker; WindowTitle = s; Description = string.Empty; }
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); }
static public PanelInfo GetPanelInfoByEnum(PanelIDs p) { return(PanelList[PanelList.FindIndex(x => x.PopoutID == p)]); }
static public int GetPanelIndexByEnum(PanelIDs p) { return(PanelList.FindIndex(x => x.PopoutID == p)); }
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); }
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); }
static public Type GetPanelTypeByEnum(PanelIDs p) // null if panel ID is bad. { int index = GetPanelIndexByEnum(p); return(index >= 0 ? PanelList[index].PopoutType : null); }