private void simpleButton1_Click(object sender, EventArgs e) { try { if (readImage) { return; } OpenFileDialog dialog = new OpenFileDialog(); dialog.Filter = "(*.tiff)|*.tiff|所有文件(*.*)|*.*||"; if (dialog.ShowDialog() == DialogResult.OK) { if (String.IsNullOrEmpty(dialog.FileName)) { return; } readImage = true; ThreadPool.QueueUserWorkItem(delegate { string path = dialog.FileName; HOperatorSet.ReadImage(out image, path); if (window != null) { window.HobjectToHimage(image); } }); readImage = false; } } catch (Exception) { readImage = true; throw; } }
private void button1_Click(object sender, EventArgs e) { HObject image = new HObject(); HOperatorSet.ReadImage(out image, @"G:\Outer_HB.bmp"); myWindow.HobjectToHimage(image); }
private void CalibFormMain_ChangeSide(int SideId, HObject arg1, HObject arg2, HObject arg3) { if (SideId != -1) { SideID = SideId; } if (arg1 != null) { hwindow_final.HobjectToHimage(arg1); } }