示例#1
0
文件: frmMain.cs 项目: wwkkww1983/yh
        ///// <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;
        }
示例#2
0
文件: frmMain.cs 项目: wwkkww1983/yh
        /// <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);
        }
示例#3
0
文件: frmMain.cs 项目: hkiaipc/yh
        /// <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;
        }