public void NotifyColleagues(ViewModelId targetViewModelId, ViewModelArguments arguments)
    {
        var targetFactory = this.viewModelFactories[targetViewModelId];
        var view          = targetFactory.Create(viewModelArguments);

        this.mainWindowViewModel.PagesControl = view;
    }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (ViewModelId != null ? ViewModelId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsList.GetHashCode();
         hashCode = (hashCode * 397) ^ IsVoid.GetHashCode();
         return(hashCode);
     }
 }
Beispiel #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Marks != null ? Marks.GetItemHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ViewModelId != null ? ViewModelId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsList.GetHashCode();
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Marks != null ? Marks.GetItemHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Groups != null ? Groups.GetItemHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ViewModelId != null ? ViewModelId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsList.GetHashCode();
         hashCode = (hashCode * 397) ^ IsOptional.GetHashCode();
         hashCode = (hashCode * 397) ^ (DefaultValue != null ? DefaultValue.GetHashCode() : 0);
         return(hashCode);
     }
 }
 public void RegisterViewModel(ViewModelId id, BaseViewModel viewModel)
 {
     viewModels.Add(id, viewModel);
 }
Beispiel #6
0
 protected BaseViewModel(ViewModelId id)
 {
     ViewModelDef = id;
     ViewModelsMediator.Instance.RegisterViewModel(ViewModelDef, this);
 }