示例#1
0
 private void Btn_LoadFrameXML_Click(object sender, RoutedEventArgs e)
 {
     if (!AddFrameRecipeCheck())
     {
         return;
     }
     if (!File.Exists(tb_FrameXmlPath.Text))
     {
         MessageBox.Show("参数文件不存在");
         return;
     }
     if (!XMLHelper.CheckIdentifier(tb_FrameXmlPath.Text, FrameRecipe.IdentifyString))
     {
         return;
     }
     ComponentType     = typeof(FrameRecipe);
     IsLoadXML         = true;
     XmlPath           = tb_FrameXmlPath.Text;
     this.DialogResult = true;
 }
示例#2
0
 //add by wj 2020-10-22
 private void Btn_LoadAroundBondRegionDetectionXML_Click(object sender, RoutedEventArgs e)
 {
     if (!AddAroundBondRegionDetectionRecipeCheck())
     {
         return;
     }
     ComponentType = typeof(AroundBallRegionRecipe);
     if (!File.Exists(tb_AroundBondRegionDetectionXmlPath.Text))
     {
         MessageBox.Show("参数文件不存在");
         return;
     }
     if (!XMLHelper.CheckIdentifier(tb_AroundBondRegionDetectionXmlPath.Text, AroundBallRegionRecipe.IdentifyString))
     {
         return;
     }
     IsLoadXML = true;
     XmlPath   = tb_AroundBondRegionDetectionXmlPath.Text;
     FilePath.RecipeLoadProductDirectory = tb_AroundBondRegionDetectionXmlPath.Text;//
     this.DialogResult = true;
 }