public RecordTemplateEditorViewModel(IJournalParametersEditorViewModelFactory journalParametersEditorViewModelFactory,
                                      IFormatterEditorFactory formatterEditorFactory, IRecordTemplate recordTemplate
                                      )
 {
     this._recordTemplate = recordTemplate;
     this.AllJournalParameterEditorViewModels      = new ObservableCollection <IJournalParameterEditorViewModel>();
     this._journalParametersEditorViewModelFactory = journalParametersEditorViewModelFactory;
     this._formatterEditorFactory          = formatterEditorFactory;
     this.AddRecordParameterCommand        = new RelayCommand(this.OnAddRecordParameterExecute);
     this.AddComplexRecordParameterCommand = new RelayCommand(this.OnAddComplexRecordParameterExecute);
     this.EditElementCommand             = new RelayCommand(this.OnEditElementExecute, this.CanExecuteEditElement);
     this.SetElementUpCommand            = new RelayCommand(this.OnSetElementUpExecute, this.CanExecuteSetElementUp);
     this.SetElementDownCommand          = new RelayCommand(this.OnSetElementDownExecute, this.CanExecuteSetElementDown);
     this.DeleteElementCommand           = new RelayCommand(this.OnDeleteElementExecute, this.CanDeleteElementDown);
     this.AddDependentParameterCommand   = new RelayCommand(this.OnAddDependentParameterExecute);
     this.ShowFormatterParametersCommand =
         new RelayCommand(this.OnShowFormatterParametersExecute, this.CanShowFormatterParametersExecute);
 }
 public ComplexJournalParameterEditorViewModel(IComplexJournalParameter journalParameter,
                                               IJournalParametersEditorViewModelFactory journalParametersEditorViewModelFactory,
                                               IApplicationGlobalCommands applicationGlobalCommands, Func <ISharedBitViewModel> sharedBitViewModelGettingFunc) : base(journalParameter)
 {
     this._journalParametersEditorViewModelFactory = journalParametersEditorViewModelFactory;
     this._applicationGlobalCommands          = applicationGlobalCommands;
     this.SubJournalParameterEditorViewModels = new ObservableCollection <ISubJournalParameterEditorViewModel>();
     this.AddSubParameterCommand         = new RelayCommand(this.OnAddSubParameterExecute);
     this.SubmitCommand                  = new RelayCommand <object>(this.OnSubmit);
     this.CancelCommand                  = new RelayCommand <object>(this.OnCancel);
     this.DeleteParameterCommand         = new RelayCommand(this.OnDeleteParameterExecute, this.CanExecuteDeleteParameter);
     this.MainBitNumbersInWordCollection = new ObservableCollection <ISharedBitViewModel>();
     for (int i = 0; i < 16; i++)
     {
         ISharedBitViewModel sharedBitViewModel = sharedBitViewModelGettingFunc();
         sharedBitViewModel.NumberOfBit = i;
         this.MainBitNumbersInWordCollection.Add(sharedBitViewModel);
     }
 }