Exemplo n.º 1
0
 private void CodeEditor_OnPreviewKeyDown(object sender, KeyEventArgs e)
 {
     ManageTabs(e);
     ManageFormatting(e);
     if (e.Key == Key.Z &&
         (Keyboard.Modifiers & (ModifierKeys.Control | ModifierKeys.Alt)) ==
         (ModifierKeys.Control | ModifierKeys.Alt))
     {
         Redo();
     }
     //Whatever happens, if return is pressed, update the text at the end
     if (e.Key == Key.Return && Keyboard.Modifiers == ModifierKeys.None)
     {
         ScriptErrorLogger log = TextUpdated(Text);
         if (log != null)
         {
             Errors = log.Errors;
         }
         else
         {
             Errors.Clear();
         }
         InvalidateBlocks(0);
     }
 }
Exemplo n.º 2
0
        private ScriptErrorLogger UserControlTextUpdated(string Text)
        {
            //Setup the Code Viewer
            ScriptErrorLogger log = Viewer.SetupViewer(Editor.Text);

            Viewer.LinkedEditor = Editor;
            return(log);
        }