コード例 #1
0
        private void OnTabTitleDoubleClicked(object sender, EventArgs e)
        {
            Crownwood.DotNetMagic.Controls.TitleBar titleBar = (Crownwood.DotNetMagic.Controls.TitleBar)sender;
            TabGroupLeaf tgl = GetLeafForTitleBar(titleBar);

            ToggleLeaf(tgl);
        }
コード例 #2
0
 public static void SetTitleBarStyle(Crownwood.DotNetMagic.Controls.TitleBar titleBar)
 {
     titleBar.BackColor           = MacroDarkBlue;
     titleBar.ForeColor           = Color.White;
     titleBar.GradientActiveColor = MacroDarkBlue;
     titleBar.GradientColoring    = GradientColoring.LightBackToGradientColor;
     titleBar.GradientDirection   = GradientDirection.TopToBottom;
 }
コード例 #3
0
        private void OnTabTitleClicked(object sender, EventArgs e)
        {
            Crownwood.DotNetMagic.Controls.TitleBar titleBar = (Crownwood.DotNetMagic.Controls.TitleBar)sender;
            TabGroupLeaf selectedLeaf = GetLeafForTitleBar(titleBar);

            if (IsLeafExpanded(selectedLeaf))
            {
                ChangeComponentPageFromLeaf(selectedLeaf);
            }
        }
コード例 #4
0
        private TabGroupLeaf GetLeafForTitleBar(Crownwood.DotNetMagic.Controls.TitleBar titleBar)
        {
            TabGroupLeaf tgl = _stackTabControl.FirstLeaf();

            while (tgl != null)
            {
                // Extract the StackTabTitleBar instance from page
                Crownwood.DotNetMagic.Controls.TitleBar tb = GetTitleBarForPage(tgl.TabPages[0]);
                if (tb == titleBar)
                {
                    break;
                }

                tgl = _stackTabControl.NextLeaf(tgl);
            }

            return(tgl);
        }
コード例 #5
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StackTab));
     this._titleBar         = new Crownwood.DotNetMagic.Controls.TitleBar();
     this._panel            = new System.Windows.Forms.Panel();
     this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
     this.tableLayoutPanel1.SuspendLayout();
     this.SuspendLayout();
     //
     // _titleBar
     //
     this._titleBar.ArrowButton = Crownwood.DotNetMagic.Controls.ArrowButton.DownArrow;
     resources.ApplyResources(this._titleBar, "_titleBar");
     this._titleBar.GradientColoring = Crownwood.DotNetMagic.Controls.GradientColoring.LightBackToDarkBack;
     this._titleBar.ImageAlignment   = Crownwood.DotNetMagic.Controls.ImageAlignment.Far;
     this._titleBar.MouseOverColor   = System.Drawing.Color.Empty;
     this._titleBar.Name             = "_titleBar";
     this._titleBar.Style            = Crownwood.DotNetMagic.Common.VisualStyle.Office2007Black;
     this._titleBar.Click           += new System.EventHandler(this.OnTitleClicked);
     this._titleBar.ButtonClick     += new System.EventHandler(this.OnButtonClick);
     this._titleBar.DoubleClick     += new System.EventHandler(this.OnTitleDoubleClick);
     //
     // _panel
     //
     resources.ApplyResources(this._panel, "_panel");
     this._panel.Name = "_panel";
     //
     // tableLayoutPanel1
     //
     resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
     this.tableLayoutPanel1.Controls.Add(this._titleBar, 0, 0);
     this.tableLayoutPanel1.Controls.Add(this._panel, 0, 1);
     this.tableLayoutPanel1.Name = "tableLayoutPanel1";
     //
     // StackTab
     //
     this.Controls.Add(this.tableLayoutPanel1);
     this.Name = "StackTab";
     resources.ApplyResources(this, "$this");
     this.tableLayoutPanel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
コード例 #6
0
ファイル: TitleBar.cs プロジェクト: nhannd/Xian
		/// <summary>
		/// Initializes a new instance of <see cref="TitleBar"/>.
		/// </summary>
		public TitleBar()
		{
			SuspendLayout();

			_titleBar = new Crownwood.DotNetMagic.Controls.TitleBar();
			_titleBar.Dock = DockStyle.Fill;
			_titleBar.Text = string.Empty;
			_titleBar.MouseOverColor = Color.Empty;
			_titleBar.Style = VisualStyle.IDE2005;
			_titleBar.BackColor = Application.CurrentUITheme.Colors.StandardColorDark;
			_titleBar.ForeColor = Color.White;
			_titleBar.GradientActiveColor = Application.CurrentUITheme.Colors.StandardColorDark;
			_titleBar.GradientColoring = GradientColoring.LightBackToGradientColor;
			_titleBar.GradientDirection = GradientDirection.TopToBottom;

			Controls.Add(_titleBar);
			ResumeLayout(false);
			PerformLayout();

			Application.CurrentUIThemeChanged += HandleApplicationCurrentUIThemeChanged;
		}
