public override void UpdateSrc2UI() { //base.UpdateSrc2UI(); if (InvokeRequired) { Invoke(new Action(UpdateSrc2UI)); return; } if (null == _method) { btAction.Enabled = false; btSelectFile.Enabled = false; tbFilePath.Enabled = false; tbFilePath.Text = ""; tbFilePath.BackColor = SystemColors.Control; tssImgWidth.Text = "宽:未知"; tssImgHeight.Text = "高:未知"; tssSpanSeconds.Text = "耗时:未执行"; tssInfo.Text = "信息:方法对象未设置!"; return; } btAction.Enabled = true; btSelectFile.Enabled = true; tbFilePath.Enabled = true; tbFilePath.BackColor = SystemColors.Control; tbFilePath.Text = _method.GetInitParamValue("FilePath") as string;//_method.GetMethodInputValue("FilePath") as string; IJFImage img = _method.GetMethodOutputValue("Image") as IJFImage; if (null == img) { tssImgWidth.Text = "宽:未知"; tssImgHeight.Text = "高:未知"; tssSpanSeconds.Text = "耗时:未执行"; tssInfo.Text = "信息:无图像"; } else { tssImgWidth.Text = "宽:" + img.PicWidth; tssImgHeight.Text = "高:" + img.PicHeight; tssSpanSeconds.Text = "耗时:" + _method.GetActionSeconds().ToString("F3"); tssInfo.Text = "信息:图像正常"; ShowImage(img); } }
public override void UpdateSrc2UI() { if (InvokeRequired) { Invoke(new Action(UpdateSrc2UI)); return; } if (null == _method) { return; } IJFImage img = _method.GetMethodOutputValue("Image") as IJFImage; if (null == img) { return; } else { ucImageView1.LoadImage(img); ucImageView1.UpdateView(); } }