Browse Source

优化信息展示框字体颜色,保持提示音不变,打印模板下载调整地址

yhluo 1 week ago
parent
commit
2129f91d5a

+ 9 - 5
UAS_MES_YTDZ/CustomControl/RichText/RichTextAutoBottom.cs

@@ -185,9 +185,10 @@ namespace UAS_MES_NEW.CustomControl.RichText
             if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
             if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
             {
             {
                 if(str.Contains("缺料"))
                 if(str.Contains("缺料"))
-                FileName = Application.StartupPath + @"\Resources\Sound\缺料.wav";
+                    FileName = Application.StartupPath + @"\Resources\Sound\缺料.wav";
                 else
                 else
-                FileName = Application.StartupPath + @"\Resources\Sound\5185.wav";
+                    //FileName = Application.StartupPath + @"\Resources\Sound\5185.wav";
+                    FileName = Application.StartupPath + @"\Resources\Sound\1454.wav";
                 thread.Start();
                 thread.Start();
                 thread = new Thread(PlaySound);
                 thread = new Thread(PlaySound);
                 CustomMessageBox.Show(str, "异常提示");
                 CustomMessageBox.Show(str, "异常提示");
@@ -198,7 +199,8 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 if (str.Contains("缺料"))
                 if (str.Contains("缺料"))
                     FileName = Application.StartupPath + @"\Resources\Sound\缺料.wav";
                     FileName = Application.StartupPath + @"\Resources\Sound\缺料.wav";
                 else
                 else
-                    FileName = Application.StartupPath + @"\Resources\Sound\8378.wav";
+                    //FileName = Application.StartupPath + @"\Resources\Sound\8378.wav";
+                    FileName = Application.StartupPath + @"\Resources\Sound\3853.wav";
                 thread.Start();
                 thread.Start();
                 thread = new Thread(PlaySound);
                 thread = new Thread(PlaySound);
             }
             }
@@ -243,7 +245,8 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 if (str.Contains("缺料"))
                 if (str.Contains("缺料"))
                     FileName = Application.StartupPath + @"\Resources\Sound\缺料.wav";
                     FileName = Application.StartupPath + @"\Resources\Sound\缺料.wav";
                 else
                 else
-                    FileName = Application.StartupPath + @"\Resources\Sound\采集失败.wav";
+                    //FileName = Application.StartupPath + @"\Resources\Sound\采集失败.wav";
+                    FileName = Application.StartupPath + @"\Resources\Sound\1454.wav";
                 thread.Start();
                 thread.Start();
                 thread = new Thread(PlaySound);
                 thread = new Thread(PlaySound);
                 CustomMessageBox.Show(str, "异常提示");
                 CustomMessageBox.Show(str, "异常提示");
@@ -254,7 +257,8 @@ namespace UAS_MES_NEW.CustomControl.RichText
                 if (str.Contains("缺料"))
                 if (str.Contains("缺料"))
                     FileName = Application.StartupPath + @"\Resources\Sound\缺料.wav";
                     FileName = Application.StartupPath + @"\Resources\Sound\缺料.wav";
                 else
                 else
-                    FileName = Application.StartupPath + @"\Resources\Sound\采集正确.wav";
+                    //FileName = Application.StartupPath + @"\Resources\Sound\采集正确.wav";
+                    FileName = Application.StartupPath + @"\Resources\Sound\3853.wav";
                 thread.Start();
                 thread.Start();
                 thread = new Thread(PlaySound);
                 thread = new Thread(PlaySound);
             }
             }

+ 47 - 45
UAS_MES_YTDZ/FunctionCode/Make/Make_TestCollection.cs

@@ -58,6 +58,8 @@ namespace UAS_MES_NEW.Make
         public Make_TestCollection()
         public Make_TestCollection()
         {
         {
             InitializeComponent();
             InitializeComponent();
+
+            OperateResult.BackColor = SystemColors.Control;
         }
         }
 
 
         private void TestCollection_Load(object sender, EventArgs e)
         private void TestCollection_Load(object sender, EventArgs e)
