Exemplo n.º 1
0
        /// <summary>
        ///     <see cref="MainViewModel" />クラスの新しいインスタンスを初期化します。
        /// </summary>
        public MainViewModel()
        {
            ShellViewModelFactory.CreateFactory();

            #region Reactive Property

            this.RootFolder = new ReactiveProperty <ShellRootViewModel>();
            this.ShellItems = new ReactiveCollection <ShellObjectViewModel>();
            this.ShellItemCollectionView = CollectionViewSource.GetDefaultView(this.ShellItems);

            #endregion
        }
Exemplo n.º 2
0
        public void Loaded()
        {
            this.RootFolder.Value = ShellViewModelFactory.CreateRoot();

            this.RootFolder.Value.ShellFolders.Add(ShellViewModelFactory.CreateFolder(ShellKnownFolders.OneDrive));
            this.RootFolder.Value.ShellFolders.Add(ShellViewModelFactory.CreateFolder(ShellKnownFolders.HomeGroup));
            this.RootFolder.Value.ShellFolders.Add(ShellViewModelFactory.CreateFolder(ShellKnownFolders.Computer));
            this.RootFolder.Value.ShellFolders.Add(ShellViewModelFactory.CreateFolder(ShellKnownFolders.Libraries));

            this.RootFolder.Value.SelectedFolder
            .Subscribe(CreateShellItems)
            .AddTo(this.CompositeDisposable);
        }