Beispiel #1
0
        private bool ControlButtonCommand_CanExecute(object arg)
        {
            InputDialogResultActionType actionType = InputDialogResultActionType.Positive;

            try
            {
                actionType = (InputDialogResultActionType)arg;
            }
            catch { }

            if (actionType == InputDialogResultActionType.Positive && PositiveActionCanExecute != null && !PositiveActionCanExecute(Content))
            {
                return(false);
            }

            return(true);
        }
Beispiel #2
0
        private void ControlButtonCommand_Execute(object arg)
        {
            InputDialogResultActionType actionType = (InputDialogResultActionType)arg;

            switch (actionType)
            {
            case InputDialogResultActionType.Negative:
                Result = new InputDialogResult(InputDialogResultActionType.Negative, null);
                break;

            case InputDialogResultActionType.Positive:
                Result = new InputDialogResult(InputDialogResultActionType.Positive, Content);
                break;

            default:
                break;
            }
            Close();
        }
Beispiel #3
0
 public InputDialogResult(InputDialogResultActionType actionType, object value)
 {
     ResultAction = actionType;
     Value        = value;
 }