@@ -149,7 +151,7 @@ namespace UAS_MES_NEW.Make
         {
         {
             if (ms_sncode.Text == "")
             if (ms_sncode.Text == "")
             {
             {
-                OperateResult.AppendText(">>序列号不能为空\n", Color.DarkRed);
+                OperateResult.AppendText(">>序列号不能为空\n", Color.Red);
                 ms_sncode.Focus();
                 ms_sncode.Focus();
                 return;
                 return;
             }
             }
@@ -166,7 +168,7 @@ namespace UAS_MES_NEW.Make
                         if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
                         if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
                         {
                         {
                             AddToReject = true;
                             AddToReject = true;
-                            OperateResult.AppendText(">>已存在" + ChoosedRejectList.Items[j].SubItems[2].Text + "不良\n", Color.DarkRed);
+                            OperateResult.AppendText(">>已存在" + ChoosedRejectList.Items[j].SubItems[2].Text + "不良\n", Color.Red);
                             break;
                             break;
                         }
                         }
                     }
                     }
@@ -182,7 +184,7 @@ namespace UAS_MES_NEW.Make
             }
             }
             if (CheckedNum == 0)
             if (CheckedNum == 0)
             {
             {
-                OperateResult.AppendText(">>请勾选不良代码\n", Color.DarkRed);
+                OperateResult.AppendText(">>请勾选不良代码\n", Color.Red);
             }
             }
         }
         }
 
 
@@ -203,7 +205,7 @@ namespace UAS_MES_NEW.Make
                     bool NoteAlready = LogicHandler.CheckDiffMakeCodeBeforeStepCheck(ms_sncode.Text, ma_code.Text, NoteForChange.Checked, out oMakeCode, out ErrorMessage);
                     bool NoteAlready = LogicHandler.CheckDiffMakeCodeBeforeStepCheck(ms_sncode.Text, ma_code.Text, NoteForChange.Checked, out oMakeCode, out ErrorMessage);
                     if (!NoteAlready)
                     if (!NoteAlready)
                     {
                     {
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                         return;
                         return;
                     }
                     }
                     if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
                     if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
@@ -211,7 +213,7 @@ namespace UAS_MES_NEW.Make
                         //是否提示过工单切换框,检测前后执行
                         //是否提示过工单切换框,检测前后执行
                         if (!LogicHandler.CheckDiffMakeCodeAfterStepCheck(ms_sncode.Text, oMakeCode, NoteForChange.Checked, NoteAlready, ma_code, out ErrorMessage))
                         if (!LogicHandler.CheckDiffMakeCodeAfterStepCheck(ms_sncode.Text, oMakeCode, NoteForChange.Checked, NoteAlready, ma_code, out ErrorMessage))
                         {
                         {
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                             return;
                             return;
                         }
                         }
                         if (ma_code.Text != oMakeCode && oMakeCode != null)
                         if (ma_code.Text != oMakeCode && oMakeCode != null)
@@ -232,7 +234,7 @@ namespace UAS_MES_NEW.Make
                         string sncode = dt.Rows[0]["ms_sncode"].ToString();
                         string sncode = dt.Rows[0]["ms_sncode"].ToString();
                         if (sncode != ms_sncode.Text)
                         if (sncode != ms_sncode.Text)
                         {
                         {
-                            OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.DarkRed, ms_sncode);
+                            OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.Red, ms_sncode);
                             return;
                             return;
                         }
                         }
                         ifrework = dt.Rows[0]["ms_ifrework"].ToString();
                         ifrework = dt.Rows[0]["ms_ifrework"].ToString();
@@ -257,9 +259,9 @@ namespace UAS_MES_NEW.Make
                         }
                         }
                         SetCollectResult();
                         SetCollectResult();
                     }
                     }
-                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                 }
                 }
-                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
             }
             }
         }
         }
 
 
