コード例 #1
0
ファイル: FATabStrip.cs プロジェクト: git-thinh/CefSharp71
 /// <summary>
 /// Fires <see cref="TabStripItemSelectionChanged"/> event.
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnTabStripItemChanged(TabStripItemChangedEventArgs e)
 {
     if (TabStripItemSelectionChanged != null)
     {
         TabStripItemSelectionChanged(e);
     }
 }
コード例 #2
0
 protected virtual void OnTabStripItemChanged(TabStripItemChangedEventArgs e)
 {
     if (this.TabStripItemSelectionChanged == null)
     {
         return;
     }
     this.TabStripItemSelectionChanged(e);
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: ku3mich/TabStrips
 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;
     }
 }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
 private void tabStrip_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
 {
     if(e.ChangeType == FATabStripItemChangeTypes.SelectionChanged)
     {
         CurrentTrace = GetCurrentTrace();
         EnableToolStripButtons();
     }
 }
コード例 #6
0
ファイル: FATabStrip.cs プロジェクト: DanWBR/dwsim3
 /// <summary>
 /// Fires <see cref="TabStripItemSelectionChanged"/> event.
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnTabStripItemChanged(TabStripItemChangedEventArgs e)
 {
     if (TabStripItemSelectionChanged != null)
         TabStripItemSelectionChanged(e);
 }
コード例 #7
0
ファイル: cRemote.cs プロジェクト: kisflying/kion
		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);
				}
			}
		}
コード例 #8
0
ファイル: FormMain.cs プロジェクト: shootsoft/PListEditor
 private void faTabStripMain_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
 {
     controller.SetActivate(e.Item);
 }
コード例 #9
0
ファイル: frmMain.cs プロジェクト: q55x8x/Peronality-Creator
        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));
            }
        }