Esempio n. 1
0
 public FolderNodeViewModel(BaseTreeViewModel trvTree, BlogReaderViewModel mainViewModel, FolderNodeViewModel parent, FolderModel folder)
     : base(trvTree, parent, folder.FullName, folder.Name, false)
 {
     MainViewModel = mainViewModel;
     Folder        = folder;
     Icon          = TreeBlogsViewModel.NodeType.Folder.ToString();
     Foreground    = BauMvvm.ViewModels.Media.MvvmColor.Navy;
 }
Esempio n. 2
0
 /// <summary>
 ///		Inicializa el manager de vistas de DbStudio
 /// </summary>
 public void Initialize(PluginsStudio.Views.Base.Interfaces.IAppViewsController appViewsController,
                        PluginsStudio.ViewModels.Base.Controllers.IPluginsController pluginController)
 {
     AppViewsController = appViewsController;
     MainViewModel      = new BlogReaderViewModel(new Controllers.BlogController(this, pluginController));
     MainViewModel.Initialize();
     MainViewModel.ConfigurationViewModel.PathBlogs = @"C:\Users\Usuario\Documents\BauPlugStudio\BlogsData";
 }
 /// <summary>
 ///		Inicializa las librerías
 /// </summary>
 public override void InitLibraries(Libraries.Plugins.Views.Host.IHostPluginsController hostPluginsController)
 {
     MainInstance          = this;
     HostPluginsController = hostPluginsController;
     Name             = "BlogReader";
     ViewModelManager = new BlogReaderViewModel("BlogReader", HostPluginsController.HostViewModelController,
                                                HostPluginsController.ControllerWindow,
                                                hostPluginsController.DialogsController,
                                                ViewsController, GetRouteIcons());
     ViewModelManager.InitModule();
 }
Esempio n. 4
0
 public BlogViewModel(BlogReaderViewModel mainViewModel, FolderModel parent, BlogModel blog)
 {
     MainViewModel = mainViewModel;
     if (blog == null)
     {
         _blog        = new BlogModel();
         _blog.Folder = parent;
     }
     else
     {
         _blog = blog;
     }
     InitProperties();
 }
Esempio n. 5
0
 public BlogNodeViewModel(BaseTreeViewModel trvTree, BlogReaderViewModel mainViewModel, FolderNodeViewModel parent, BlogModel blog)
     : base(trvTree, parent, blog.ID.ToString(), blog.Name, false)
 {
     MainViewModel = mainViewModel;
     Blog          = blog;
     Icon          = TreeBlogsViewModel.NodeType.Blog.ToString();
     if (blog.Enabled)
     {
         Foreground = BauMvvm.ViewModels.Media.MvvmColor.Black;
     }
     else
     {
         Foreground = BauMvvm.ViewModels.Media.MvvmColor.Gray;
     }
 }
Esempio n. 6
0
 public TreeBlogsViewModel(BlogReaderViewModel mainViewModel)
 {
     // Asigna las propiedades
     MainViewModel = mainViewModel;
     // Inicializa los comandos
     OpenOpmlCommand  = new BaseCommand(_ => ExecuteAction(nameof(OpenOpmlCommand)));
     NewFolderCommand = new BaseCommand(_ => ExecuteAction(nameof(NewFolderCommand)), _ => CanExecuteAction(nameof(NewFolderCommand)))
                        .AddListener(this, nameof(SelectedNode));
     NewBlogCommand = new BaseCommand(_ => ExecuteAction(nameof(NewBlogCommand)), _ => CanExecuteAction(nameof(NewBlogCommand)))
                      .AddListener(this, nameof(SelectedNode));
     DownloadCommand = new BaseCommand(_ => ExecuteAction(nameof(DownloadCommand)), _ => CanExecuteAction(nameof(DownloadCommand)))
                       .AddListener(this, nameof(SelectedNode));
     SeeNewsCommand = new BaseCommand(_ => ExecuteAction(nameof(SeeNewsCommand)), _ => CanExecuteAction(nameof(SeeNewsCommand)))
                      .AddListener(this, nameof(SelectedNode));
 }
Esempio n. 7
0
 public FolderViewModel(BlogReaderViewModel mainViewModel, FolderModel parent, FolderModel folder)
 {
     MainViewModel = mainViewModel;
     _parent       = parent;
     _folder       = folder;
     if (_parent == null)
     {
         _parent = MainViewModel.BlogManager.File;
     }
     if (_folder == null)
     {
         _folder = new FolderModel();
     }
     else
     {
         _parent = folder.Parent;
     }
     InitProperties();
 }
Esempio n. 8
0
 public BlogSeeNewsViewModel(BlogReaderViewModel mainViewModel, BlogsModelCollection blogs) : base(false)
 {
     // Asigna las propiedades
     MainViewModel = mainViewModel;
     Blogs         = blogs;
     // Inicializa el ViewModel
     InitViewModel();
     // Inicializa los comandos de página
     FirstPageCommand    = CreateCommandForPage(nameof(FirstPageCommand));
     NextPageCommand     = CreateCommandForPage(nameof(NextPageCommand));
     PreviousPageCommand = CreateCommandForPage(nameof(PreviousPageCommand));
     LastPageCommand     = CreateCommandForPage(nameof(LastPageCommand));
     // Inicializa los comandos del menú
     MarkAsReadCommand = new BaseCommand(parameter => ExecuteAction(nameof(MarkAsReadCommand), parameter),
                                         parameter => CanExecuteAction(nameof(MarkAsReadCommand), parameter));
     MarkAsNotReadCommand = new BaseCommand(parameter => ExecuteAction(nameof(MarkAsNotReadCommand), parameter),
                                            parameter => CanExecuteAction(nameof(MarkAsNotReadCommand), parameter));
     MarkAsInterestingCommand = new BaseCommand(parameter => ExecuteAction(nameof(MarkAsInterestingCommand), parameter),
                                                parameter => CanExecuteAction(nameof(MarkAsInterestingCommand), parameter));
     ExportEntriesCommand = new BaseCommand(parameter => ExecuteAction(nameof(ExportEntriesCommand), parameter),
                                            parameter => CanExecuteAction(nameof(ExportEntriesCommand), parameter));
     PlayCommand = new BaseCommand(parameter => ExecuteAction(nameof(PlayCommand), parameter),
                                   parameter => CanExecuteAction(nameof(PlayCommand), parameter))
                   .AddListener(this, nameof(SelectedEntry));
     DeleteCommand = new BaseCommand(parameter => ExecuteAction(nameof(DeleteCommand), parameter),
                                     parameter => CanExecuteAction(nameof(DeleteCommand), parameter))
                     .AddListener(this, nameof(SelectedEntry));
     // Inicializa las propiedades
     PropertyChanged += (sender, args) =>
     {
         if (args != null && args.PropertyName.EqualsIgnoreCase(nameof(SelectedEntry)))
         {
             DeleteCommand.OnCanExecuteChanged();
         }
         IsUpdated = false;
     };
 }
Esempio n. 9
0
 public TreeFoldersViewModel(BlogReaderViewModel mainViewModel, BauMvvm.ViewModels.BaseObservableObject viewModelParent)
 {
     MainViewModel   = mainViewModel;
     ViewModelParent = viewModelParent;
 }
Esempio n. 10
0
 public ConfigurationViewModel(BlogReaderViewModel mainViewModel)
 {
     MainViewModel = mainViewModel;
 }