示例#1
0
 private void BtnYes_Click(object sender, RoutedEventArgs e)
 {
     _msgresult = MessageBoxResult.Yes;
     if (EditBoxName.Text == "")
     {
         UC_MessageBox.ShowMsgBox("配方名称不能为空", "错误");
     }
     else
     {
         ProfileValue = new Tuple <string, string>(EditBoxName.Text, EditBoxRemark.Text);
         Close();
     }
 }
示例#2
0
 private void BtnYes_Click(object sender, RoutedEventArgs e)
 {
     _msgresult = MessageBoxResult.Yes;
     if (EditBoxName.Text == "")
     {
         UC_MessageBox.ShowMsgBox("名称不能为空", "错误");
     }
     else
     {
         ProfileValue = EditBoxName.Text;
         Close();
     }
 }
        private bool DebugTool(ToolDataBase para)
        {
            try
            {
                switch (para.ToolType)
                {
                case EnumToolType.LineTool:
                {
                    var ToolData = para as LineToolData;
                    HalconVision.Instance.Debug_FindLine(0, ToolData.Polarity, ToolData.SelectType, ToolData.Contrast, ToolData.CaliperNum);
                    return(true);
                }

                case EnumToolType.CircleTool:
                {
                }
                break;

                case EnumToolType.PairTool:
                {
                    PairToolData data = para as PairToolData;
                    HalconVision.Instance.Debug_FindPair(0, data.Polarity, data.SelectType, data.ExpectPairNum, data.Contrast, data.CaliperNum);
                    return(true);
                }

                case EnumToolType.FlagTool:
                {
                    FlagToolDaga data = para as FlagToolDaga;
                    AddFlag(data);
                }
                break;

                default:
                    break;
                }
                return(true);
            }
            catch (Exception ex)
            {
                UC_MessageBox.ShowMsgBox("Error", ex.Message, MsgType.Error);
                return(false);
            }
        }