public static MessageBoxResult ShowMsgBox(string strContent, string strCaption = "Info")
        {
            UC_MessageBox dlg = new UC_MessageBox();

            dlg.StrCaption            = strCaption;
            dlg.StrContent            = strContent;
            dlg.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            dlg.ShowDialog();
            return(result);
        }
        private void BtnDelete_Click(object sender, RoutedEventArgs e)
        {
            var vm = DataContext as RoiModelBase;

            if (CurCamID < 0)
            {
                UC_MessageBox.ShowMsgBox("请选择一个相机进行操作");
                return;
            }
            vm.Index = 2;// CurCamID;
            vm.OperateDelete.Execute(vm);
        }
 private void BtnYes_Click(object sender, RoutedEventArgs e)
 {
     _msgresult = MessageBoxResult.Yes;
     if (EditBoxName.Text == "")
     {
         UC_MessageBox.ShowMsgBox("名称不能为空", "错误");
     }
     else
     {
         ProfileValue = EditBoxName.Text;
         Close();
     }
 }