當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.TabControlCancelEventArgs類代碼示例

本文整理匯總了C#中System.Windows.Forms.TabControlCancelEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# TabControlCancelEventArgs類的具體用法?C# TabControlCancelEventArgs怎麽用?C# TabControlCancelEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TabControlCancelEventArgs類屬於System.Windows.Forms命名空間,在下文中一共展示了TabControlCancelEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: frame_Selecting

 void frame_Selecting(object sender, TabControlCancelEventArgs e)
 {
     if (e.TabPage != page)
     {
         DeactivateControl();
     }
 }
開發者ID:pavelsavara,項目名稱:nMars,代碼行數:7,代碼來源:IDEFrame.cs

示例2: metroTabControl1_Deselecting

 private void metroTabControl1_Deselecting(object sender, TabControlCancelEventArgs e)
 {
     if (this.authorizeTabChange() == false)
     {
         e.Cancel = true;
     }
 }
開發者ID:julianhendricks,項目名稱:BKTMProjektSportfest,代碼行數:7,代碼來源:SportsFestivalManagementGUI.cs

示例3: tabs_Selecting

        private void tabs_Selecting(object sender, TabControlCancelEventArgs e)
        {
            string username = txtUsername.Text.Trim();
            string api_key = txtAPIKey.Text.Trim();

            if (e.TabPageIndex != 0)
            {
                if (username.Length == 0 || api_key.Length == 0)
                {
                    MessageBox.Show("Please enter your DataSift username and API key.", "Error");
                    e.Cancel = true;
                    return;
                }
            }

            if (m_user == null || m_user.getUsername() != username || m_user.getApiKey() != api_key)
            {
                m_user = null;
                m_user = new User(username, api_key);
            }

            if (e.TabPage.Text.EndsWith("*"))
            {
                e.TabPage.Text = e.TabPage.Text.TrimEnd(new char[] { '*' });
            }
        }
開發者ID:pavitardua,項目名稱:datasift-dotnet,代碼行數:26,代碼來源:Form1.cs

示例4: TabControl_Selecting

 /// <summary>
 /// When the tab control is selecting the preview tab page, we must process
 /// the user input and display the processed text to the browser.
 /// </summary>
 private void TabControl_Selecting(object sender, TabControlCancelEventArgs e)
 {
     if (e.TabPage == this.mTabPagePreview)
     {
         this.mHtmlPanel.Text = MarkdownHelper.TranslateWithStyle(this.mTextBoxUserInput.Text);
     }
 }
開發者ID:cmprog,項目名稱:IssueTracker,代碼行數:11,代碼來源:TextPreviewView.cs

示例5: tcTabs_Deselecting

        private void tcTabs_Deselecting(object sender, TabControlCancelEventArgs e)
        {
            if (tcTabs.SelectedTab == null)
                return;

            _tabMap[tcTabs.SelectedTab].OnControlInvisible();
        }
開發者ID:Silveryard,項目名稱:SmartHome,代碼行數:7,代碼來源:FormMain.cs

示例6: BaseTabs_Selecting

 private void BaseTabs_Selecting(object sender, TabControlCancelEventArgs e)
 {
     if (BaseTabs.SelectedIndex != CurrentStep)
     {
         BaseTabs.SelectTab(CurrentStep);
         MessageBox.Show("Use the 'Next Step ->' and '<- Previous Step' buttons on the bottom right and left corners of this window for navigation.");
     }
 }
開發者ID:0ks3ii,項目名稱:IronWASP,代碼行數:8,代碼來源:CreateNewRequestWizard.cs

示例7: tcResponse_Selecting

 private void tcResponse_Selecting(object sender, TabControlCancelEventArgs e)
 {
     if (e.TabPageIndex == 1 && !isOpened)
     {
         wbResponse.DocumentText = Response;
         isOpened = true;
     }
 }
開發者ID:RailTracker,項目名稱:ShareX,代碼行數:8,代碼來源:ResponseForm.cs

示例8: tabControl1_Selecting

 private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
 {
     DataTable dataTableSource = DataBasaManeger.GetTypeDateSet().Tables[e.TabPage.Text];
     adventureWorksLT2008DataSetBindingSource.DataSource = dataTableSource;
     bindingNavigator1.BindingSource = adventureWorksLT2008DataSetBindingSource;
     dataGridView1.DataSource = adventureWorksLT2008DataSetBindingSource;
     toolStripComboBox1.Items.Clear();
     foreach (DataColumn column in dataTableSource.Columns)
         toolStripComboBox1.Items.Add(column.ColumnName);
     toolStripComboBox1.SelectedIndex = 0;
 }
開發者ID:xs2ranjeet,項目名稱:13ns9-1spr,代碼行數:11,代碼來源:Form1.cs

示例9: tbPropiedades_Selecting

        private void tbPropiedades_Selecting(object sender, TabControlCancelEventArgs e)
        {
            if (bandera)
            {
                if (!cbReceta.Checked)
                {
                    e.Cancel = true;

                }
            }
        }
開發者ID:pepitweet,項目名稱:FreeCasher,代碼行數:11,代碼來源:frmArticulo.cs

