Example #1
0
 public static void Add(string windowName, FormHalconWindow formHalconWindow)
 {
     if (Dictionary.Keys.Contains(windowName))
     {
         MessageBox.Show(@"不能重复添加相同名称的窗体");
         return;
     }
     Dictionary.Add(windowName, formHalconWindow);
 }
Example #2
0
        private void toolStripMenuItem_HaclonWindowsDropDownItems_Click(object sender, EventArgs e)
        {
            var hwName = ((ToolStripItem)sender).Text;
            var hw     = FormHalconWindowDictionary.Dictionary[hwName];
            //todo 这里可能常要改
            var ds = hw._dd;

            if (hw.IsDisposed)
            {
                hw     = new FormHalconWindow(hwName);
                hw._dd = ds;
            }
            FormHalconWindowDictionary.Dictionary[hwName] = hw;
            FormHalconWindowDictionary.Dictionary[hwName].ShowForm(dockPanel1);
        }