• C#XtraTabControl封装研究中


    using DevExpress.XtraTab;
    using MDI;
    using System;
    
    namespace MyDll
    {
        public partial class MyXtraTabControl : XtraTabControl
        {
            public MyXtraTabControl()
            {
                InitializeComponent();
            }
            private DevExpress.XtraTab.XtraTabPage CurrentPage = null;
            private void MyXtraTabControl_HotTrackedPageChanged(object sender, TabPageChangedEventArgs e)
            {
                try
                {
                    CurrentPage = e.Page;
    
                }
                catch (System.Exception ex)
                {
                    CurrentPage = null;
                }
            }
    
            private void MyXtraTabControl_DoubleClick(object sender, EventArgs e)
            {
                if (CurrentPage != null)
                {
                    // CurrentPage.PageVisible = false;
                    Class1.CloseOneTabPage(this);
                }
            }
            private void MyXtraTabControl_CloseButtonClick(object sender, EventArgs e)
            {
                Class1.CloseOneTabPage(this);
    
            }
        }
    }
    namespace MyDll
    {
        partial class MyXtraTabControl
        {
            /// <summary> 
            /// 必需的设计器变量。
            /// </summary>
            private System.ComponentModel.IContainer components = null;
    
            /// <summary> 
            /// 清理所有正在使用的资源。
            /// </summary>
            /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
            protected override void Dispose(bool disposing)
            {
                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }
    
            #region 组件设计器生成的代码
    
            /// <summary> 
            /// 设计器支持所需的方法 - 不要
            /// 使用代码编辑器修改此方法的内容。
            /// </summary>
            private void InitializeComponent()
            {
                ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
                this.SuspendLayout();
                // 
                // MyXtraTabControl
                // 
                this.ClosePageButtonShowMode = DevExpress.XtraTab.ClosePageButtonShowMode.InAllTabPageHeaders;
                this.Dock = System.Windows.Forms.DockStyle.Fill;
                this.HeaderAutoFill = DevExpress.Utils.DefaultBoolean.False;
                this.HeaderButtons = ((DevExpress.XtraTab.TabButtons)(((DevExpress.XtraTab.TabButtons.Prev | DevExpress.XtraTab.TabButtons.Next)
                            | DevExpress.XtraTab.TabButtons.Close)));
                this.HeaderButtonsShowMode = DevExpress.XtraTab.TabButtonShowMode.Always;
                this.Location = new System.Drawing.Point(0, 25);
                this.Name = "MainTabControl";
                this.ShowHeaderFocus = DevExpress.Utils.DefaultBoolean.True;
                this.ShowTabHeader = DevExpress.Utils.DefaultBoolean.True;
                this.Size = new System.Drawing.Size(1042, 496);
                this.TabIndex = 20;
                this.DoubleClick += new System.EventHandler(this.MyXtraTabControl_DoubleClick);
                this.CloseButtonClick += new System.EventHandler(this.MyXtraTabControl_CloseButtonClick);
                this.HotTrackedPageChanged += new DevExpress.XtraTab.TabPageChangedEventHandler(this.MyXtraTabControl_HotTrackedPageChanged);
                ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
                this.ResumeLayout(false);
    
            }
    
            #endregion
    
        }
    }
  • 相关阅读:
    平面几何-9 (海边直播目标2017全国初中数学竞赛班第14周作业题)
    数学奥林匹克问题解答:平面几何-8
    数学奥林匹克问题解答:平面几何-7
    lazyload懒加载插件
    Vue的生命周期
    用Vue来实现音乐播放器(九):歌单数据接口分析
    axios的详细用法以及后端接口代理
    用Vue来实现音乐播放器(八):自动轮播图啊
    Vue实现音乐播放器(七):轮播图组件(二)
    Vue实现音乐播放器(六):jsonp的应用+抓取轮播图数据
  • 原文地址:https://www.cnblogs.com/bantongshui/p/3258573.html
Copyright © 2020-2023  润新知