示例10: TabPageRemove

 public void TabPageRemove(TabPage tp)
 {
     int i = SelectedTab == tp ? SelectedIndex == TabCount - 1 ? SelectedIndex - 1 : SelectedIndex : -1;
       if (TabPageRemoving != null)
       {
     TabControlCancelEventArgs tccea = new TabControlCancelEventArgs(tp, TabPages.IndexOf(tp), false, TabControlAction.Deselecting);
     TabPageRemoving(this, tccea);
     if (tccea.Cancel) return;
       }
       TabPages.Remove(tp);
       if (i >= 0) SelectedIndex = i;
 }
開發者ID:revam,項目名稱:Gemini,代碼行數:12,代碼來源:AdvancedTabControl.cs

示例11: tabControl1_Selecting

        private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
        {
            buttonSaveChanges.DataBindings.Remove(buttonSaveChanges.DataBindings[0]);
            buttonCancelChanges.DataBindings.Remove(buttonCancelChanges.DataBindings[0]);
            buttonDoUndo.DataBindings.Remove(buttonDoUndo.DataBindings[0]);
            buttonDoRedo.DataBindings.Remove(buttonDoRedo.DataBindings[0]);

            DataDisplayControl displayControl = e.TabPage.Controls[0] as DataDisplayControl;

            buttonSaveChanges.DataBindings.Add("Enabled", displayControl.Context, "ContainsLocalChanges", false, DataSourceUpdateMode.Never);
            buttonCancelChanges.DataBindings.Add("Enabled", displayControl.Context, "ContainsLocalChanges", false, DataSourceUpdateMode.Never);
            buttonDoUndo.DataBindings.Add("Enabled", displayControl.Context.Commands, "CanBackward", false, DataSourceUpdateMode.Never);
            buttonDoRedo.DataBindings.Add("Enabled", displayControl.Context.Commands, "CanForward", false, DataSourceUpdateMode.Never);
        }
開發者ID:netintellect,項目名稱:NetOffice,代碼行數:14,代碼來源:FormHost.cs

示例12: Close

        /// <summary>
        /// Closes the tab
        /// </summary>
        public void Close()
        {
            var parent = this.Parent as CustomTabControl;
            if (parent == null)
                return;

            int index;
            for (index = 0; index < parent.TabPages.Count; index++)
                if (parent.TabPages[index] == this)
                    break;

            var args = new TabControlCancelEventArgs(this, index, false, TabControlAction.Selected);
            this.Closing(parent, args);
            if (args.Cancel)
            {
                parent.TabPages.Remove(this);
                this.Dispose();
            }
        }
開發者ID:madelson,項目名稱:Emotiv-Experimenter,代碼行數:22,代碼來源:CustomTab.cs

示例13: TabControl_Deselecting

 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public virtual void TabControl_Deselecting(object sender, TabControlCancelEventArgs e)
 {
     if (!FakUserInterface.EventTilt)
     {
         if (AktivControl != null)
         {
             if (AktivControl.Tabinfo != null && AktivControl.Userabortkerdes(AktivControl.Tabinfo))
                 e.Cancel = true;
             else if (AktivControl.Aktualtablainfo != null && AktivControl.Userabortkerdes())
                 e.Cancel = true;
             if (AktivControl.Name == "Mezonevek")
             {
                 if (AktivControl.Tabinfo.Tablanev == "VALTOZASNAPLO" || AktivControl.Tabinfo.Tablanev == "USERLOG")
                     AktivControl.Tabinfo.Adattabla.Rows.Clear();
             }
         }
         else if (!e.TabPage.Enabled)
             e.Cancel = true;
     }
 }
開發者ID:AndrasD,項目名稱:VezIR,代碼行數:25,代碼來源:VezerloAlapControl.cs

示例14: tabControldanhmucnhacungcap_Selecting

 private void tabControldanhmucnhacungcap_Selecting(object sender, TabControlCancelEventArgs e)
 {
     try
     {
         if (!e.TabPage.Enabled)
         {
             e.Cancel = true;
         }
     }
     catch { }
 }
開發者ID:mrk29vn,項目名稱:vna-accounting,代碼行數:11,代碼來源:frmXuLyNhaCungCap.cs

示例15: tabControl_Deselecting

 private void tabControl_Deselecting(dynamic sender, TabControlCancelEventArgs e)
 {
     toolStripStatusLabel1.Text = "Switching Tab";
     dynamic control = sender as TabControl;
     if (control != null)
     {
         int currentindex = sender.SelectedIndex;
         var current = tabControl.TabPages[currentindex];
         bool go_ahead = true;
         switch (current.Text)
         {
             case "Configuration":
                 go_ahead = ConfirmIfConfigChanged();
                 break;
             case "Clusters":
                 break;
             case "Node Assignment":
                 break;
         }
         if (!go_ahead) toolStripStatusLabel1.Text = "Switching Tab Cancelled";
         e.Cancel = !go_ahead;
     }
 }
開發者ID:jango2015,項目名稱:Orek,代碼行數:23,代碼來源:AdminGui.cs


注:本文中的System.Windows.Forms.TabControlCancelEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。