private void InitNotificationHub()
 {
     AppSettings appSettings = new AppSettings();
     NotificationManager notificationManager = new NotificationManager(appSettings);
     if (appSettings.Notifications)
         notificationManager.RegistrerDeviceToAzureNotificationHub();
     else
         notificationManager.UnregistrerDeviceFromAzureNotificationHub();
 }
        public SettingsViewModel(IDialogService dialogService)
        {
            this.dialogService = dialogService;

            this.LogIn = new RelayCommand(LogInCommand);
            this.LogOut = new RelayCommand(LogOutCommand);
            this.isNotificationsEnabled = appSettings.Notifications;

            this.notificationManager = new NotificationManager(appSettings);

            Login = appSettings.Login;
            Password = appSettings.Password;
            IsConnected = !string.IsNullOrWhiteSpace(appSettings.Login) && !string.IsNullOrWhiteSpace(appSettings.Password);
        }