/// <summary>
        /// Sets the PanelStyle and PanelColors table in the given control collection.
        /// </summary>
        /// <param name="controls">A collection of child controls.</param>
        /// <param name="panelColors">The PanelColors table</param>
        public static void SetPanelProperties(Control.ControlCollection controls, PanelColors panelColors)
        {
            if (panelColors == null)
            {
                throw new ArgumentNullException("panelColors",
                    string.Format(System.Globalization.CultureInfo.InvariantCulture,
                    XiaoCai.WinformUI.Properties.Resources.IDS_ArgumentException,
                    "panelColors"));
            }

            PanelStyle panelStyle = panelColors.PanelStyle;
            SetPanelProperties(controls, panelStyle, panelColors);
        }
        /// <summary>
        /// Sets the PanelStyle and PanelColors table in the given control collection.
        /// </summary>
        /// <param name="controls">A collection of child controls</param>
        /// <param name="panelStyle">Style of the panel</param>
        /// <param name="panelColors">The PanelColors table</param>
        public static void SetPanelProperties(Control.ControlCollection controls, PanelStyle panelStyle, PanelColors panelColors)
        {
            if (panelColors == null)
            {
                throw new ArgumentNullException("panelColors",
                    string.Format(System.Globalization.CultureInfo.InvariantCulture,
                    XiaoCai.WinformUI.Properties.Resources.IDS_ArgumentException,
                    "panelColors"));
            }

			ArrayList panels = FindPanels(true, controls);
            foreach (BasePanel panel in panels)
            {
                panel.PanelStyle = panelStyle;
                panelColors.Panel = panel;
                panel.SetPanelProperties(panelColors);
            }
            ArrayList PanderPanelListWs = FindPanelLists(true, controls);
            foreach (PanderPanelListW PanderPanelListW in PanderPanelListWs)
            {
                PanderPanelListW.PanelStyle = panelStyle;
                PanderPanelListW.PanelColors = panelColors;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Sets the PanelStyle and PanelColors table in the given control collection.
        /// </summary>
        /// <param name="controls">A collection of child controls</param>
        /// <param name="panelStyle">Style of the panel</param>
        /// <param name="panelColors">The PanelColors table</param>
        public static void SetPanelProperties(Control.ControlCollection controls, PanelStyle panelStyle, PanelColors panelColors)
        {
            if (panelColors == null)
            {
                throw new ArgumentNullException("panelColors",
                                                string.Format(System.Globalization.CultureInfo.InvariantCulture,
                                                              XiaoCai.WinformUI.Properties.Resources.IDS_ArgumentException,
                                                              "panelColors"));
            }

            ArrayList panels = FindPanels(true, controls);

            foreach (BasePanel panel in panels)
            {
                panel.PanelStyle  = panelStyle;
                panelColors.Panel = panel;
                panel.SetPanelProperties(panelColors);
            }
            ArrayList PanderPanelListWs = FindPanelLists(true, controls);

            foreach (PanderPanelListW PanderPanelListW in PanderPanelListWs)
            {
                PanderPanelListW.PanelStyle  = panelStyle;
                PanderPanelListW.PanelColors = panelColors;
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Sets the PanelProperties for the Panel
 /// </summary>
 /// <param name="panelColors">The PanelColors table</param>
 public override void SetPanelProperties(PanelColors panelColors)
 {
     this.m_imgHoverBackground = null;
     base.SetPanelProperties(panelColors);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Raises the PanelStyle changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A PanelStyleChangeEventArgs that contains the event data.</param>
 protected virtual void OnPanelStyleChanged(object sender, PanelStyleChangeEventArgs e)
 {
     PanelStyle panelStyle = e.PanelStyle;
     switch (panelStyle)
     {
         case PanelStyle.Default:
             m_panelColors = new PanelColors(this);
             break;
         case PanelStyle.Office2007:
             m_panelColors = new PanelColorsOffice2007Blue(this);
             break;
     }
     Invalidate(true);
     if (this.PanelStyleChanged != null)
     {
         this.PanelStyleChanged(sender, e);
     }
 }
Ejemplo n.º 6
0
		/// <summary>
		/// Initializes a new instance of the BasePanel class.
		/// </summary>
		protected BasePanel()
		{
			this.SetStyle(ControlStyles.ResizeRedraw, true);
			this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
			this.SetStyle(ControlStyles.UserPaint, true);
			this.SetStyle(ControlStyles.DoubleBuffer, true);
			this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
			this.SetStyle(ControlStyles.ContainerControl, true);
            this.CaptionFont = new Font(SystemFonts.CaptionFont.FontFamily, SystemFonts.CaptionFont.SizeInPoints - 1.0F, FontStyle.Bold);
            this.CaptionHeight = 25;
            this.PanelStyle = PanelStyle.Default;
            this.m_panelColors = new PanelColors(this);
            this.m_imageSize = new Size(16, 16);
            this.m_imageRectangle = Rectangle.Empty;
            this.m_toolTip = new System.Windows.Forms.ToolTip();
            
		}
Ejemplo n.º 7
0
 /// <summary>
 /// Sets the PanelProperties for a Panel or PanderPanelW
 /// </summary>
 /// <param name="panelColors">The PanelColors table</param>
 public virtual void SetPanelProperties(PanelColors panelColors)
 {
     if (panelColors == null)
     {
         throw new ArgumentException(
             string.Format(
             System.Globalization.CultureInfo.CurrentUICulture,
             Resources.IDS_ArgumentException,
             "panelColors"));
     }
     this.m_panelColors = panelColors;
     this.ColorScheme = ColorScheme.Professional;
     this.Invalidate(true);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Sets the PanelProperties for the Panel
 /// </summary>
 /// <param name="panelColors">The PanelColors table</param>
 public override void SetPanelProperties(PanelColors panelColors)
 {
     this.m_imgHoverBackground = null;
     base.SetPanelProperties(panelColors);
 }