/// <summary>
 /// Fires <see cref="TabStripItemSelectionChanged" /> event.
 /// </summary>
 /// <param name="e">The <see cref="TabStripItemChangedEventArgs"/> instance containing the event data.</param>
 protected virtual void OnTabStripItemChanged(TabStripItemChangedEventArgs e)
 {
     if (TabStripItemSelectionChanged != null)
     {
         TabStripItemSelectionChanged(e);
     }
 }
Exemplo n.º 2
0
 private void tsFiles_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
 {
     if (CurrentTB != null)
     {
         CurrentTB.HotkeysMapping = keySettings;
     }
 }
Exemplo n.º 3
0
 private void OnTabStripItemChanged(TabStripItemChangedEventArgs e)
 {
     if (TabStripItemSelectionChanged != null)
     {
         TabStripItemSelectionChanged(e);
     }
 }
Exemplo n.º 4
0
 private void tsFiles_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
 {
     if (CurrentTB != null)
     {
         CurrentTB.Focus();
     }
 }
Exemplo n.º 5
0
 //切换标签页时会调用的函数,判断是否已经有标签页了
 private void CurrentFiles_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
 {
     if (CurrentTB != null)
     {
         CurrentTB.Focus();
         string text = CurrentTB.Text;
     }
 }
Exemplo n.º 6
0
 private void tabStrip_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
 {
     if (e.ChangeType == FATabStripItemChangeTypes.SelectionChanged)
     {
         CurrentTrace = GetCurrentTrace();
         EnableToolStripButtons();
     }
 }
Exemplo n.º 7
0
        private void OnSelectedTabChanged(TabStripItemChangedEventArgs e)
        {
            m_currentEditor = m_tabsToEditors[e.Item];

            if (EditorStatusChanged != null)
            {
                EditorStatusChanged(this, null);
            }
        }
Exemplo n.º 8
0
        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));
            }
        }
Exemplo n.º 9
0
        /// <summary>
        /// Handles the TsFiles_TabStripItemSelectionChanged event.
        /// </summary>
        /// <param name="e">Event Arguments<see cref="TabStripItemChangedEventArgs"/></param>
        private void TsFiles_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
        {
            UpdateDocumentMap();

            if (CurrentTB != null)
            {
                popupMenu = new AutocompleteMenu(CurrentTB);
                BuildAutocompleteMenu();
                UpdateChangedFlag(CurrentTB.IsChanged);
            }
        }
Exemplo n.º 10
0
 private void MapBrowser_TabStripItemSelectionChanged_1(TabStripItemChangedEventArgs e)
 {
     if (e.ChangeType == FATabStripItemChangeTypes.SelectionChanged &&
         activeMapEditor != null)
     {
         activeMapEditor.RemoveCanvas(mapCanvas);
         activeMapEditor = (MapEditor)e.Item;
         activeMapEditor.UpdateCanvas(mapCanvas);
         mapCanvas.Focus();
     }
 }
 private void tsFiles_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
 {
     if (CurrentTB != null)
     {
         CurrentTB.Focus();
         string text = CurrentTB.Text;
         ThreadPool.QueueUserWorkItem(
             (o) => ReBuildObjectExplorer(text)
             );
     }
 }
Exemplo n.º 12
0
        private void OnTabsChanged(TabStripItemChangedEventArgs e)
        {
            ChromiumWebBrowser browser = null;

            try
            {
                browser = ((ChromiumWebBrowser)e.Item.Controls[0]);
            }
            catch (System.Exception ex) { }


            if (e.ChangeType == FATabStripItemChangeTypes.SelectionChanged)
            {
                if (TabPages.SelectedItem == tabStripAdd)
                {
                    AddBlankTab();
                }
                else
                {
                    browser = CurBrowser;

                    SetFormURL(browser.Address);
                    SetFormTitle(browser.Tag.ConvertToString() ?? "New Tab");


                    EnableBackButton(browser.CanGoBack);
                    EnableForwardButton(browser.CanGoForward);
                }
            }

            if (e.ChangeType == FATabStripItemChangeTypes.Removed)
            {
                if (e.Item == downloadsStrip)
                {
                    downloadsStrip = null;
                }
                if (browser != null)
                {
                    browser.Dispose();
                }
            }

            if (e.ChangeType == FATabStripItemChangeTypes.Changed)
            {
                if (browser != null)
                {
                    if (currentFullURL != "about:blank")
                    {
                        browser.Focus();
                    }
                }
            }
        }