@@ -353,14 +355,14 @@ namespace UAS_MES_NEW.Make
             {
             {
                 LoadBadCodeListView();
                 LoadBadCodeListView();
                 LoadChoosedBadListView();
                 LoadChoosedBadListView();
-                //OperateResult.AppendText(">>请采集不良代码\n", Color.LightGreen);
+                //OperateResult.AppendText(">>请采集不良代码\n", Color.Green);
                 //bc_code.Focus();
                 //bc_code.Focus();
                 ////勾选了自动产生代码
                 ////勾选了自动产生代码
                 //if (AutoBadCode.Checked)
                 //if (AutoBadCode.Checked)
                 //    Save_Click(new object(), new EventArgs());
                 //    Save_Click(new object(), new EventArgs());
                 if (ms_sncode.Text == "")
                 if (ms_sncode.Text == "")
                 {
                 {
-                    OperateResult.AppendText(">>序列号不允许为空\n", Color.DarkRed);
+                    OperateResult.AppendText(">>序列号不允许为空\n", Color.Red);
                     return;
                     return;
                 }
                 }
                 if (GoodProduct.Checked)
                 if (GoodProduct.Checked)
@@ -375,7 +377,7 @@ namespace UAS_MES_NEW.Make
                         {
                         {
                             if (ma_code.Text == "")
                             if (ma_code.Text == "")
                             {
                             {
-                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                                 return;
                                 return;
                             }
                             }
                         }
                         }
@@ -390,13 +392,13 @@ namespace UAS_MES_NEW.Make
                         }
                         }
                         else
                         else
                         {
                         {
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                             return;
                             return;
                         }
                         }
                     }
                     }
                     else
                     else
                     {
                     {
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                         return;
                         return;
                     }
                     }
                     int RejectCount = ChoosedRejectList.Items.Count;
                     int RejectCount = ChoosedRejectList.Items.Count;
@@ -418,7 +420,7 @@ namespace UAS_MES_NEW.Make
                     {
                     {
                         if (ChoosedRejectList.Items.Count == 0)
                         if (ChoosedRejectList.Items.Count == 0)
                         {
                         {
-                            OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.DarkRed);
+                            OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
                             return;
                             return;
                         }
                         }
                         else
                         else
@@ -490,10 +492,10 @@ namespace UAS_MES_NEW.Make
                         //        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "快速维修成功", "快速维修", "", ob_checkno.Text);
                         //        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "快速维修成功", "快速维修", "", ob_checkno.Text);
                         //        OperateResult.AppendText(">>本次采集不良代码" + badname + "存在于本工序" + User.CurrentStepCode + "中,请解除故障后重新测试本站\n", Color.Black);
                         //        OperateResult.AppendText(">>本次采集不良代码" + badname + "存在于本工序" + User.CurrentStepCode + "中,请解除故障后重新测试本站\n", Color.Black);
                         //    }
                         //    }
-                        //    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.LightGreen);
+                        //    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
                         //}
                         //}
                         //else
                         //else
-                        OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.LightGreen);
+                        OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
                         LastSncode = ms_sncode.Text;
                         LastSncode = ms_sncode.Text;
                         //采集完不良,聚焦序列号
                         //采集完不良,聚焦序列号
                         ms_sncode.Focus();
                         ms_sncode.Focus();
@@ -506,7 +508,7 @@ namespace UAS_MES_NEW.Make
                         WaitList.Clear();
                         WaitList.Clear();
                         ChoosedList.Clear();
                         ChoosedList.Clear();
                     }
                     }
-                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed);
+                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                 }
                 }
 
 
 
 
@@ -525,7 +527,7 @@ namespace UAS_MES_NEW.Make
                     //存在不良记录
                     //存在不良记录
                     if (ErrorMessage != "")
                     if (ErrorMessage != "")
                     {
                     {
-                        OperateResult.AppendText(">>序列号:" + ms_sncode.Text + " 已经判为不良品,不允许修改!\n", Color.DarkRed);
+                        OperateResult.AppendText(">>序列号:" + ms_sncode.Text + " 已经判为不良品,不允许修改!\n", Color.Red);
                         return;
                         return;
                     }
                     }
                     else
                     else
