Esempio n. 1
0
 public static void SelectAll()
 {
     if (TabManager.HasTabs())
     {
         RichTextBox Box = TabManager.GetBox();
         Box.SelectAll();
     }
 }
Esempio n. 2
0
 public static void Copy()
 {
     if (TabManager.HasTabs())
     {
         RichTextBox Box = TabManager.GetBox();
         Box.Copy();
     }
 }
Esempio n. 3
0
 public static void Paste()
 {
     if (TabManager.HasTabs())
     {
         RichTextBox Box = TabManager.GetBox();
         Box.Paste();
     }
 }
Esempio n. 4
0
 public static void RefreshColorHighlighter()
 {
     if (TabManager.HasTabs())
     {
         RichTextBox Box = TabManager.GetBox();
         ColorHighlighter.Parse(Box);
     }
 }
Esempio n. 5
0
  { public static void Insert(String Text)
    {
        if (TabManager.HasTabs())
        {
            RichTextBox Box = TabManager.GetBox();

            /* If text is selected, it is replaced. If
             * no text is selected, new text is inserted
             * at the insertion point or caret.           */

            Box.SelectedText = Text;
        }
    }
Esempio n. 6
0
  { public static void Close()
    {
        TabData Data = TabManager.GetSelectedTabData();

        DialogResult OK = IO_Save.SaveAskIfChanged(Data);

        if (OK == DialogResult.Cancel)
        {
            return;
        }

        TabManager.Remove();

        if (!TabManager.HasTabs())
        {
            State.NoFilesOpen();
        }
    }
Esempio n. 7
0
    public static int Find(String Text, int Index, RichTextBoxFinds Flags)
    {
        if (TabManager.HasTabs())
        {
            RichTextBox Box = TabManager.GetBox();

            Index = Box.Find(Text, Index, Flags);

            if (Index != -1)
            {
                Box.SelectionStart  = Index;
                Box.SelectionLength = Text.Length;
                Box.HideSelection   = false;
            }
        }
        else
        {
            Index = -1;
        }

        return(Index);
    }
Esempio n. 8
0
    protected override void OnClosing(CancelEventArgs CEA)
    {
        base.OnClosing(CEA);

        FileTree.This.Save();
        PanelLeft.Closing();

        if (TabManager.HasTabs())
        {
            IO_SaveAll.SaveAll();
        }

        if (Options_Registry.IsChecked)
        {
            RegistryManager.DeleteAccount();
            return;
        }

        if (WindowState == FormWindowState.Normal)
        {
            WindowStateManager.SetState((int)FormWindowState.Normal);

            Rectangle Rect = new Rectangle();

            Rect.Width  = Size.Width;
            Rect.Height = Size.Height;
            Rect.X      = Location.X;
            Rect.Y      = Location.Y;

            WindowLocationManager.SetLocation(Rect);
        }

        else if (WindowState == FormWindowState.Maximized)
        {
            WindowStateManager.SetState((int)FormWindowState.Maximized);
        }
    }