static void fileNew() { if (canDestroy()) { _file = new FncFile(); _filePath = null; _fileChanged = false; Console.Title = "Untitled — Editon"; updateAfterEdit(); } }
static void fileOpen(string filePath, bool doThrow) { try { _file = Parse(filePath); _filePath = filePath; _fileChanged = false; Invalidate(0, 0, Console.BufferWidth, Console.BufferHeight); Console.Title = Path.GetFileName(_filePath) + " — Editon"; updateAfterEdit(); } catch (Exception e) { if (doThrow) { throw; } DlgMessage.Show("{0} ({1})".Fmt(e.Message, e.GetType().Name), "Error", DlgType.Error); } }
static void fileOpen(string filePath, bool doThrow) { try { _file = Parse(filePath); _filePath = filePath; _fileChanged = false; Invalidate(0, 0, Console.BufferWidth, Console.BufferHeight); Console.Title = Path.GetFileName(_filePath) + " — Editon"; updateAfterEdit(); } catch (Exception e) { if (doThrow) throw; DlgMessage.Show("{0} ({1})".Fmt(e.Message, e.GetType().Name), "Error", DlgType.Error); } }