瀏覽代碼

调试更新MeasureMsgManage.cs

@wang_qi0307 5 年之前
父節點
當前提交
f7464c0c02
共有 1 個文件被更改,包括 11 次插入6 次删除
  1. 11 6
      HOZProject/MeasureMsgDispose/MeasureMsgManage.cs

+ 11 - 6
HOZProject/MeasureMsgDispose/MeasureMsgManage.cs

@@ -6,6 +6,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using System.IO;
 
 namespace HOZProject
 {
@@ -22,7 +23,11 @@ namespace HOZProject
             {
                 case "1-3":
                     //设置图像
-                    formHOZ.pbImage.Image = new Bitmap(args.Picture_Information.Picture_FullPath);
+                    FileStream fileStream = new FileStream(args.Picture_Information.Picture_FullPath, FileMode.Open, FileAccess.Read);
+                    formHOZ.pbImage.Image = Image.FromStream(fileStream);
+                    fileStream.Close();
+                    fileStream.Dispose();
+                    //formHOZ.pbImage.Image = new Bitmap(args.Picture_Information.Picture_FullPath);
                     //流程内容
                     string semParaContent = "电压:"+args.Picture_Information.Work_Voltage;
                     semParaContent = "  放大倍数:" + args.Picture_Information.Magnification;
@@ -30,10 +35,10 @@ namespace HOZProject
                     formHOZ.lblFlowContent.Text = semParaContent;
                     break;
                 default:
-                    //设置图像
-                    formHOZ.pbImage.Image = null;
-                    //流程内容
-                    formHOZ.lblFlowContent.Text = "1";
+                    ////设置图像
+                    //formHOZ.pbImage.Image = null;
+                    ////流程内容
+                    //formHOZ.lblFlowContent.Text = "1";
                     break;
 
             }
@@ -66,7 +71,7 @@ namespace HOZProject
                             {
                                 if (tlItem.Code == args.Step_Code)
                                 {
-                                    tlItem.State = Convert.ToInt32(args.State);
+                                    //tlItem.State = Convert.ToInt32(args.State);
                                     break;
                                 }
                             }