/// <summary> /// 清除测试图像及窗体资源 /// </summary> public virtual void ClearTestData() { if (TestImageDic != null) { foreach (var item in TestImageDic) { item.Value.Dispose(); } } TestImageDic = null; if (imageTestIn != null) { imageTestIn = null; } if (settingUnit != null) { settingUnit.Dispose(); } if (mat2dManger != null) { mat2dManger.SelectMatchingToolObserver = null; } settingUnit = null; result = ""; isOk = false; }
public frmToolSetting(ToolsSettingUnit settingUnit) { InitializeComponent(); this.settingUnit = settingUnit; Size size = settingUnit.Size; this.Size = new Size(size.Width + 10, size.Height + 10); this.panel1.Dock = DockStyle.Fill; settingUnit.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; this.panel1.Controls.Clear(); this.panel1.Controls.Add(settingUnit); }