Example #1
0
 public ToolTipPopupPanelItem()
 {
     this.LineDistance    = 3;
     this.Padding         = new System.Windows.Forms.Padding(6, 6, 5, 3);
     this.eOrientation    = System.Windows.Forms.Orientation.Vertical;
     this.IsRestrictItems = true;
     this.LockHeight      = true;
     this.LockWith        = true;
     //
     //
     //
     this.m_ImageLabelItem                 = new ImageLabelItem();
     this.m_ImageLabelItem.ITSpace         = 3;
     this.m_ImageLabelItem.LockHeight      = true;
     this.m_ImageLabelItem.LockWith        = false;
     this.m_ImageLabelItem.Font            = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.m_ImageLabelItem.Size            = new Size(19, 19);
     this.m_ImageLabelItem.eImageSizeStyle = ImageSizeStyle.eSystem;
     this.m_ImageLabelItem.ImageAlign      = ContentAlignment.MiddleLeft;
     this.m_ImageLabelItem.TextAlign       = ContentAlignment.MiddleLeft;
     this.BaseItems.Add(this.m_ImageLabelItem);
     //
     this.m_LabelItem            = new LabelItem();
     this.m_LabelItem.LockHeight = true;
     this.m_LabelItem.LockWith   = false;
     this.m_LabelItem.TextAlign  = ContentAlignment.MiddleLeft;
     this.m_LabelItem.Size       = new Size(16, 16);
     this.BaseItems.Add(this.m_LabelItem);
     //
     //
     //
     ((ILockCollectionHelper)this.BaseItems).SetLocked(true);
 }
        public override object Clone()
        {
            ImageLabelItem baseItem = new ImageLabelItem();

            baseItem.Checked         = this.Checked;
            baseItem.Enabled         = this.Enabled;
            baseItem.Font            = this.Font;
            baseItem.ForeColor       = this.ForeColor;
            baseItem.Name            = this.Name;
            baseItem.Site            = this.Site;
            baseItem.Size            = this.Size;
            baseItem.Tag             = this.Tag;
            baseItem.Text            = this.Text;
            baseItem.eDisplayStyle   = this.eDisplayStyle;
            baseItem.eImageSizeStyle = this.eImageSizeStyle;
            baseItem.Image           = this.Image;
            baseItem.ImageAlign      = this.ImageAlign;
            baseItem.ImageSize       = this.ImageSize;
            baseItem.Padding         = this.Padding;
            baseItem.TextAlign       = this.TextAlign;
            baseItem.Visible         = this.Visible;
            if (this.GetEventState("VisibleChanged") == EventStateStyle.eUsed)
            {
                baseItem.VisibleChanged += new EventHandler(baseItem_VisibleChanged);
            }
            if (this.GetEventState("SizeChanged") == EventStateStyle.eUsed)
            {
                baseItem.SizeChanged += new EventHandler(baseItem_SizeChanged);
            }
            if (this.GetEventState("Paint") == EventStateStyle.eUsed)
            {
                baseItem.Paint += new PaintEventHandler(baseItem_Paint);
            }
            if (this.GetEventState("MouseUp") == EventStateStyle.eUsed)
            {
                baseItem.MouseUp += new MouseEventHandler(baseItem_MouseUp);
            }
            if (this.GetEventState("MouseMove") == EventStateStyle.eUsed)
            {
                baseItem.MouseMove += new MouseEventHandler(baseItem_MouseMove);
            }
            if (this.GetEventState("MouseLeave") == EventStateStyle.eUsed)
            {
                baseItem.MouseLeave += new EventHandler(baseItem_MouseLeave);
            }
            if (this.GetEventState("MouseEnter") == EventStateStyle.eUsed)
            {
                baseItem.MouseEnter += new EventHandler(baseItem_MouseEnter);
            }
            if (this.GetEventState("MouseDown") == EventStateStyle.eUsed)
            {
                baseItem.MouseDown += new MouseEventHandler(baseItem_MouseDown);
            }
            if (this.GetEventState("MouseDoubleClick") == EventStateStyle.eUsed)
            {
                baseItem.MouseDoubleClick += new MouseEventHandler(baseItem_MouseDoubleClick);
            }
            if (this.GetEventState("MouseClick") == EventStateStyle.eUsed)
            {
                baseItem.MouseClick += new MouseEventHandler(baseItem_MouseClick);
            }
            if (this.GetEventState("LocationChanged") == EventStateStyle.eUsed)
            {
                baseItem.LocationChanged += new EventHandler(baseItem_LocationChanged);
            }
            if (this.GetEventState("EnabledChanged") == EventStateStyle.eUsed)
            {
                baseItem.EnabledChanged += new EventHandler(baseItem_EnabledChanged);
            }
            if (this.GetEventState("CheckedChanged") == EventStateStyle.eUsed)
            {
                baseItem.CheckedChanged += new EventHandler(baseItem_CheckedChanged);
            }
            return(baseItem);
        }