Esempio n. 1
0
 private void OK()
 {
     if (this.InvokeRequired)
     {
         ShowOKMessage ok = new ShowOKMessage(OK);
         this.Invoke(ok);
     }
     else
     {
         StringBuilder sb = new StringBuilder();
         if (DcmNotExistPath.Count > 0)
         {
             sb.Append("以下檔案在JSON檔的相同路徑找不到檔案" + Environment.NewLine);
             foreach (string ErrorPath in DcmNotExistPath)
             {
                 sb.Append(String.Format("{0}{1}", ErrorPath, Environment.NewLine));
             }
             string ReightNowWorkPath = Directory.GetCurrentDirectory();
             string ErrorWorkPath     = String.Format("ConvertError_{0}.txt", DateTime.Now.ToString("yyyyMMddHHmm"));
             string ErrorLogPath      = Path.Combine(ReightNowWorkPath, ErrorWorkPath);
             Func.WriteText(ErrorLogPath, sb.ToString());
             MessageBox.Show(sb.ToString(), "錯誤訊息", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             MessageBox.Show("處理完成", "訊息");
         }
     }
 }
 private void OK()
 {
     if (this.InvokeRequired)
     {
         ShowOKMessage ok = new ShowOKMessage(OK);
         this.Invoke(ok);
     }
     else
     {
         MessageBox.Show("處理完成", "訊息");
     }
 }