Example #1
0
 /// <summary>
 ///		Obtiene el número de elementos no leídos
 /// </summary>
 public int GetNumberNotRead()
 {
     // Calcula el número de elementos no leídos
     NumberNotRead = Blogs.GetNumberNotRead() + Folders.GetNumberNotRead();
     // Y devuelve el valor
     return(NumberNotRead);
 }
Example #2
0
        /// <summary>
        ///		Comprueba si se puede ejecutar una acción
        /// </summary>
        protected override bool CanExecuteAction(string action, object parameter)
        {
            switch (action)
            {
            case nameof(FirstPageCommand):
            case nameof(PreviousPageCommand):
                return(ActualPage > 1);

            case nameof(LastPageCommand):
            case nameof(NextPageCommand):
                return(ActualPage < Pages);

            case nameof(DeleteCommand):
                return(SelectedEntry != null || (SelectedEntry == null && Blogs.GetNumberNotRead() == 0 && Entries.Count > 0));

            case nameof(MarkAsReadCommand):
            case nameof(MarkAsNotReadCommand):
            case nameof(MarkAsInterestingCommand):
                return(SelectedEntry != null);

            case nameof(ExportEntriesCommand):
            case nameof(PlayCommand):
                return(true);

            default:
                return(false);
            }
        }