public Result RunCode(string[] code) { _console.Invoker.CanAdd(); _console.SetWriting(true); _console.CreateThread(string.Join("\n", code)); _typer.SetConsoleActive(false); return(new Result()); }
public Result OpenFile(string path) { Result res = new Result(); try { if (File.Exists(path)) { this.path = path; ReadFile(path); ClearPage(); typer.SetConsoleActive(false); typer.Console.AddToApp(this); StartDisplayPosition(); } else { res.errors.Add("File is not exist"); } } catch { res.errors.Add("Can't open file"); } return(res); }