示例#1
0
 private void openToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Coloring.counter = 0;
     MenuItemEvents.OpenFile();
     if (Coloring.counter == 0)
     {
         Coloring.DoFirstColoring();
     }
 }
示例#2
0
 public static void Init(RichTextBox editor, RichTextBox errorLog, ListBox suggestionBox)
 {
     Utility.Init(editor, errorLog, suggestionBox);
     KeyEventsHandler.Init(editor, errorLog, suggestionBox);
     TokenGenerator.InitBox(editor);
     Highlighter.Init(editor);
     SuggestionProvider.InitSuggestionProvider(new List <string>(), suggestionBox, editor);
     Coloring.InitColoring(editor);
     Helper.Init();
     MenuItemEvents.Init(editor);
 }
        public static void EditorMulitpleKeyPressHandler(Keys key)
        {
            switch (key)
            {
            case Keys.K:
                Utility.CommentCode();
                break;

            case Keys.S:
                MenuItemEvents.SaveFile();
                break;

            case Keys.O:
                MenuItemEvents.OpenFile();
                break;

            case Keys.R:
                MenuItemEvents.Run();
                break;
            }
        }
示例#4
0
 private void runToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MenuItemEvents.Run();
 }
示例#5
0
 private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MenuItemEvents.About();
 }
示例#6
0
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MenuItemEvents.SaveFile();
 }
示例#7
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MenuItemEvents.ClearEditor();
 }