コード例 #7
0
        /// <summary>
        /// Initializes a new instance of <see cref="TitleBar"/>.
        /// </summary>
        public TitleBar()
        {
            SuspendLayout();

            _titleBar                     = new Crownwood.DotNetMagic.Controls.TitleBar();
            _titleBar.Dock                = DockStyle.Fill;
            _titleBar.Text                = string.Empty;
            _titleBar.MouseOverColor      = Color.Empty;
            _titleBar.Style               = VisualStyle.Office2007Black;
            _titleBar.BackColor           = Application.CurrentUITheme.Colors.StandardColorDark;
            _titleBar.ForeColor           = Color.White;
            _titleBar.GradientActiveColor = Application.CurrentUITheme.Colors.StandardColorDark;
            _titleBar.GradientColoring    = GradientColoring.LightBackToDarkBack;
            _titleBar.GradientDirection   = GradientDirection.TopToBottom;

            Controls.Add(_titleBar);
            ResumeLayout(false);
            PerformLayout();

            Application.CurrentUIThemeChanged += HandleApplicationCurrentUIThemeChanged;
        }
コード例 #8
0
        private static void SetArrowState(Crownwood.DotNetMagic.Controls.TitleBar titleBar, bool open)
        {
            switch (titleBar.ArrowButton)
            {
            case ArrowButton.UpArrow:
            case ArrowButton.DownArrow:
                titleBar.ArrowButton = open ? ArrowButton.UpArrow : ArrowButton.DownArrow;
                break;

            case ArrowButton.LeftArrow:
            case ArrowButton.RightArrow:
                titleBar.ArrowButton = open ? ArrowButton.LeftArrow : ArrowButton.RightArrow;
                break;

            case ArrowButton.Pinned:
            case ArrowButton.Unpinned:
                titleBar.ArrowButton = open ? ArrowButton.Unpinned : ArrowButton.Pinned;
                break;

            default:
                break;
            }
        }
コード例 #9
0
ファイル: StackTab.cs プロジェクト: nhannd/Xian
		/// <summary> 
		/// Required method for Designer support - do not modify 
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StackTab));
			this._titleBar = new Crownwood.DotNetMagic.Controls.TitleBar();
			this._panel = new System.Windows.Forms.Panel();
			this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
			this.tableLayoutPanel1.SuspendLayout();
			this.SuspendLayout();
			// 
			// _titleBar
			// 
			this._titleBar.ArrowButton = Crownwood.DotNetMagic.Controls.ArrowButton.DownArrow;
			resources.ApplyResources(this._titleBar, "_titleBar");
			this._titleBar.GradientColoring = Crownwood.DotNetMagic.Controls.GradientColoring.LightBackToDarkBack;
			this._titleBar.ImageAlignment = Crownwood.DotNetMagic.Controls.ImageAlignment.Far;
			this._titleBar.MouseOverColor = System.Drawing.Color.Empty;
			this._titleBar.Name = "_titleBar";
			this._titleBar.Style = Crownwood.DotNetMagic.Common.VisualStyle.Office2007Black;
			this._titleBar.Click += new System.EventHandler(this.OnTitleClicked);
			this._titleBar.ButtonClick += new System.EventHandler(this.OnButtonClick);
			this._titleBar.DoubleClick += new System.EventHandler(this.OnTitleDoubleClick);
			// 
			// _panel
			// 
			resources.ApplyResources(this._panel, "_panel");
			this._panel.Name = "_panel";
			// 
			// tableLayoutPanel1
			// 
			resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
			this.tableLayoutPanel1.Controls.Add(this._titleBar, 0, 0);
			this.tableLayoutPanel1.Controls.Add(this._panel, 0, 1);
			this.tableLayoutPanel1.Name = "tableLayoutPanel1";
			// 
			// StackTab
			// 
			this.Controls.Add(this.tableLayoutPanel1);
			this.Name = "StackTab";
			resources.ApplyResources(this, "$this");
			this.tableLayoutPanel1.ResumeLayout(false);
			this.ResumeLayout(false);

		}