Exemple #1
0
        public PluginDisplayOptionViewModel(DisplayOption displayOption, ILocalizationProvider localizationProvider)
            : base(displayOption.NameTextId, displayOption.DescriptionTextId)
        {
            _pluginOptionViewModelImplementation = new PluginOptionViewModelImplementation(displayOption, localizationProvider, this);
            _value = displayOption.Value;

            displayOption.ValueChanged += (s, e) => Value = displayOption.Value;
        }
Exemple #2
0
        public PluginListOptionViewModel(ListOption <TValue> valueOption, ILocalizationProvider localizationProvider)
            : base(valueOption.NameTextId, valueOption.Value)
        {
            _pluginOptionViewModelImplementation = new PluginOptionViewModelImplementation <TValue>(valueOption, localizationProvider, this);

            _listOption           = valueOption;
            _localizationProvider = localizationProvider;
            _listOption.AvailableValuesChanged += ListOption_AvailableValuesChanged;
        }
 public PluginEncryptedTextOptionViewModel(ValueOption <PasswordString?> valueOption, ILocalizationProvider localizationProvider)
     : base(valueOption.Value, valueOption.NameTextId)
 {
     _pluginOptionViewModelImplementation = new PluginOptionViewModelImplementation <PasswordString?>(valueOption, localizationProvider, this);
 }
Exemple #4
0
 public PluginDisplayOptionViewModel(IOption option, ILocalizationProvider localizationProvider)
     : base(option.NameTextId, option.DescriptionTextId)
 {
     _pluginOptionViewModelImplementation = new PluginOptionViewModelImplementation(option, localizationProvider, this);
     _value = option.ToString() ?? string.Empty;
 }
 public PluginStringCollectionOptionViewModel(StringCollectionOption option, ILocalizationProvider localizationProvider)
     : base(option.NameTextId, option.Value)
 {
     _pluginOptionViewModelImplementation = new PluginOptionViewModelImplementation <List <string> >(option, localizationProvider, this);
 }
Exemple #6
0
 public PluginNumberOptionViewModel(NumberOption option, ILocalizationProvider localizationProvider)
     : base(option.Value, option.MinValue, option.MaxValue, option.NameTextId)
 {
     _pluginOptionViewModelImplementation = new PluginOptionViewModelImplementation <int>(option, localizationProvider, this);
 }
 public PluginBooleanOptionViewModel(BooleanOption valueOption, ILocalizationProvider localizationProvider)
     : base(valueOption.Value, valueOption.NameTextId)
 {
     _pluginOptionViewModelImplementation = new PluginOptionViewModelImplementation <bool>(valueOption, localizationProvider, this);
 }
 public PluginCommandOptionViewModel(ICommandOption model, ILocalizationProvider localizationProvider)
     : base(model.NameTextId, model.DescriptionTextId)
 {
     _pluginOptionViewModelImplementation = new PluginOptionViewModelImplementation(model, localizationProvider, this);
     Command = AsyncCommand.Create(model.Execute, model.CanExecute);
 }
 public PluginTextOptionViewModel(TextOption valueOption, ILocalizationProvider localizationProvider)
     : base(valueOption.Value, valueOption.NameTextId)
 {
     _pluginOptionViewModelImplementation = new PluginOptionViewModelImplementation <string?>(valueOption, localizationProvider, this);
 }