示例#1
0
        public bool outputLog(string filename)
        {
            if (filename == null)
                filename = "emuera.log";

            if (OutputEmueraLog(Program.ExeDir + filename))
            {
                if (window.Created)
                {
                    bool notRedraw = false;
                    if (redraw == ConsoleRedraw.None)
                    {
                        notRedraw = true;
                        redraw = ConsoleRedraw.Normal;
                    }

                    PrintLine("※※※ログファイルを" + filename + "に出力しました※※※");
                    if (notRedraw)
                        redraw = ConsoleRedraw.None;
                }
                return true;
            }
            else
                return false;
        }
示例#2
0
 public void GotoTitle()
 {
     //if (state == ConsoleState.Error)
     //{
     //    MessageBox.Show("エラー発生時はこの機能は使えません");
     //}
     if (timer != null && timer.Enabled)
         stopTimer();
     displayLineList.Clear();
     ClearDisplay();
     logicalLineCount = 0;
     lineNo = 0;
     lastDrawnLineNo = -1;
     if (redraw == ConsoleRedraw.None)
         redraw = ConsoleRedraw.Normal;
     useUserStyle = false;
     userStyle = new StringStyle(Config.ForeColor, FontStyle.Regular, null);
     emuera.BeginTitle();
     state = ConsoleState.WaitKey;
     callEmueraProgram("");
     RefreshStrings(true);
 }
示例#3
0
 public void ReloadPartialErb(List<string> path)
 {
     if (state == ConsoleState.Error)
     {
         MessageBox.Show("エラー発生時はこの機能は使えません");
         return;
     }
     if (state == ConsoleState.Initializing)
     {
         MessageBox.Show("初期化中はこの機能は使えません");
         return;
     }
     bool notRedraw = false;
     if (redraw == ConsoleRedraw.None)
     {
         notRedraw = true;
         redraw = ConsoleRedraw.Normal;
     }
     if (timer != null && timer.Enabled)
     {
         timer.Stop();
         timer_suspended = true;
     }
     prevState = state;
     state = ConsoleState.Initializing;
     PrintSingleLine("ERB再読み込み中……", false, true);
     force_temporary = true;
     emuera.ReloadPartialErb(path);
     force_temporary = false;
     PrintSingleLine("再読み込み完了", false, true);
     RefreshStrings(true);
     //強制的にボタン世代が切り替わるのを防ぐ
     updatedGeneration = true;
     if (notRedraw)
         redraw = ConsoleRedraw.None;
 }
示例#4
0
 public void SetRedraw(Int64 i)
 {
     if ((i & 1) == 0)
         redraw = ConsoleRedraw.None;
     else
         redraw = ConsoleRedraw.Normal;
     if ((i & 2) != 0)
         RefreshStrings(true);
 }
示例#5
0
 public void ReloadFolder(string erbPath)
 {
     if (state == ConsoleState.Error)
     {
         MessageBox.Show("エラー発生時はこの機能は使えません");
         return;
     }
     if (state == ConsoleState.Initializing)
     {
         MessageBox.Show("初期化中はこの機能は使えません");
         return;
     }
     if (timer != null && timer.Enabled)
     {
         timer.Stop();
         timer_suspended = true;
     }
     List<string> paths = new List<string>();
     SearchOption op = SearchOption.AllDirectories;
     if (!Config.SearchSubdirectory)
         op = SearchOption.TopDirectoryOnly;
     string[] fnames = Directory.GetFiles(erbPath, "*.ERB", op);
     for (int i = 0; i < fnames.Length; i++)
         if (Path.GetExtension(fnames[i]).ToUpper() == ".ERB")
             paths.Add(fnames[i]);
     bool notRedraw = false;
     if (redraw == ConsoleRedraw.None)
     {
         notRedraw = true;
         redraw = ConsoleRedraw.Normal;
     }
     prevState = state;
     state = ConsoleState.Initializing;
     PrintSingleLine("ERB再読み込み中……", false, true);
     force_temporary = true;
     emuera.ReloadPartialErb(paths);
     force_temporary = false;
     PrintSingleLine("再読み込み完了", false, true);
     RefreshStrings(true);
     //強制的にボタン世代が切り替わるのを防ぐ
     updatedGeneration = true;
     if (notRedraw)
         redraw = ConsoleRedraw.None;
 }