예제 #1
0
파일: MainView.cs 프로젝트: pre078/ApsimX
        /// <summary>User is closing a tab.</summary>
        private void OnCloseTabClick2(object sender, EventArgs e)
        {
            TabEventArgs args = new TabEventArgs();

            args.LeftTabControl = false;

            if (TabClosing != null)
            {
                args.Name  = tabControl2.SelectedTab.Text;
                args.Index = tabControl2.SelectedIndex;
                TabClosing.Invoke(this, args);
            }

            if (tabControl2.SelectedTab.Text != indexTabText)
            {
                tabControl2.TabPages.Remove(tabControl2.SelectedTab);
            }
        }
예제 #2
0
파일: MainView.cs 프로젝트: hut104/ApsimX
        /// <summary>User is closing a tab.</summary>
        private void OnCloseTabClick2(object sender, EventArgs e)
        {
            TabEventArgs args = new TabEventArgs();
            args.LeftTabControl = false;

            if (TabClosing != null)
            {
                args.Name = tabControl2.SelectedTab.Text;
                args.Index = tabControl2.SelectedIndex;
                TabClosing.Invoke(this, args);
            }

            if (tabControl2.SelectedTab.Text != indexTabText)
                tabControl2.TabPages.Remove(tabControl2.SelectedTab);
        }