@@ -542,7 +544,7 @@ namespace UAS_MES_NEW.Make
                             }
                             }
                             else
                             else
                             {
                             {
-                                OperateResult.AppendText(">>" + ms_sncode.Text + "良品采集成功\n", Color.LightGreen, ms_sncode);
+                                OperateResult.AppendText(">>" + ms_sncode.Text + "良品采集成功\n", Color.Green, ms_sncode);
                                 getcheck++;
                                 getcheck++;
                             }
                             }
                             //记录操作日志
                             //记录操作日志
@@ -557,7 +559,7 @@ namespace UAS_MES_NEW.Make
                             }
                             }
 
 
                         }
                         }
-                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                     }
                     }
                 }
                 }
                 else
                 else
@@ -570,15 +572,15 @@ namespace UAS_MES_NEW.Make
                             if (ErrorMessage.Contains("AFTERSUCCESS"))
                             if (ErrorMessage.Contains("AFTERSUCCESS"))
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n");
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n");
                             LastSncode = ms_sncode.Text;
                             LastSncode = ms_sncode.Text;
-                            OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为良品\n", Color.LightGreen, ms_sncode);
+                            OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为良品\n", Color.Green, ms_sncode);
                             //记录操作日志
                             //记录操作日志
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "采集良品", "采集良品成功", LastSncode, ob_checkno.Text);
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "采集良品", "采集良品成功", LastSncode, ob_checkno.Text);
                         }
                         }
-                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                     }
                     }
                     else
                     else
                     {
                     {
-                        OperateResult.AppendText(">>返修的不良序列号必须先进行维修\n", Color.DarkRed);
+                        OperateResult.AppendText(">>返修的不良序列号必须先进行维修\n", Color.Red);
                     }
                     }
                 }
                 }
             }
             }
@@ -611,7 +613,7 @@ namespace UAS_MES_NEW.Make
         {
         {
             if (ms_sncode.Text == "")
             if (ms_sncode.Text == "")
             {
             {
-                OperateResult.AppendText(">>序列号不允许为空\n", Color.DarkRed);
+                OperateResult.AppendText(">>序列号不允许为空\n", Color.Red);
                 return;
                 return;
             }
             }
             if (GoodProduct.Checked)
             if (GoodProduct.Checked)
@@ -626,7 +628,7 @@ namespace UAS_MES_NEW.Make
                     {
                     {
                         if (ma_code.Text == "")
                         if (ma_code.Text == "")
                         {
                         {
-                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                             return;
                             return;
                         }
                         }
                     }
                     }
@@ -641,13 +643,13 @@ namespace UAS_MES_NEW.Make
                     }
                     }
                     else
                     else
                     {
                     {
-                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                         return;
                         return;
                     }
                     }
                 }
                 }
                 else
                 else
                 {
                 {
-                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed, ms_sncode);
+                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                     return;
                     return;
                 }
                 }
                 int RejectCount = ChoosedRejectList.Items.Count;
                 int RejectCount = ChoosedRejectList.Items.Count;
@@ -669,7 +671,7 @@ namespace UAS_MES_NEW.Make
                 {
                 {
                     if (ChoosedRejectList.Items.Count == 0)
                     if (ChoosedRejectList.Items.Count == 0)
                     {
                     {
-                        OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.DarkRed);
+                        OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
                         return;
                         return;
                     }
                     }
                     else
                     else
@@ -741,9 +743,9 @@ namespace UAS_MES_NEW.Make
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "快速维修成功", "快速维修", "", ob_checkno.Text);
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "快速维修成功", "快速维修", "", ob_checkno.Text);
                             OperateResult.AppendText(">>本次采集不良代码" + badname + "存在于本工序" + User.CurrentStepCode + "中,请解除故障后重新测试本站\n", Color.Black);
                             OperateResult.AppendText(">>本次采集不良代码" + badname + "存在于本工序" + User.CurrentStepCode + "中,请解除故障后重新测试本站\n", Color.Black);
                         }
                         }
-                        else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.LightGreen);
+                        else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
                     }
                     }
