/// <summary>
        /// Erzeugt eine Instanz der Klasse DialogBaseViewModel.
        /// </summary>
        /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
        /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param>
        public DialogBaseViewModel(INavigationService navService, IErrorMapper errorMapper)
            : base(navService, errorMapper)
        {
            IsFlyoutOpen = false;

            ShowWarningFlyout = new RelayCommand(param => executeShowWarningFlyoutCommand(param));
            PerformOriginalDrawerMenuActionCommand = new RelayCommand(param => executePerformOriginalDrawerMenuActionCommand());
        }
 /// <summary>
 /// Erzeugt eine Instanz der Klasse ModeratorHomescreenViewModel.
 /// </summary>
 /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
 /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param>
 public ModeratorHomescreenViewModel(INavigationService navService, IErrorMapper errorMapper)
     : base (navService, errorMapper)
 {
     // Erzeuge Befehle.
     ChannelSelected = new RelayCommand(param => executeChannelSelected(param));
     SwitchToAddChannelDialogCommand = new RelayCommand(param => executeSwitchToChannelAddDialogCommand());
     SynchronizeManagedChannelsCommand = new AsyncRelayCommand(param => executeSynchronizeManagedChannelsCommand());
 }
        /// <summary>
        /// Erzeuge eine Instanz der Klasse SearchChannelsViewModel.
        /// </summary>
        /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
        /// <param name="errorReporter">Eine Referenz auf den Fehlerdienst der Anwendung.</param>
        public SearchChannelsViewModel(INavigationService navService, IErrorMapper errorReporter)
            : base(navService, errorReporter)
        {
            channelController = new ChannelController();
            allChannels = new Dictionary<int, Channel>();

            // Führe Online Update bei nächster Aktualisierung aus.
            performOnlineUpdate = true;

            // Initialisiere Befehle.
            StartChannelSearchCommand = new AsyncRelayCommand(
                param => executeChannelSearchAsync(),
                param => canExecuteSearch());
            ReorderChannelsCommand = new AsyncRelayCommand(
                param => executeReorderChannelsCommandAsync());
            ChannelSelectedCommand = new RelayCommand(
                param => executeChannelSelected(param),
                param => canSelectChannel());
            SynchronizeChannelsCommand = new AsyncRelayCommand(
                param => executeSynchronizeChannelsCommand(),
                param => canSynchronizeChannels());
        }
        /// <summary>
        /// Erzeugt eine Instanz der Klasse ReminderDetailsViewModel.
        /// </summary>
        /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
        /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param>
        public ReminderDetailsViewModel(INavigationService navService, IErrorMapper errorMapper)
            : base(navService, errorMapper)
        {
            channelController = new ChannelController();
            moderatorController = new ModeratorController();

            // Befehle anlegen.
            SwitchToEditReminderDialogCommand = new RelayCommand(
                param => executeSwitchToEditReminderCommand(),
                param => canSwitchToEditReminderCommand());
            DeleteReminderCommand = new AsyncRelayCommand(
                param => executeDeleteReminderCommand(),
                param => canDeleteReminder());
            ActivateReminderCommand = new AsyncRelayCommand(
                param => executeActivateReminderCommand(),
                param => canActivateReminder());
            DeactivateReminderCommand = new AsyncRelayCommand(
                param => executeDeactivateReminderCommand(),
                param => canDeactivateReminder());
            SynchronizeReminderCommand = new AsyncRelayCommand(
                param => executeSynchronizeReminderCommand(),
                param => canSynchronizeReminder());
        }
        /// <summary>
        /// Erzeugt eine Instanz der HomescreenViewModel Klasse.
        /// </summary>
        /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
        /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param>
        public HomescreenViewModel(INavigationService navService, IErrorMapper errorMapper)
            : base(navService, errorMapper)
        {
            groupController = new GroupController();
            currentGroups = new Dictionary<int, Group>();

            // Initialisiere die Befehle.
            SearchChannelsCommand = new RelayCommand(param => executeSearchChannelsCommand(), param => canSearchChannels());
            AddGroupCommand = new RelayCommand(param => executeAddGroupCommand(), param => canAddGroup());
            SearchGroupsCommand = new RelayCommand(param => executeSearchGroupsCommand(), param => canSearchGroups());
            ChannelSelected = new RelayCommand(param => executeChannelSelected(param), param => canSelectChannel());
            GroupSelected = new RelayCommand(param => executeGroupSelected(param), param => canSelectGroup());
            SynchronizeAllGroupsCommand = new AsyncRelayCommand(param => executeSynchronizeAllGroupsCommandAsync(), param => canSynchronizeAllGroups());
            SynchronizeAllChannelsCommand = new AsyncRelayCommand(param => executeSynchronizeAllChannelsCommandAsync(), param => canSynchronizeAllChannels());
        }
        /// <summary>
        /// Erzeugt eine Instanz der Klasse AddAndEditBallotViewModel.
        /// </summary>
        /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
        /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param>
        public AddAndEditBallotViewModel(INavigationService navService, IErrorMapper errorMapper)
            : base (navService, errorMapper)
        {
            groupController = new GroupController(this);

            if (BallotOptionsCollection == null)
                BallotOptionsCollection = new ObservableCollection<Option>();

            // Befehle
            CreateBallotCommand = new AsyncRelayCommand(
                param => executeCreateBallotCommandAsync(),
                param => canCreateBallot());
            EditBallotCommand = new AsyncRelayCommand(
                param => executeEditBallotAsync(),
                param => canEditBallot());
            AddBallotOptionCommand = new RelayCommand(
                param => executeAddOptionTextCommand(),
                param => canAddOptionText());
            RemoveBallotOptionCommand = new RelayCommand(
                param => executeRemoveOptionTextCommand(param),
                param => canRemoveOptionText());
        }
 /// <summary>
 /// Erzeuge eine Instanz von der Klasse ChannelDetailsViewModel.
 /// </summary>
 /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
 /// <param name="errorReporter">Eine Referenz auf den Fehlerdienst der Anwendung.</param>
 public ChannelDetailsViewModel(INavigationService navService, IErrorMapper errorReporter)
     : base(navService, errorReporter)
 {
     // Initialisiere Befehle.
     SubscribeChannelCommand = new AsyncRelayCommand(
         param => executeSubscribeChannel(),
         param => canSubscribeChannel());
     UnsubscribeChannelCommand = new AsyncRelayCommand(
         param => executeUnsubscribeChannel());
     SwitchToChannelSettingsCommand = new RelayCommand(
         param => executeSwitchToChannelSettingsCommand(),
         param => canSwitchToChannelSettings());
     OpenDeleteChannelLocallyFlyoutCommand = new RelayCommand(
         param => executeOpenDeleteChannelLocallyFlyoutCommand(),
         param => canOpenDeleteChannelLocallyFlyout());
     DeleteChannelLocallyFlyoutCommand = new RelayCommand(
         param => executeDeleteChannelLocallyCommand(),
         param => canDeleteChannelLocally());
     SynchronizeChannelDataCommand = new AsyncRelayCommand(
         param => executeSynchronizeChannelDataCommandAsync(),
         param => canSyncChannelData());
 }
        /// <summary>
        /// Erzeugt eine Instanz der Klasse GroupDetailsViewModel.
        /// </summary>
        /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
        /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param>
        public GroupDetailsViewModel(INavigationService navService, IErrorMapper errorMapper)
            : base(navService, errorMapper)
        {
            // Erzeuge Controller-Instanz.
            groupController = new GroupController(this);

            IsGroupParticipant = false;
            HasLeaveOption = false;

            localUser = groupController.GetLocalUser();

            if (BallotCollection == null)
                BallotCollection = new ObservableCollection<Ballot>();

            if (ConversationCollection == null)
                ConversationCollection = new ObservableCollection<Conversation>();

            // Erzeuge Befehle.
            JoinGroupCommand = new AsyncRelayCommand(
                param => executeJoinGroupCommandAsync(),
                param => canJoinGroup());
            LeaveGroupCommand = new AsyncRelayCommand(
                param => executeLeaveGroupCommandAsync(),
                param => canLeaveGroup());
            EditGroupCommand = new RelayCommand(
                param => executeEditGroupCommand(),
                param => canEditGroup());
            ConversationSelectedCommand = new RelayCommand(
                param => executeConversationSelectedCommand(param));
            SynchronizeDataCommand = new AsyncRelayCommand(
                param => executeSynchronizeDataCommandAsync(),
                param => canSynchronizeData());
            DeleteGroupCommand = new AsyncRelayCommand(
                param => executeDeleteGroupAsync(),
                param => canDeleteGroup());
            DeleteGroupLocallyCommand = new RelayCommand(
                param => executeDeleteGroupLocallyCommand(),
                param => canDeleteGroupLocally());
            ChangeToGroupSettingsCommand = new RelayCommand(
                param => executeChangeToGroupSettingsCommand(),
                param => canChangeToGroupSettings());
            ChangeToAddConversationDialog = new RelayCommand(
                param => executeChangeToAddConversationDialog(),
                param => canChangeToAddConversationDialog());
            BallotSelectedCommand = new RelayCommand(
                param => executeBallotSectedCommand(param));
            SwitchToCreateBallotDialogCommand = new RelayCommand(
                param => executeSwitchToCreateBallotDialogCommand(),
                param => canSwitchToCreateBallotDialog());
            SwichToGroupParticipantsViewCommand = new RelayCommand(
                param => executeSwitchToGroupParticipantsView(),
                param => canSwitchToGroupParticipantsView());
        }
        /// <summary>
        /// Erzeugt eine Instanz der Klasse BallotDetailsViewModel.
        /// </summary>
        /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
        /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param>
        public BallotDetailsViewModel(INavigationService navService, IErrorMapper errorMapper)
            : base (navService, errorMapper)
        {
            groupController = new GroupController(this);
            localUser = groupController.GetLocalUser();

            if (BallotOptionCollection == null)
                BallotOptionCollection = new ObservableCollection<Option>();

            if (VoteResultsCollection == null)
                VoteResultsCollection = new ObservableCollection<VoteResult>();

            PlaceVotesCommand = new AsyncRelayCommand(
                param => executePlaceVotesCommand(),
                param => canPlaceVotes());
            SynchronizeBallotCommand = new AsyncRelayCommand(
                param => executeSynchronizeBallotCommand(),
                param => canSynchronizeBallot());
            SwitchToEditDialogCommand = new RelayCommand(
                param => executeSwitchToEditDialogCommand(),
                param => canSwitchToEditDialog());
            DeleteBallotCommand = new AsyncRelayCommand(
                param => executeDeleteBallotAsync(),
                param => canDeleteBallot());
        }
        /// <summary>
        /// Erzeugt eine Instanz der Klasse GroupSettingsViewModel.
        /// </summary>
        /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
        /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param>
        public GroupSettingsViewModel(INavigationService navService, IErrorMapper errorMapper)
            : base (navService, errorMapper)
        {
            groupController = new GroupController();

            // Erzeuge Befehle.
            SaveNotificationSettingsCommand = new RelayCommand(
                param => executeSaveGroupNotificationSettingsCommand(),
                param => canSaveGroupSettings());
        }
        /// <summary>
        /// Erzeugt eine Instanz der Klasse GroupParticipantsViewModel.
        /// </summary>
        /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
        /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param>
        public GroupParticipantsViewModel(INavigationService navService, IErrorMapper errorMapper)
            : base(navService, errorMapper)
        {
            groupController = new GroupController();

            if (ParticipantsCollection == null)
                ParticipantsCollection = new ObservableCollection<User>();

            // Befehle
            RemoveParticipantCommand = new AsyncRelayCommand(
                param => executeRemoveParticipantCommand(param),
                param => canRemoveParticipants());
            SynchronizeGroupParticipantsCommand = new AsyncRelayCommand(
                param => executeSynchronizeParticipants(),
                param => canSynchronizeParticipants());
            UpdateDisplayingWarningStatusCommand = new RelayCommand(
                param => executeUpdateDisplayingWarningStatus());
        }
        /// <summary>
        /// Erzeugt eine Instanz der Klasse ModeratorChannelDetailsViewModel.
        /// </summary>
        /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param>
        /// <param name="errorMapper"></param>
        public ModeratorChannelDetailsViewModel(INavigationService navService, IErrorMapper errorMapper)
            : base(navService, errorMapper)
        {
            Reminders = new ObservableCollection<Reminder>();
            reminderLookup = new Dictionary<int, Reminder>();

            // Erzeuge Befehle.
            SwitchToAddAnnouncementDialogCommand = new RelayCommand(
                param => executeSwitchToAddAnnouncementDialogCommand(),
                param => canSwitchToAddAnnouncementDialog());
            SwitchToEditChannelDialogCommand = new RelayCommand(
                param => executeSwitchToEditChannelDialogCommand(),
                param => canSwitchToEditChannelDialog());
            SwitchToAddReminderDialogCommand = new RelayCommand(
                param => executeSwitchToAddReminderDialogCommand(),
                param => canSwitchToAddReminderDialog());
            ReminderSelectedCommand = new RelayCommand(
                param => executeReminderSelectedCommand(param));
            DeleteChannelCommand = new AsyncRelayCommand(
                param => executeDeleteChannelCommand());
            SynchronizeWithServerCommand = new AsyncRelayCommand(
                param => executeSynchronizeWithServerCommand(),
                param => canPerformSynchronizationWithServer());
        }