Ejemplo n.º 1
0
 protected BasePanel()
 {
     SetStyle(ControlStyles.ResizeRedraw, value: true);
     SetStyle(ControlStyles.AllPaintingInWmPaint, value: true);
     SetStyle(ControlStyles.UserPaint, value: true);
     SetStyle(ControlStyles.DoubleBuffer, value: true);
     SetStyle(ControlStyles.SupportsTransparentBackColor, value: true);
     SetStyle(ControlStyles.ContainerControl, value: true);
     CaptionFont      = new Font(SystemFonts.CaptionFont.FontFamily, SystemFonts.CaptionFont.SizeInPoints - 1f, FontStyle.Bold);
     CaptionHeight    = 25;
     PanelStyle       = PanelStyle.Default;
     m_panelColors    = new PanelColors(this);
     m_imageSize      = new Size(16, 16);
     m_imageRectangle = Rectangle.Empty;
     m_toolTip        = new ToolTip();
 }
Ejemplo n.º 2
0
        protected virtual void OnPanelStyleChanged(object sender, PanelStyleChangeEventArgs e)
        {
            switch (e.PanelStyle)
            {
            case PanelStyle.Default:
                m_panelColors = new PanelColors(this);
                break;

            case PanelStyle.Office2007:
                m_panelColors = new PanelColorsOffice2007Blue(this);
                break;
            }
            Invalidate(invalidateChildren: true);
            if (this.PanelStyleChanged != null)
            {
                this.PanelStyleChanged(sender, e);
            }
        }
Ejemplo n.º 3
0
 public override void SetPanelProperties(PanelColors panelColors)
 {
     m_imgHoverBackground = null;
     base.SetPanelProperties(panelColors);
 }
Ejemplo n.º 4
0
        public static void SetPanelProperties(Control.ControlCollection controls, PanelStyle panelStyle, PanelColors panelColors)
        {
            if (panelColors == null)
            {
                throw new ArgumentNullException("panelColors", string.Format(CultureInfo.InvariantCulture, Resources.IDS_ArgumentException, new object[1]
                {
                    "panelColors"
                }));
            }
            ArrayList arrayList = FindPanels(searchAllChildren: true, controls);

            foreach (BasePanel item in arrayList)
            {
                item.PanelStyle   = panelStyle;
                panelColors.Panel = item;
                item.SetPanelProperties(panelColors);
            }
            ArrayList arrayList2 = FindPanelLists(searchAllChildren: true, controls);

            foreach (XPanderPanelList item2 in arrayList2)
            {
                item2.PanelStyle  = panelStyle;
                item2.PanelColors = panelColors;
            }
        }