private void ctxTabs_Rename_Click(object sender, EventArgs e) { System.Windows.Forms.TabPage selectedTab = this.tabControl.SelectedTab; TabNameForm tabNameForm = new TabNameForm(); tabNameForm.TabName = selectedTab.Text; tabNameForm.Text = "Rename"; if (tabNameForm.ShowDialog((IWin32Window)this) == DialogResult.OK) { selectedTab.Text = tabNameForm.TabName; } tabNameForm.Dispose(); }
private void ctxTabs_New_Click(object sender, EventArgs e) { System.Windows.Forms.TabPage selectedTab = this.tabControl.SelectedTab; TabNameForm tabNameForm = new TabNameForm(); tabNameForm.TabName = "New Tab Name"; tabNameForm.Text = "Add New Tab"; if (tabNameForm.ShowDialog((IWin32Window)this) == DialogResult.OK) { this.InsertTab(this.tabControl.TabPages.IndexOf(selectedTab) + 1, tabNameForm.TabName); } tabNameForm.Dispose(); }
private void ctxTabs_Rename_Click(object sender, EventArgs e) { System.Windows.Forms.TabPage selectedTab = this.tabControl.SelectedTab; TabNameForm tabNameForm = new TabNameForm(); tabNameForm.TabName = selectedTab.Text; tabNameForm.Text = "Rename"; if (tabNameForm.ShowDialog((IWin32Window) this) == DialogResult.OK) selectedTab.Text = tabNameForm.TabName; tabNameForm.Dispose(); }
private void ctxTabs_New_Click(object sender, EventArgs e) { System.Windows.Forms.TabPage selectedTab = this.tabControl.SelectedTab; TabNameForm tabNameForm = new TabNameForm(); tabNameForm.TabName = "New Tab Name"; tabNameForm.Text = "Add New Tab"; if (tabNameForm.ShowDialog((IWin32Window) this) == DialogResult.OK) this.InsertTab(this.tabControl.TabPages.IndexOf(selectedTab) + 1, tabNameForm.TabName); tabNameForm.Dispose(); }