• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.TabControlCancelEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Forms.TabControlCancelEventArgs的典型用法代码示例。如果您正苦于以下问题:C# TabControlCancelEventArgs类的具体用法?C# TabControlCancelEventArgs怎么用?C# TabControlCancelEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TabControlCancelEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了TabControlCancelEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: CloseTab

        /// <summary>
        /// The close tab.
        /// </summary>
        /// <param name="index">
        /// The index.
        /// </param>
        private void CloseTab(int index)
        {
            // 	If we are clicking on a closer then remove the tab instead of raising the standard mouse click event. But raise the tab closing event first
            TabPage tab = this.TabPages[index];
            if (this.TabPageClosing != null)
            {
                var args = new TabControlCancelEventArgs(tab, index, false, TabControlAction.Deselecting);
                this.TabPageClosing(this, args);
                if (args.Cancel)
                {
                    return;
                }
            }

            this.TabPages.Remove(tab);
            tab.Dispose();
        }
开发者ID:tu-tran,项目名称:FareLiz,代码行数:23,代码来源:FlatTabControl.Events.cs


示例17: OnDeselecting

        /// <summary>
        /// The on deselecting.
        /// </summary>
        /// <param name="e">
        /// The e.
        /// </param>
        protected override void OnDeselecting(TabControlCancelEventArgs e)
        {
            var mouseLoc = this.PointToClient(MousePosition);
            var index = this.ActiveIndex;
            if (index != e.TabPageIndex)
            {
                if ((this.UseTabReloader && this.TabPageReloading != null && this.GetReloaderRect(index).Contains(mouseLoc))
                    || (this.UseTabCloser && this.GetCloserRect(index).Contains(mouseLoc)))
                {
                    e.Cancel = true;
                }
            }

            // Tab Closer should be handled at last since it may remove the tab!
            base.OnDeselecting(e);
        }
开发者ID:tu-tran,项目名称:FareLiz,代码行数:22,代码来源:FlatTabControl.Events.cs


示例18: tabControl1_Selecting

 private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
 {
     if (tabControl1.Controls[0] == tabControl1.SelectedTab)
         saveDir = Properties.Settings.Default.trainer_folder + "/pc";
     else if (tabControl1.Controls[1] == tabControl1.SelectedTab)
         saveDir = Properties.Settings.Default.trainer_folder + "/ps3";
     else if(tabControl1.Controls[2] == tabControl1.SelectedTab)
         saveDir = Properties.Settings.Default.trainer_folder + "/xbox360";
     else if (tabControl1.Controls[3] == tabControl1.SelectedTab)
         saveDir = Properties.Settings.Default.trainer_folder + "/wiiu";
     label2.Visible = true;
     listView1.Cursor = Cursors.WaitCursor;
     listView2.Cursor = Cursors.WaitCursor;
     listView3.Cursor = Cursors.WaitCursor;
     listView4.Cursor = Cursors.WaitCursor;
     if (!backgroundWorker1.IsBusy)
         backgroundWorker1.RunWorkerAsync();
 }
开发者ID:erfg12,项目名称:Game-Trainers,代码行数:18,代码来源:Form1.cs


示例19: tabControl_Selecting

 private void tabControl_Selecting(object sender, TabControlCancelEventArgs e) {
     if (ChangingPage) ChangingPage = false;
     else e.Cancel = true;
 }
开发者ID:mdmallardi,项目名称:MGE-XE,代码行数:4,代码来源:DistantLandForm.cs


示例20: m_tabControl_Selecting

		private void m_tabControl_Selecting(object sender, TabControlCancelEventArgs e)
		{
			StyleInfo info = null;
			StyleListItem item = m_styleListHelper.SelectedStyle;
			if (item != null)
			{
				info = (StyleInfo)item.StyleInfo;
				Debug.Assert(info != null ||
							 (m_tabControl.SelectedTab == m_tbGeneral && item.IsDefaultParaCharsStyle),
					"StyleInfo should only be null for Default Paragraph Characters");
			}
			IStylesTab tab = (IStylesTab)m_tabControl.SelectedTab.Controls[0];
			tab.UpdateForStyle(info);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:14,代码来源:FwStylesDlg.cs



注:本文中的System.Windows.Forms.TabControlCancelEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.TabControlEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Forms.TabControl类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap