///// <summary> ///// ///// </summary> ///// <param name="xD2300Device"></param> //private void ShowXD2300Device(XD2300Device xD2300Device) //{ // xD2300Device .DitchData //} /// <summary> /// /// </summary> /// <param name="xD202Device"></param> private void ShowXD202Device(XD202Device xD202Device) { UCXD202Device uc = GetUCXD202Device(); OnlyVisible(uc); uc.XD202Device = xD202Device; }
/// <summary> /// /// </summary> /// <param name="type"></param> /// <returns></returns> private Control GetUC(Type type) { foreach (Control c in this.panel1.Controls) { if (c.GetType() == type) { return(c); } } Control nc = null; if (type == typeof(UCDitchDevice)) { nc = new UCDitchDevice(); } else if (type == typeof(UCXD202Device)) { nc = new UCXD202Device(); } else { string s = string.Format("", type); throw new NotImplementedException(s); } this.panel1.Controls.Add(nc); return(nc); }
/// <summary> /// /// </summary> /// <param name="type"></param> /// <returns></returns> private Control GetUC(Type type) { foreach (Control c in this.panel1.Controls) { if (c.GetType() == type) return c; } Control nc = null; if (type == typeof(UCDitchDevice)) { nc = new UCDitchDevice(); } else if (type == typeof(UCXD202Device)) { nc = new UCXD202Device(); } else { string s = string.Format("", type); throw new NotImplementedException(s); } this.panel1.Controls.Add(nc); return nc; }