-                    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.LightGreen);
+                    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
                     LastSncode = ms_sncode.Text;
                     LastSncode = ms_sncode.Text;
                     //采集完不良,聚焦序列号
                     //采集完不良,聚焦序列号
                     ms_sncode.Focus();
                     ms_sncode.Focus();
@@ -756,7 +758,7 @@ namespace UAS_MES_NEW.Make
                     WaitList.Clear();
                     WaitList.Clear();
                     ChoosedList.Clear();
                     ChoosedList.Clear();
                 }
                 }
-                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.DarkRed);
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
             }
             }
         }
         }
 
 
@@ -774,7 +776,7 @@ namespace UAS_MES_NEW.Make
                     {
                     {
                         if (ChoosedRejectList.Items[i].ListView.Items[i].SubItems[2].Text == bc_code.Text)
                         if (ChoosedRejectList.Items[i].ListView.Items[i].SubItems[2].Text == bc_code.Text)
                         {
                         {
-                            OperateResult.AppendText(">>已添加过不良代码" + bc_code.Text + "\n", Color.DarkRed, bc_code);
+                            OperateResult.AppendText(">>已添加过不良代码" + bc_code.Text + "\n", Color.Red, bc_code);
                             return;
                             return;
                         }
                         }
                     }
                     }
@@ -785,7 +787,7 @@ namespace UAS_MES_NEW.Make
                     ChoosedRejectList.Items.Add(lvi);
                     ChoosedRejectList.Items.Add(lvi);
                     bc_code.Clear();
                     bc_code.Clear();
                 }
                 }
-                else OperateResult.AppendText(">>" + bc_code.Text + "不良代码不存在\n", Color.DarkRed, bc_code);
+                else OperateResult.AppendText(">>" + bc_code.Text + "不良代码不存在\n", Color.Red, bc_code);
             }
             }
         }
         }
 
 
@@ -821,8 +823,8 @@ namespace UAS_MES_NEW.Make
                 batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
                 batchqty = int.Parse(ob_batchqty.Text == "" ? "0" : ob_batchqty.Text);
                 if (nowcheckqty == batchqty)
                 if (nowcheckqty == batchqty)
                 {
                 {
-                    ob_nowcheckqty.ForeColor = Color.DarkRed;
-                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.DarkRed);
+                    ob_nowcheckqty.ForeColor = Color.Red;
+                    OperateResult.AppendText(">>当前采集数量已达到送检数量\n", Color.Red);
                     if (AutoCut)
                     if (AutoCut)
                     {
                     {
                         OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.Blue);
                         OperateResult.AppendText(">>批次" + ob_checkno.Text + "自动断批\n", Color.Blue);
@@ -1003,7 +1005,7 @@ namespace UAS_MES_NEW.Make
                     }
                     }
                     else
                     else
                     {
                     {
-                        OperateResult.AppendText(">>SN" + ms_sncode.Text + "未进行分板绑定\n", Color.DarkRed, ms_sncode);
+                        OperateResult.AppendText(">>SN" + ms_sncode.Text + "未进行分板绑定\n", Color.Red, ms_sncode);
                     }
                     }
                 }
                 }
                 else
                 else
@@ -1101,7 +1103,7 @@ namespace UAS_MES_NEW.Make
             //                ms_code_KeyDown(this, new KeyEventArgs(Keys.Enter));
             //                ms_code_KeyDown(this, new KeyEventArgs(Keys.Enter));
             //            }
             //            }
             //            else {
             //            else {
-            //                OperateResult.AppendText(">>解析数据" + strData[5] + "非良品,无法采集\n", Color.DarkRed, ms_sncode);
+            //                OperateResult.AppendText(">>解析数据" + strData[5] + "非良品,无法采集\n", Color.Red, ms_sncode);
             //            }
             //            }
             //        }
             //        }
             //    }
             //    }
