Exemplo n.º 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);
        }
Exemplo n.º 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();
        }
Exemplo n.º 3
0
 public InputDialogResult(InputDialogResultActionType actionType, object value)
 {
     ResultAction = actionType;
     Value        = value;
 }