Exemple #1
0
 public static void Message_ButtonPressed(object sender, MessageDialogEventArgs e)
 {
     msgControl.Visibility = Visibility.Collapsed;
     if (currentConfirmation != null)
     {
         if (bConfirm)
         {
             currentConfirmation(e.OK, currentObj);
         }
         else
             currentConfirmation(false, currentObj);
     }
 }
        private void btnOk_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            bool okToContinue = true;
            if (ButtonPressed != null)
            {
                MessageDialogEventArgs args = new MessageDialogEventArgs();
                args.OK = true;
                if (ConfirmationRequired)
                {
                    if ((bool)chkConfirm.IsChecked)
                    {
                        okToContinue = true;
                    }
                    else
                    {
                        okToContinue = false;
                        lblChkConfirm.Visibility = Visibility.Visible;
                    }
                }

                if(okToContinue)
                    ButtonPressed(sender, args);
            }
        }
 private void btnCancel_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     if (ButtonPressed != null)
     {
         MessageDialogEventArgs args = new MessageDialogEventArgs();
         args.OK = false;
         ButtonPressed(sender, args);
     }
 }