当前位置: 首页>>代码示例>>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;未经允许,请勿转载。