Ejemplo n.º 1
0
        public UploadDirectoryInfoEditWindowViewModel(UploadDirectoryInfo info)
        {
            _directoryInfo = info;

            this.Init();

            this.Name.Value = _directoryInfo.Name;
            this.Path.Value = _directoryInfo.Path;
        }
Ejemplo n.º 2
0
        public UploadDirectoryViewModel(TreeViewModelBase parent, UploadDirectoryInfo model)
            : base(parent)
        {
            this.Model = model;

            this.Name          = model.ToReactivePropertyAsSynchronized(n => n.Name).AddTo(_disposable);
            this.IsSelected    = new ReactiveProperty <bool>().AddTo(_disposable);
            this.IsExpanded    = model.ToReactivePropertyAsSynchronized(n => n.IsExpanded).AddTo(_disposable);
            this.Seeds         = model.Seeds.ToReadOnlyReactiveCollection(n => n).AddTo(_disposable);
            this.BoxViewModels = model.BoxInfos.ToReadOnlyReactiveCollection(n => new UploadBoxViewModel(this, n)).AddTo(_disposable);
        }