@@ -1170,7 +1172,7 @@ namespace UAS_MES_NEW.Make
                             }
                             }
                             else
                             else
                             {
                             {
-                                OperateResult.AppendText(">>解析数据" + strData[5] + "非良品,无法采集\n", Color.DarkRed, ms_sncode);
+                                OperateResult.AppendText(">>解析数据" + strData[5] + "非良品,无法采集\n", Color.Red, ms_sncode);
                             }
                             }
                         }
                         }
                     }
                     }
@@ -1191,41 +1193,41 @@ namespace UAS_MES_NEW.Make
                     "left join craftdetail on cd_crid=cr_id where ma_code='" + ma_code.Text + "' and cd_stepcode='" + User.CurrentStepCode + "'", "select");
                     "left join craftdetail on cd_crid=cr_id where ma_code='" + ma_code.Text + "' and cd_stepcode='" + User.CurrentStepCode + "'", "select");
                 if (dt.Rows.Count == 0)
                 if (dt.Rows.Count == 0)
                 {
                 {
-                    OperateResult.AppendText(">工序" + User.CurrentStepCode + "不存在工单工艺路线中\n", Color.DarkRed, SNCount);
+                    OperateResult.AppendText(">工序" + User.CurrentStepCode + "不存在工单工艺路线中\n", Color.Red, SNCount);
                     return;
                     return;
                 }
                 }
                 int count;
                 int count;
                 if (!int.TryParse(SNCount.Text, out count))
                 if (!int.TryParse(SNCount.Text, out count))
                 {
                 {
-                    OperateResult.AppendText(">请输入正确的数字\n", Color.DarkRed, SNCount);
+                    OperateResult.AppendText(">请输入正确的数字\n", Color.Red, SNCount);
                     return;
                     return;
                 }
                 }
                 if (count <= 0)
                 if (count <= 0)
                 {
                 {
-                    OperateResult.AppendText(">数字必须大于0\n", Color.DarkRed, SNCount);
+                    OperateResult.AppendText(">数字必须大于0\n", Color.Red, SNCount);
                     return;
                     return;
                 }
                 }
                 if (ma_code.Text == "")
                 if (ma_code.Text == "")
                 {
                 {
-                    OperateResult.AppendText(">工单号不能为空\n", Color.DarkRed, SNCount);
+                    OperateResult.AppendText(">工单号不能为空\n", Color.Red, SNCount);
                     return;
                     return;
                 }
                 }
                 string sumcount = dh.getFieldDataByCondition("makehourcount", "nvl(sum(mhc_qty),0)", "mhc_macode='" + ma_code.Text + "' and mhc_stepcode='" + User.CurrentStepCode + "'").ToString();
                 string sumcount = dh.getFieldDataByCondition("makehourcount", "nvl(sum(mhc_qty),0)", "mhc_macode='" + ma_code.Text + "' and mhc_stepcode='" + User.CurrentStepCode + "'").ToString();
                 if (int.Parse(sumcount) + count * pr_pcbacount.Value > int.Parse(ma_qty.Text))
                 if (int.Parse(sumcount) + count * pr_pcbacount.Value > int.Parse(ma_qty.Text))
                 {
                 {
-                    OperateResult.AppendText(">已采集数量" + sumcount + ",本次采集数量" + pr_pcbacount.Value * count + ",超出工单数量" + ma_qty.Text + "\n", Color.DarkRed, SNCount);
+                    OperateResult.AppendText(">已采集数量" + sumcount + ",本次采集数量" + pr_pcbacount.Value * count + ",超出工单数量" + ma_qty.Text + "\n", Color.Red, SNCount);
                     return;
                     return;
                 }
                 }
                 if (LogicHandler.UpdateStencil(ma_code.Text, User.UserSourceCode, (pr_pcbacount.Value * count).ToString(), User.UserCode, out ErrorMessage))
                 if (LogicHandler.UpdateStencil(ma_code.Text, User.UserSourceCode, (pr_pcbacount.Value * count).ToString(), User.UserCode, out ErrorMessage))
                 {
                 {
                     dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,MHC_SOURCECODE,mhc_stepcode, MHC_INMAN,mhc_qty,mhc_linecode,mhc_pcbcount)" +
                     dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,MHC_SOURCECODE,mhc_stepcode, MHC_INMAN,mhc_qty,mhc_linecode,mhc_pcbcount)" +
                        "values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + User.UserSourceCode + "','" + User.CurrentStepCode + "','" + User.UserCode + "','" + pr_pcbacount.Value * count + "','" + User.UserLineCode + "','" + pr_pcbacount.Value + "')", "insert");
                        "values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + User.UserSourceCode + "','" + User.CurrentStepCode + "','" + User.UserCode + "','" + pr_pcbacount.Value * count + "','" + User.UserLineCode + "','" + pr_pcbacount.Value + "')", "insert");
