예제 #1
0
        protected TimePointViewModelBase(int id, int loopNumber, IPresetViewModel presetViewModel)
        {
            _PresetViewModel = presetViewModel;

            _id         = id;
            _loopNumber = loopNumber;

            TimePointNameInTemplateReturnCommand = new ActionCommand(TimePointNameReturn);
        }
예제 #2
0
        public AddingTimePointViewModel(IPresetViewModel presetViewModel) : base(new TimePoint {
            Name = ""
        }, presetViewModel)
        {
            AddTimePointCommand = new ActionCommand(AddTimePoint, _PresetViewModel.AddTimePointCommand.CanExecute);

            NumberCollection = _PresetViewModel.Preset != null &&
                               _PresetViewModel.Preset.TimerLoopDictionary.Values.Any() &&
                               _PresetViewModel.Preset.TimerLoopDictionary.Values.Max() > _LOOP_NUMBER_LIMIT
                                    ? Enumerable.Range(0, _PresetViewModel.Preset.TimerLoopDictionary.Values.Max() + 1).Select(n => (int)n).ToArray()
                                    : Enumerable.Range(0, _LOOP_NUMBER_LIMIT).Select(n => (int)n).ToArray();
        }
 public RenamePresetDialogViewModel(IPresetViewModel presetViewModel)
 {
     _presetViewModel = presetViewModel ?? throw new ArgumentNullException();
 }
예제 #4
0
 public TimePointViewModel(TimePoint timePoint, IPresetViewModel presetViewModel) : base(timePoint.Id, timePoint.LoopNumber, presetViewModel)
 {
     _timePoint       = timePoint ?? throw new ArgumentNullException();
     _presetViewModel = presetViewModel ?? throw new ArgumentNullException();
 }
예제 #5
0
 public BeginTimePointViewModel(int loopNumber, IPresetViewModel presetViewModel) : base(0, loopNumber, presetViewModel)
 {
 }