Exemple #1
0
        public AppConfigurationParameterOptionsRequest RequestIfNotFound(string message = null, TextBoxExInputType typeInput = TextBoxExInputType.Text)
        {
            _creationModal = true;
            _message       = message;
            _typeInput     = typeInput;

            return(new AppConfigurationParameterOptionsRequest(this));
        }
Exemple #2
0
 public MessageInputViewModel()
 {
     MessageInputText = string.Empty;
     MessageInputType = TextBoxExInputType.Text;
 }
Exemple #3
0
 public static string ShowInput(string messageBoxText, TextBoxExInputType inputType)
 {
     return(ShowInput(null, messageBoxText, string.Empty, MessageStyle.Primary, inputType));
 }
Exemple #4
0
        public static string ShowInput(System.Windows.Window owner, string messageBoxText, string caption, MessageStyle style, TextBoxExInputType inputType)
        {
            var vm   = new MessageInputViewModel();
            var view = new Views.MessageBoxInputView();

            view.DataContext = vm;

            vm.Caption          = caption;
            vm.MessageBoxText   = messageBoxText;
            vm.MessageStyle     = style;
            vm.MessageButton    = MessageButton.OKCancel;
            vm.MessageInputType = inputType;
            vm.ApplyMessageStyle();

            view.ShowDialog();

            return(vm.MessageResult == MessageResult.OK ? vm.MessageInputText : "");
        }
Exemple #5
0
 public static string ShowInput(string messageBoxText, string caption, MessageStyle style, TextBoxExInputType inputType)
 {
     return(ShowInput(null, messageBoxText, caption, style, inputType));
 }
Exemple #6
0
        public static Castable TryParameter(this AppConfiguration app, string name, bool decrypt, bool creationModal, TextBoxExInputType typeInput = TextBoxExInputType.Text, string message = null, Action <Castable> afterCreationModal = null, string comment = null)
        {
            var param = app.TryParameter(name, decrypt, () =>
            {
                var parameter = Message.ShowInput(message == null ? $"Por favor introduzca un valor para el parametro \"{ name }\" :" : message, MessageStyle.Question, typeInput);

                return(parameter == string.Empty ? null : new Castable(parameter));
            },
                                         comment);


            if (param != null && afterCreationModal != null)
            {
                afterCreationModal(param);
            }

            return(param);
        }
Exemple #7
0
 public static Castable TryParameter(this AppConfiguration app, string name, bool decrypt, bool creationModal, TextBoxExInputType typeInput = TextBoxExInputType.Text, string message = null, string comment = null)
 {
     return(TryParameter(app, name, decrypt, creationModal, typeInput, message, null, comment));
 }