public IComplexJournalParameterEditorViewModel CreateComplexJournalParameterEditorViewModel(
     IComplexJournalParameter complexJournalParameter)
 {
     IComplexJournalParameterEditorViewModel journalParameterEditorViewModel = this._container.Resolve<IComplexJournalParameterEditorViewModel>();
     journalParameterEditorViewModel.Model = complexJournalParameter;
     return journalParameterEditorViewModel;
 }
 protected override void SetModel(object value)
 {
     if (value is IComplexJournalParameter)
     {
         IComplexJournalParameter complexJournalParameter = value as IComplexJournalParameter;
         this.SubJournalParameterEditorViewModels.Clear();
         foreach (ISubJournalParameter subJournalParameter in complexJournalParameter.ChildJournalParameters)
         {
             this.SubJournalParameterEditorViewModels.Add(this._journalParametersEditorViewModelFactory.CreateJournalSubParameterEditorViewModel(subJournalParameter, this.MainBitNumbersInWordCollection));
         }
     }
     base.SetModel(value);
 }
 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);
     }
 }