/// <summary>
		/// Initialize a new instance of the PanelColorsOffice class.
        /// </summary>
        /// <param name="basePanel">Base class for the panel or PanderPanelW control.</param>
		public PanelColorsOffice(BasePanel basePanel)
            : base(basePanel)
        {
        }
 /// <summary>
 /// Initialize a new instance of the PanelColorsOffice2007Black class.
 /// </summary>
 /// <param name="basePanel">Base class for the panel or PanderPanelW control.</param>
 public PanelColorsOffice2007Black(BasePanel basePanel)
     : base(basePanel)
 {
 }
 /// <summary>
 /// Initialize a new instance of the Office2007Colors class.
 /// </summary>
 /// <param name="basePanel">Base class for the panel or PanderPanelW control.</param>
 public PanelColorsOffice2007Red(BasePanel basePanel)
     : base(basePanel)
 {
 }
        /// <summary>
		/// Initialize a new instance of the PanelColorsBse class.
        /// </summary>
        /// <param name="basePanel">Base class for the panel or PanderPanelW control.</param>
        public PanelColorsBse(BasePanel basePanel)
            : base(basePanel)
        {
        }
		/// <summary>
        /// Expands the specified PanderPanelW
		/// </summary>
		/// <param name="panel">The PanderPanelW to expand</param>
        /// <example>
        /// <code>
        /// private void btnExpandXPander_Click(object sender, EventArgs e)
        /// {
        ///    // PanderPanelW10 is not null
        ///    if (PanderPanelW10 != null)
        ///    {
        ///        XiaoCai.WinformUI.Panels.PanderPanelListW panelList = PanderPanelW10.Parent as XiaoCai.WinformUI.Panels.PanderPanelListW;
        ///        // and it's parent panelList is not null
        ///        if (panelList != null)
        ///        {
        ///            // expands PanderPanelW10 in it's panelList.
        ///            panelList.Expand(PanderPanelW10);
        ///        }
        ///    }
        /// }
        /// </code>
        /// </example>
		public void Expand(BasePanel panel)
		{
			if (panel == null)
			{
				throw new ArgumentNullException("panel",
					string.Format(System.Globalization.CultureInfo.InvariantCulture,
					 XiaoCai.WinformUI.Properties.Resources.IDS_ArgumentException,
					"panel"));
			}

			PanderPanelW PanderPanelW = panel as PanderPanelW;
			if (PanderPanelW != null)
			{
				foreach (PanderPanelW tmpPanderPanelW in this.m_PanderPanelWs)
				{
					if (tmpPanderPanelW.Equals(PanderPanelW) == false)
					{
						tmpPanderPanelW.Expand = false;
					}
				}
                PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(PanderPanelW)["Expand"];
                if (propertyDescriptor != null)
                {
                    propertyDescriptor.SetValue(PanderPanelW, true);
                }
			}
		}
Пример #6
0
		/// <summary>
        /// Initialize a new instance of the PanelColors class.
        /// </summary>
        /// <param name="basePanel">Base class for the panel or PanderPanelW control.</param>
        public PanelColors(BasePanel basePanel) : this()
        {
            this.m_basePanel = basePanel;
        }
 /// <summary>
 /// Initialize a new instance of the PanelColorsBlack class.
 /// </summary>
 /// <param name="basePanel">Base class for the panel or PanderPanelW control.</param>
 public PanelColorsBlack(BasePanel basePanel)
     : base(basePanel)
 {
 }
 /// <summary>
 /// Initialize a new instance of the PanelColorsOffice2007Silver class.
 /// </summary>
 /// <param name="basePanel">Base class for the panel or PanderPanelW control.</param>
 public PanelColorsOffice2007Silver(BasePanel basePanel)
     : base(basePanel)
 {
 }