-                    OperateResult.AppendText(">采集成功,个数量" + count + ",拼板产品数" + pr_pcbacount.Value * count + "\n", Color.LightGreen, SNCount);
+                    OperateResult.AppendText(">采集成功,个数量" + count + ",拼板产品数" + pr_pcbacount.Value * count + "\n", Color.Green, SNCount);
                     return;
                     return;
                 }
                 }
                 else
                 else
                 {
                 {
-                    OperateResult.AppendText(">" + ErrorMessage + "\n", Color.DarkRed, SNCount);
+                    OperateResult.AppendText(">" + ErrorMessage + "\n", Color.Red, SNCount);
                 }
                 }
             }
             }
         }
         }

+ 2 - 0
UAS_MES_YTDZ/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -42,6 +42,8 @@ namespace UAS_MES_NEW.Packing
         {
         {
 
 
             InitializeComponent();
             InitializeComponent();
+
+            OperateResult.BackColor = SystemColors.Control;
         }
         }
 
 
         //创建打印进程
         //创建打印进程

+ 3 - 2
UAS_MES_YTDZ/FunctionCode/Packing/Packing_PackageCollectionWeigh.cs

@@ -14,7 +14,6 @@ using System.IO;
 using System.Text.RegularExpressions;
 using System.Text.RegularExpressions;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using Seagull.BarTender.Print;
 using Seagull.BarTender.Print;
-using static System.Windows.Forms.VisualStyles.VisualStyleElement;
 
 
 namespace UAS_MES_NEW.Packing
 namespace UAS_MES_NEW.Packing
 {
 {
@@ -59,6 +58,8 @@ namespace UAS_MES_NEW.Packing
         public Packing_PackageCollectionWeigh()
         public Packing_PackageCollectionWeigh()
         {
         {
             InitializeComponent();
             InitializeComponent();
+
+            OperateResult.BackColor = SystemColors.Control;
         }
         }
 
 
         //创建打印进程
         //创建打印进程
@@ -67,7 +68,7 @@ namespace UAS_MES_NEW.Packing
             try
             try
             {
             {
                 engine = new BarTender.Application();
                 engine = new BarTender.Application();
-                BaseUtil.WriteLbl();
+                //BaseUtil.WriteLbl();
             }
             }
             catch (Exception ex)
             catch (Exception ex)
             {
             {

+ 4 - 4
UAS_MES_YTDZ/PublicMethod/Print.cs

@@ -505,7 +505,7 @@ namespace UAS_MES_NEW.PublicMethod
                                 string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                 string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                 fp_name = label.Rows[0]["fp_name"].ToString();
                                 fp_name = label.Rows[0]["fp_name"].ToString();
                                 WebClient wc = new WebClient();
                                 WebClient wc = new WebClient();
-                                wc.DownloadFile("http://192.168.1.5:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                wc.DownloadFile("http://192.168.41.232:8098/" + fp_path, @"C:\打印标签\" + fp_name);
                             }
                             }
                         }
                         }
                     }
                     }
@@ -532,7 +532,7 @@ namespace UAS_MES_NEW.PublicMethod
                                     string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                     string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                     fp_name = label.Rows[0]["fp_name"].ToString();
                                     fp_name = label.Rows[0]["fp_name"].ToString();
                                     WebClient wc = new WebClient();
                                     WebClient wc = new WebClient();
