Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ditchDevice"></param>
        private void ShowDitchDevice(DitchDevice ditchDevice)
        {
            UCDitchDevice uc = GetUDDitchDevice();

            OnlyVisible(uc);
            uc.DitchDevice = ditchDevice;
        }
Exemple #2
0
        /// <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);
        }
Exemple #3
0
        /// <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;
        }