Exemplo n.º 13
0
 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;
     }
 }
Exemplo n.º 14
0
        private void faTab_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
        {
            FATabStripItem tab = (FATabStripItem)faTab.SelectedItem;

            if (tab != null && TAB_MONITOR.ContainsKey(tab))
            {
                SessionConfig sessionConfig = (SessionConfig)tab.Tag;
                if (null != sessionConfig)
                {
                    tsl_info1.Text = sessionConfig.Host + "@" + sessionConfig.UserName;
                }
            }
        }
Exemplo n.º 15
0
 private void tabStrip_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
 {
     try
     {
         FastColoredTextBox fctb = (FastColoredTextBox)tabStrip.SelectedItem.Controls[0];
         Text = "MCStudio - " + (fctb.Tag == null ? e.Item.Title : fctb.Tag.ToString());
         Fctb_SelectionChanged(fctb, new EventArgs());
     }
     catch (Exception ex)
     {
         FileSystem.WriteLog(ex);
     }
 }
 private void tsFiles_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
 {
     if (CurrentTb != null)
     {
         CurrentTb.Focus();
         string text = CurrentTb.Text;
         ThreadPool.QueueUserWorkItem(
             o => ReBuildObjectExplorer(text)
             );
         ThreadPool.QueueUserWorkItem(
             o => ReFoldLines()
             );
         CurrentTb.Invalidate();
     }
 }
Exemplo n.º 17
0
        private void tsFiles_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
        {
            this.Text = string.Format("Marlin Editor - {0}", e.Item.Tag);

            FastColoredTextBox tb = (e.Item.Controls[0] as FastColoredTextBox);

            //rebuild object explorer
            if (tb != null)
            {
                string text = tb.Text;
                ThreadPool.QueueUserWorkItem(
                    o => ReBuildObjectExplorer(text)
                    );
            }
        }
Exemplo n.º 18
0
 private void tabPages_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
 {
     if (e.ChangeType == FATabStripItemChangeTypes.SelectionChanged)
     {
         if (tabPages.SelectedItem == tabStripAdd)
         {
             AddNewBrowserTab("");
         }
         else
         {
             txtUrl.Text = Browser.Address;
             if (Browser.IsLoading)
             {
                 SetStatusProgress(PROGRESS_INDETERMINATE);
             }
             else
             {
                 SetStatusProgress(PROGRESS_DISABLED);
             }
             SetCanGoBack(Browser.CanGoBack);
             SetCanGoForward(Browser.CanGoForward);
         }
     }
     if (e.ChangeType == FATabStripItemChangeTypes.Removed)
     {
         if (e.Item == downloadsStrip)
         {
             downloadsStrip = null;
         }
         if (e.Item.Controls.Count > 0)
         {
             ((ChromiumWebBrowser)e.Item.Controls[0]).Dispose();
         }
     }
     if (e.ChangeType == FATabStripItemChangeTypes.Changed)
     {
         if (e.Item.Controls.Count > 0)
         {
             ((ChromiumWebBrowser)e.Item.Controls[0]).Focus();
         }
     }
 }
Exemplo n.º 19
0
 private void faTabStrip1_TabStripItemSelectionChanged(TabStripItemChangedEventArgs e)
 {
     e.Item.DisplayControl = this.listView1;
     BindListViewData(e.Item);
     this.ClearListViewSelectedItems();
 }
Exemplo n.º 20
0
        private static void OnTabStripSelectionChanged(TabStripItemChangedEventArgs e)
        {
            var doc = (FastColoredTextBox)e.Item.Controls[0];

            doc.Focus();
        }