Example #1
0
 private void main_Loaded(object sender, RoutedEventArgs e)
 {
     g_TabManager = new TabManager();
     createBlankTab("default");
     g_TabManager = new TabManager(g_files[0]);
     GetActiveBox().AddHandler(RichTextBox.SelectionChangedEvent, new RoutedEventHandler(RichTextBox_SelectionChanged)); //register event handler to that new document
 }
Example #2
0
        }//end getActiveTab

        private void TabControl_ChangeTab(object sender, SelectionChangedEventArgs e)
        {
            //Create dynamic event handler for the newly selected richtext box
            RichTextBox active = GetActiveBox();

            if (active != null)
            {
                GetActiveBox().AddHandler(RichTextBox.SelectionChangedEvent, new RoutedEventHandler(RichTextBox_SelectionChanged));
            }

            //Set the title
            File temp = GetActiveTabObject();

            if (temp != null)
            {
                //Assign the newly selected tab to tabmanager
                g_TabManager = new TabManager(g_files.ElementAt(mainTabControl.SelectedIndex));

                if (temp.Path == "")
                {
                    mainWindow.Title = temp.Tab.Header + " - TextyEdit++";
                }
                else
                {
                    mainWindow.Title = temp.Path + " - TextyEdit++";
                }
            }
        }//end of Tab change
Example #3
0
        private void TabControl_ChangeTab(object sender, SelectionChangedEventArgs e)
        {
            //Create dynamic event handler for the newly selected richtext box
            RichTextBox active = GetActiveBox();
            if(active != null)
                GetActiveBox().AddHandler(RichTextBox.SelectionChangedEvent, new RoutedEventHandler(RichTextBox_SelectionChanged));

            //Set the title
            File temp = GetActiveTabObject();
            if (temp != null)
            {
                //Assign the newly selected tab to tabmanager
                g_TabManager = new TabManager(g_files.ElementAt(mainTabControl.SelectedIndex));

                if (temp.Path == "")
                    mainWindow.Title = temp.Tab.Header + " - TextyEdit++";
                else
                    mainWindow.Title = temp.Path + " - TextyEdit++";
            }
        }
Example #4
0
 private void main_Loaded(object sender, RoutedEventArgs e)
 {
     g_TabManager = new TabManager();
     createBlankTab("default");
     g_TabManager = new TabManager(g_files[0]);
     GetActiveBox().AddHandler(RichTextBox.SelectionChangedEvent, new RoutedEventHandler(RichTextBox_SelectionChanged)); //register event handler to that new document
 }