private Editor CreateEditor(TextBox tbx) { var autoCompleter = new AutoCompleter(tbx) { AutoComplete = () => mniAutocompletion.Checked, ArgsChecks = () => mniArgChecks.Checked, CheckDeprecated = () => mniCheckDeprecated.Checked, }; var editor = new Editor(tbx) { AutoCompletion = autoCompleter.Handle, IsWordChar = c => char.IsLetterOrDigit(c) || c == '_' }; return editor; }
public MainForm(string[] args) { InitializeComponent(); InitializeMacros(); _Recipe = new Recipe(); _Recipe.Message += HandleMessage; _Recipe.Input = GetInput; _Recipe.Interactive = true; _Recipe.Write = false; _Recipe.Warn = true; _Recipe.Log = true; _Recipe.Show = true; _Editor1 = CreateEditor(txtRecipe); _Editor2 = CreateEditor(txtNotepad); _ScriptWatch = new FileSystemWatcher(); _ScriptWatch.Changed += new FileSystemEventHandler(ScriptWatch_Changed); if (args.Length > 0) Open(args[0]); }
private void txt_Enter(object sender, EventArgs e) { if (sender == txtRecipe) _CurrentEditor = _Editor1; else if (sender == txtNotepad) _CurrentEditor = _Editor2; }