本文整理汇总了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();
}
}
示例2: metroTabControl1_Deselecting
private void metroTabControl1_Deselecting(object sender, TabControlCancelEventArgs e)
{
if (this.authorizeTabChange() == false)
{
e.Cancel = true;
}
}
示例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[] { '*' });
}
}
示例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);
}
}
示例5: tcTabs_Deselecting
private void tcTabs_Deselecting(object sender, TabControlCancelEventArgs e)
{
if (tcTabs.SelectedTab == null)
return;
_tabMap[tcTabs.SelectedTab].OnControlInvisible();
}
示例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.");
}
}
示例7: tcResponse_Selecting
private void tcResponse_Selecting(object sender, TabControlCancelEventArgs e)
{
if (e.TabPageIndex == 1 && !isOpened)
{
wbResponse.DocumentText = Response;
isOpened = true;
}
}
示例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;
}
示例9: tbPropiedades_Selecting
private void tbPropiedades_Selecting(object sender, TabControlCancelEventArgs e)
{
if (bandera)
{
if (!cbReceta.Checked)
{
e.Cancel = true;
}
}
}
示例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;
}
示例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);
}
示例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();
}
}
示例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;
}
}
示例14: tabControldanhmucnhacungcap_Selecting
private void tabControldanhmucnhacungcap_Selecting(object sender, TabControlCancelEventArgs e)
{
try
{
if (!e.TabPage.Enabled)
{
e.Cancel = true;
}
}
catch { }
}
示例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;
}
}