/// <summary> /// Fires <see cref="TabStripItemSelectionChanged"/> event. /// </summary> /// <param name="e"></param> protected virtual void OnTabStripItemChanged(TabStripItemChangedEventArgs e) { if (TabStripItemSelectionChanged != null) { TabStripItemSelectionChanged(e); } }
protected virtual void OnTabStripItemChanged(TabStripItemChangedEventArgs e) { if (this.TabStripItemSelectionChanged == null) { return; } this.TabStripItemSelectionChanged(e); }
private void OnTabPageSelectionChanged(TabStripItemChangedEventArgs e) { if(e.Item != null && e.ChangeType == FATabStripItemChangeTypes.SelectionChanged) { FATabStripItem item = e.Item; cbCloseable.Checked = item.CanClose; } else if(e.Item == null) { cbCloseable.CheckState = CheckState.Indeterminate; } }
private void tabStrip_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e) { TBUndo.Enabled = TBRedo.Enabled = TBCut.Enabled = TBCopy.Enabled = TBPaste.Enabled = false; if (tabStrip.SelectedItem == null) { return; } if (tabStrip.SelectedItem.Tag is OpenLibFileData) { OpenLibFileData openFile = (OpenLibFileData)tabStrip.SelectedItem.Tag; suggestionBox.SetCurrentEditor(openFile.Editor); //Enable/disable undo/redo buttons if (!closedTabStrip) { openFile.Editor.ContextMenuStrip = editorRightClick; TBUndo.Enabled = openFile.Editor.UndoSys.CanUndo; TBRedo.Enabled = openFile.Editor.UndoSys.CanRedo; RightClickCut.Enabled = RightClickPaste.Enabled = TBCut.Enabled = TBPaste.Enabled = !openFile.Editor.IsReadonly; TBCopy.Enabled = RightClickCopy.Enabled = true; } closedTabStrip = false; } else if (tabStrip.SelectedItem.Tag is DialogData) { DialogData openFile = (DialogData)tabStrip.SelectedItem.Tag; if (tabStrip.SelectedItem == openFile.CodeTabPage) { suggestionBox.SetCurrentEditor(openFile.CodeEditor); //Enable/disable undo/redo buttons if (!closedTabStrip) { openFile.CodeEditor.ContextMenuStrip = editorRightClick; TBUndo.Enabled = openFile.CodeEditor.UndoSys.CanUndo; TBRedo.Enabled = openFile.CodeEditor.UndoSys.CanRedo; RightClickCut.Enabled = RightClickPaste.Enabled = TBCut.Enabled = TBPaste.Enabled = !openFile.CodeEditor.IsReadonly; TBCopy.Enabled = RightClickCopy.Enabled = true; } } else if (tabStrip.SelectedItem == openFile.DesignerTabPage) { suggestionBox.SetCurrentEditor(openFile.DesignerEditor); //Enable/disable undo/redo buttons if (!closedTabStrip) { openFile.DesignerEditor.ContextMenuStrip = editorRightClick; TBUndo.Enabled = openFile.DesignerEditor.UndoSys.CanUndo; TBRedo.Enabled = openFile.DesignerEditor.UndoSys.CanRedo; RightClickCut.Enabled = RightClickPaste.Enabled = TBCut.Enabled = TBPaste.Enabled = !openFile.DesignerEditor.IsReadonly; TBCopy.Enabled = RightClickCopy.Enabled = true; } } closedTabStrip = false; } else { OpenFileData openFile = (OpenFileData)tabStrip.SelectedItem.Tag; suggestionBox.SetCurrentEditor(openFile.Editor); openFile.Editor.Focus(); //Enable/disable undo/redo buttons if (!closedTabStrip) { openFile.Editor.ContextMenuStrip = editorRightClick; TBUndo.Enabled = openFile.Editor.UndoSys.CanUndo; TBRedo.Enabled = openFile.Editor.UndoSys.CanRedo; RightClickCut.Enabled = RightClickPaste.Enabled = TBCut.Enabled = TBPaste.Enabled = !openFile.Editor.IsReadonly; TBCopy.Enabled = RightClickCopy.Enabled = true; } closedTabStrip = false; } }
private void tabStrip_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e) { if(e.ChangeType == FATabStripItemChangeTypes.SelectionChanged) { CurrentTrace = GetCurrentTrace(); EnableToolStripButtons(); } }
/// <summary> /// Fires <see cref="TabStripItemSelectionChanged"/> event. /// </summary> /// <param name="e"></param> protected virtual void OnTabStripItemChanged(TabStripItemChangedEventArgs e) { if (TabStripItemSelectionChanged != null) TabStripItemSelectionChanged(e); }
private void faTabStrip_all_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e) { if (faTabStrip_all.SelectedItem != null) { try { if ((e.Item.item_type == "WEB") && (((WEBTabPage) e.Item).cwb.webBrowser_wb.Document != null)) { ((WEBTabPage) e.Item).cwb.webBrowser_wb.Document.Focus(); } if ((e.Item.item_type == "RDC") && (((RDCTabPage) e.Item).rdpc != null)) { ((RDCTabPage) e.Item).rdpc.Focus(); ((RDCTabPage) e.Item).rdpc.Select(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
private void faTabStripMain_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e) { controller.SetActivate(e.Item); }
private void tbStrip_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e) { this.CurrentTab = tbStrip.SelectedItem; if (this.CurrentTab?.Tag.GetType().BaseType == typeof(Script)) { ((Script)this.CurrentTab.Tag).autoMenu.Items.SetAutocompleteItems(AutoCompleteItemManager.getItemsWithVocabFiles(((Script)this.CurrentTab.Tag).Persona)); } }