/// <summary> /// Erzeugt eine Instanz der Klasse LoginViewModel. /// </summary> /// <param name="navService">Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Referenz auf den Fehlerdienst der Anwendung.</param> public LoginViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { loginController = new LoginController(this); LoginCommand = new AsyncRelayCommand(param => executeLoginCommand()); }
/// <summary> /// Erzeugt eine Instanz der StartPageViewModel 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 StartPageViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { localUserController = new LocalUserController(this); // Liefere Referenz auf IValidationErrorReport mit. // Erstelle Befehle. CreateUserCommand = new AsyncRelayCommand(param => createLocalUser(), param => canCreateLocalUser()); }
/// <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> /// 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> /// Erzeugt eine Instanz der Klasse ApplicationSettingsViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public ApplicationSettingsViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { applicationSettingsController = new ApplicationSettingsController(this); SaveSettingsCommand = new AsyncRelayCommand(param => executeSaveSettingsCommand()); }
/// <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 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()); }
/// <summary> /// Erzeugt eine Instanz der Klasse SearchGroupViewModel. /// </summary> /// <param name="navService"></param> /// <param name="errorMapper"></param> public SearchGroupViewModel(INavigationService navService, IErrorMapper errorMapper) : base (navService, errorMapper) { // Erzeuge Instanz von GroupController. groupController = new GroupController(); if (Groups == null) { Groups = new ObservableCollection<Group>(); } // Setze initiale Parameter. WorkingGroupSelected = true; TutorialGroupSelected = true; HasEmptySearchResult = false; // Befehle erzeugen GroupSelectedCommand = new AsyncRelayCommand(param => executeGroupSelectedCommandAsync(param)); SearchGroupsCommand = new AsyncRelayCommand( param => executeSearchGroupsCommandAsync(), param => canSearchGroups() ); }
/// <summary> /// Erzeugt eine Instanz der Klasse AddAnnouncementViewModel /// </summary> /// <param name="navService"></param> /// <param name="errorMapper"></param> public AddAnnouncementViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { channelController = new ChannelController(this); // Initialisiere Parameter. IsMessagePriorityNormalSelected = true; IsMessagePriorityHighSelected = false; // Befehle anlegen. CreateNewAnnouncementCommand = new AsyncRelayCommand(param => executeCreateNewAnnouncementCommand()); }
/// <summary> /// Erzeugt eine Instanz der Klasse AddAndEditReminderViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public AddAndEditReminderViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { channelController = new ChannelController(this); // Erzeuge Befehle. CreateReminderCommand = new AsyncRelayCommand(param => executeCreateReminderCommand()); EditReminderCommand = new AsyncRelayCommand(param => executeEditReminderCommand(), param => canEditReminder()); }
/// <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 AddGroupViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public AddAndEditGroupViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { // Erzeuge Referenz auf GroupController mit Validierungsfehler-Meldung. groupController = new GroupController(this); // Erzeuge Befehle. AddGroupCommand = new AsyncRelayCommand(param => executeAddGroupCommand(), param => canAddGroup()); EditGroupCommand = new AsyncRelayCommand(param => executeEditGroupAsync(), param => canEditGroup()); }
/// <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 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 AddAndEditConversationViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public AddAndEditConversationViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { groupController = new GroupController(this); // Erzeuge Befehle. AddConversationCommand = new AsyncRelayCommand( param => executeAddConversationCommandAsync(), param => canAddConversation()); EditConversationCommand = new AsyncRelayCommand( param => executeEditConversationCommandAsync(), param => canEditConversation()); }
/// <summary> /// Erzeugt eine Instanz der Klasse AddAndEditChannelViewModel. /// </summary> /// <param name="navService">Eine Referenz auf den Navigationsdienst der Anwendung.</param> /// <param name="errorMapper">Eine Referenz auf den Fehlerdienst der Anwendung.</param> public AddAndEditChannelViewModel(INavigationService navService, IErrorMapper errorMapper) : base(navService, errorMapper) { channelController = new ChannelController(this); // Lege Commands an. AddChannelCommand = new AsyncRelayCommand(param => executeAddChannelCommand()); EditChannelCommand = new AsyncRelayCommand(param => executeEditChannelCommand(), param => canEditChannel()); }
/// <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()); }