using Bro.Common.Base; using HalconDotNet; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Bro.Device.Station.Forms { public partial class OfflineImageFrm : Form { public HObject HImg { get; set; } public OfflineImageFrm() { InitializeComponent(); HImg?.Dispose(); HImg = null; } private void OfflineImageFrm_Load(object sender, EventArgs e) { canvas1.IsShowElementList = false; } private void btnCancel_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; } private void btnConfirm_Click(object sender, EventArgs e) { if (canvas1.MAP == null) { MessageBox.Show("未载入离线图片"); return; } HImg = new HImage(canvas1.ImageFilePath); this.DialogResult = DialogResult.OK; } } }