Inheritance: INotifyPropertyChanged
Ejemplo n.º 1
0
        private MainVm()
        {
            this.settings  = Settings.FromResource;
            this.NameSpace = Settings.ProjectName;
            this.BaseUnits = new ObservableCollection <BaseUnitViewModel>(this.settings.BaseUnits.Select(x => new BaseUnitViewModel(x)));
            this.BaseUnits.ObserveCollectionChangedSlim(false)
            .Subscribe(this.OnBaseUnitsChanged);
            this.DerivedUnits = new ObservableCollection <DerivedUnitViewModel>(this.settings.DerivedUnits.Select(x => new DerivedUnitViewModel(x)));

            this.DerivedUnits.ObserveCollectionChangedSlim(false)
            .Subscribe(this.OnDerivedUnitsChanged);
            this.conversions = new ConversionsVm(this.settings);
        }
Ejemplo n.º 2
0
 public MainVm()
 {
     _settings    = Settings.Instance;
     NameSpace    = Settings.ProjectName;
     _conversions = new ConversionsVm(_settings);
 }