Beispiel #1
0
 private void InitializeComponent()
 {
     this.tabMain = new Mubea.GUI.CustomControl.FreshTabCtrl();
     this.SuspendLayout();
     //
     // tabMain
     //
     this.tabMain.Dock                  = System.Windows.Forms.DockStyle.Fill;
     this.tabMain.DrawMode              = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
     this.tabMain.IsDisplayBorder       = false;
     this.tabMain.ItemSize              = new System.Drawing.Size(280, 55);
     this.tabMain.Location              = new System.Drawing.Point(0, 0);
     this.tabMain.Name                  = "tabMain";
     this.tabMain.SelectedIndex         = 0;
     this.tabMain.Size                  = new System.Drawing.Size(417, 384);
     this.tabMain.SizeMode              = System.Windows.Forms.TabSizeMode.Fixed;
     this.tabMain.TabIndex              = 0;
     this.tabMain.TabTextFont           = new System.Drawing.Font("YaHei Consolas Hybrid", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.tabMain.SelectedIndexChanged += new System.EventHandler(this.tabMain_SelectedIndexChanged);
     //
     // BaseContainerForm
     //
     this.BackColor  = System.Drawing.Color.White;
     this.ClientSize = new System.Drawing.Size(417, 384);
     this.Controls.Add(this.tabMain);
     this.Name  = "BaseContainerForm";
     this.Load += new System.EventHandler(this.BaseContainerForm_Load);
     this.ResumeLayout(false);
 }
        /// <summary>
        /// 禁止切换界面
        /// </summary>
        /// <param name="bDisable"></param>
        public void DisableSwitchTabPage(bool bDisable)
        {
            MainForm.DisableSwitchForm = bDisable;

            if (this.Parent != null)
            {
                FreshTabCtrl tabCtrl = this.Parent.Parent as FreshTabCtrl;

                if (tabCtrl != null)
                {
                    tabCtrl.DisableChangeTable = bDisable;
                }
            }
        }