-                                    wc.DownloadFile("http://192.168.1.5:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                    wc.DownloadFile("http://192.168.41.232:8098/" + fp_path, @"C:\打印标签\" + fp_name);
                                     FileInfo file = new FileInfo(@"C:\打印标签\" + fp_name);
                                     FileInfo file = new FileInfo(@"C:\打印标签\" + fp_name);
                                     file.CreationTime = Convert.ToDateTime(filelastwritetime);
                                     file.CreationTime = Convert.ToDateTime(filelastwritetime);
                                 }
                                 }
@@ -729,7 +729,7 @@ namespace UAS_MES_NEW.PublicMethod
                                 string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                 string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                 fp_name = label.Rows[0]["fp_name"].ToString();
                                 fp_name = label.Rows[0]["fp_name"].ToString();
                                 WebClient wc = new WebClient();
                                 WebClient wc = new WebClient();
-                                wc.DownloadFile("http://192.168.1.5:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                wc.DownloadFile("http://192.168.41.232:8098/" + fp_path, @"C:\打印标签\" + fp_name);
                             }
                             }
                         }
                         }
                     }
                     }
@@ -758,7 +758,7 @@ namespace UAS_MES_NEW.PublicMethod
                                     string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                     string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                     fp_name = label.Rows[0]["fp_name"].ToString();
                                     fp_name = label.Rows[0]["fp_name"].ToString();
                                     WebClient wc = new WebClient();
                                     WebClient wc = new WebClient();
-                                    wc.DownloadFile("http://192.168.1.5:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                    wc.DownloadFile("http://192.168.41.232:8098/" + fp_path, @"C:\打印标签\" + fp_name);
                                     FileInfo file = new FileInfo(@"C:\打印标签\" + fp_name);
                                     FileInfo file = new FileInfo(@"C:\打印标签\" + fp_name);
                                     file.CreationTime = Convert.ToDateTime(filelastwritetime);
                                     file.CreationTime = Convert.ToDateTime(filelastwritetime);
                                 }
                                 }

+ 9 - 0
UAS_MES_YTDZ/UAS_MES_YTDZ.csproj

@@ -799,6 +799,12 @@
     <Compile Include="FunctionCode\Packing\Packing_PackageCollectionWeigh.Designer.cs">
     <Compile Include="FunctionCode\Packing\Packing_PackageCollectionWeigh.Designer.cs">
       <DependentUpon>Packing_PackageCollectionWeigh.cs</DependentUpon>
       <DependentUpon>Packing_PackageCollectionWeigh.cs</DependentUpon>
     </Compile>
     </Compile>
+    <Compile Include="FunctionCode\Packing\Packing_PackageCollectionWeighNew.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Packing\Packing_PackageCollectionWeighNew.Designer.cs">
+      <DependentUpon>Packing_PackageCollectionWeighNew.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Packing\Packing_PalletWeightRecord.cs">
     <Compile Include="FunctionCode\Packing\Packing_PalletWeightRecord.cs">
       <SubType>Form</SubType>
       <SubType>Form</SubType>
     </Compile>
     </Compile>
@@ -1487,6 +1493,9 @@
     <EmbeddedResource Include="FunctionCode\Packing\Packing_PackageCollectionWeigh.resx">
     <EmbeddedResource Include="FunctionCode\Packing\Packing_PackageCollectionWeigh.resx">
       <DependentUpon>Packing_PackageCollectionWeigh.cs</DependentUpon>
       <DependentUpon>Packing_PackageCollectionWeigh.cs</DependentUpon>
     </EmbeddedResource>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Packing\Packing_PackageCollectionWeighNew.resx">
+      <DependentUpon>Packing_PackageCollectionWeighNew.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Packing\Packing_PalletWeightRecord.resx">
     <EmbeddedResource Include="FunctionCode\Packing\Packing_PalletWeightRecord.resx">
       <DependentUpon>Packing_PalletWeightRecord.cs</DependentUpon>
       <DependentUpon>Packing_PalletWeightRecord.cs</DependentUpon>
     </EmbeddedResource>
     </EmbeddedResource>