コード例 #1
0
 public ParameterValueChangedAction(ParameterValueHolder <long> holder, long old, long nnew)
 {
     this.holder = holder;
     name        = holder.Name;
     this.old    = old;
     this.nnew   = nnew;
 }
コード例 #2
0
        public EditableParameterViewModel(ParameterValueHolder <T> parameter, string group, IItemFromListProvider itemFromListProvider)
        {
            this.itemFromListProvider = itemFromListProvider;
            Group            = group;
            Parameter        = parameter;
            SelectItemAction = new DelegateCommand(SelectItem);

            Watch(parameter, p => p.IsUsed, nameof(IsHidden));
            Watch(parameter, p => p.Parameter, nameof(HasItems));
            Watch(parameter, p => p.Name, nameof(Name));
        }
コード例 #3
0
        public ConditionViewModel(IParameter <long> targets)
        {
            for (int i = 0; i < ParametersCount; ++i)
            {
                parameters[i] = new ParameterValueHolder <long>(Parameter.Instance, 0);
            }
            ConditionTarget        = new ParameterValueHolder <long>("Target", targets, 0);
            ConditionTarget.IsUsed = targets.HasItems && targets.Items !.Count > 1;

            Invert = new ParameterValueHolder <long>("Negated condition", BoolParameter.Instance, 0);

            Invert.OnValueChanged          += (_, _, _) => RaisePropertyChanged(nameof(Readable));
            ConditionValue1.OnValueChanged += (_, _, _) => RaisePropertyChanged(nameof(Readable));
            ConditionValue2.OnValueChanged += (_, _, _) => RaisePropertyChanged(nameof(Readable));
            ConditionValue3.OnValueChanged += (_, _, _) => RaisePropertyChanged(nameof(Readable));
            ConditionTarget.OnValueChanged += (_, _, _) => RaisePropertyChanged(nameof(Readable));
        }
コード例 #4
0
 public ParameterChangedAction(ParameterValueHolder <long> param, long old, long @new) : base(param, old, @new)
 {
 }
コード例 #5
0
 public GenericParameterChangedAction(ParameterValueHolder <T> param, T old, T @new)
 {
     this.param = param;
     this.old   = old;
     this.@new  = @new;
 }
コード例 #6
0
 private void ParameterString_OnValueChanged(ParameterValueHolder <string> sender, string old, string @new)
 {
     PushAction(new GenericParameterChangedAction <string>(sender, old, @new));
 }
コード例 #7
0
 private void ParameterFloat_OnValueChange(ParameterValueHolder <float> sender, float old, float @new)
 {
     PushAction(new GenericParameterChangedAction <float>(sender, old, @new));
 }
コード例 #8
0
 private void Parameter_OnValueChanged(ParameterValueHolder <long> sender, long old, long @new)
 {
     PushAction(new ParameterChangedAction(sender, old, @new));
 }
コード例 #9
0
 private void OnChanged(ParameterValueHolder <long> param, long old, long nnew)
 {
     PushAction(new ParameterValueChangedAction(param, old, nnew));
 }
コード例 #10
0
 public ParameterChangedAction(ParameterValueHolder <int> param, int old, int @new) : base(param, old, @new)
 {
 }
コード例 #11
0
 private void Parameter_OnValueChanged(ParameterValueHolder <int> sender, int old, int @new)
 {
     PushAction(new ParameterChangedAction(sender, old, @new));
 }