コード例 #1
0
 static void fileNew()
 {
     if (canDestroy())
     {
         _file         = new FncFile();
         _filePath     = null;
         _fileChanged  = false;
         Console.Title = "Untitled — Editon";
         updateAfterEdit();
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
ファイル: EditonProgram.cs プロジェクト: Timwi/Editon
 static void fileNew()
 {
     if (canDestroy())
     {
         _file = new FncFile();
         _filePath = null;
         _fileChanged = false;
         Console.Title = "Untitled — Editon";
         updateAfterEdit();
     }
 }
コード例 #4
0
ファイル: EditonProgram.cs プロジェクト: Timwi/Editon
 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);
     }
 }