/// <summary>
        /// Инициализирует новый экземпляр класса <see cref="GroupSettingsViewModel"/>.
        /// </summary>
        public GroupSettingsViewModel(IVKService vkService, IAppNotificationsService appNotificationsService,
                                      INavigationService navigationService)
        {
            this.vkService = vkService;
            this.appNotificationsService = appNotificationsService;
            this.navigationService       = navigationService;

            SaveSettings = new DelegateCommand(OnSaveSettings);
        }
Esempio n. 2
0
 public DownloadsServiceHelper(
     IDialogsService dialogsService,
     IDownloadsService downloadsService,
     ILocService locService,
     IAppNotificationsService appNotificationsService)
 {
     _dialogsService          = dialogsService;
     _downloadsService        = downloadsService;
     _locService              = locService;
     _appNotificationsService = appNotificationsService;
 }
Esempio n. 3
0
        /// <summary>
        /// Инициализирует новый экземпляр класса <see cref="NewsfeedViewModel"/>.
        /// </summary>
        public NewsfeedViewModel(INavigationService navigationService, IAppNotificationsService appNotificationsService,
                                 IVKService vkService, ISessionStateService sessionStateService)
        {
            this.navigationService       = navigationService;
            this.appNotificationsService = appNotificationsService;
            this.vkService           = vkService;
            this.sessionStateService = sessionStateService;

            OpenNewsfeedItem      = new DelegateCommand <VKNewsfeedItem>(OnOpenNewsfeedItem);
            OpenNewsfeedItemOwner = new DelegateCommand <VKNewsfeedItem>(OnOpenNewsfeedItemOwner);
        }
Esempio n. 4
0
        /// <summary>
        /// Инициализирует новый экземпляр класса <see cref="GroupViewModel"/>.
        /// </summary>
        /// <param name="vkService">Сервис для работы с ВКонтакте.</param>
        /// <param name="appNotificationsService">Сервис внутренних увдеомлений.</param>
        /// <param name="navigationService">Сервис навигации.</param>
        public GroupViewModel(IVKService vkService, IAppNotificationsService appNotificationsService,
                              INavigationService navigationService)
        {
            this.vkService = vkService;
            this.appNotificationsService = appNotificationsService;
            this.navigationService       = navigationService;

            OpenGroupSettings    = new DelegateCommand(OnOpenGroupSettings);
            OpenGroupDescription = new DelegateCommand(OnOpenGroupDescription);
            JoinGroup            = new DelegateCommand(OnJoinGroup, () => Group != null && !Group.IsMember);
            ExitGroup            = new DelegateCommand(OnExitGroup, () => Group != null && Group.IsMember);
        }
Esempio n. 5
0
        public TestViewModel(IAppNotificationsService appNotificationsService, IVKLongPollService vkLongPollService,
                             IGrooveMusicService gms, IPushNotificationsService pushNotificationsService, ISettingsService settingsService)
        {
            this.appNotificationsService = appNotificationsService;
            this.vkLongPollService       = vkLongPollService;
            this.gms = gms;
            this.pushNotificationsService = pushNotificationsService;
            this.settingsService          = settingsService;

            ShowSimplePush = new DelegateCommand <string>(OnShowSimplePush);
            ShowCustomPush = new DelegateCommand(OnShowCustomPush);
            DeserializeLongPollResponse = new DelegateCommand(OnDeserializeLongPollResponse);
        }
Esempio n. 6
0
        public TransferNotificationsService(
            IDownloadsService downloadsService,
            IUploadsService uploadsService,
            ILocService locService,
            IAppNotificationsService appNotificationsService)
        {
            _downloadsService        = downloadsService;
            _uploadsService          = uploadsService;
            _locService              = locService;
            _appNotificationsService = appNotificationsService;

            _notifications = new Dictionary <Guid, AppNotification>(4);
        }
Esempio n. 7
0
 public UploadsPostprocessor(
     InTouch inTouch, 
     IInTouchWrapper inTouchWrapper, 
     ILogService logService,
     IDialogsService dialogsService,
     ILocService locService,
     IAppNotificationsService appNotificationsService)
 {
     _inTouch = inTouch;
     _inTouchWrapper = inTouchWrapper;
     _logService = logService;
     _dialogsService = dialogsService;
     _locService = locService;
     _appNotificationsService = appNotificationsService;
 }
Esempio n. 8
0
        public PlayerViewModel(
            InTouch inTouch,
            IInTouchWrapper inTouchWrapper,
            INavigationService navigationService,
            IPlayerService playerService,
            IPlayerPlaylistService playerPlaylistService,
            IImagesCacheService imagesCacheService,
            ITracksShuffleService tracksShuffleService,
            IDownloadsServiceHelper downloadsServiceHelper,
            IAppLoaderService appLoaderService,
            ILastFmLoginService lastFmLoginService,
            IPurchaseService purchaseService,
            ILocService locService,
            IDialogsService dialogsService,
            IAppNotificationsService appNotificationsService,
            ISettingsService settingsService)
            : base(inTouch, appLoaderService, dialogsService, inTouchWrapper, downloadsServiceHelper,
                   playerService, locService, navigationService, purchaseService)
        {
#if DEBUG
            Debug.WriteLine("Вызван конструктор PlayerViewModel.");
#endif

            IsReloadButtonSupported  = false;
            IsShuffleButtonSupported = false;
            IsPlayButtonSupported    = false;

            _playerPlaylistService   = playerPlaylistService;
            _imagesCacheService      = imagesCacheService;
            _tracksShuffleSevice     = tracksShuffleService;
            _lastFmLoginService      = lastFmLoginService;
            _appNotificationsService = appNotificationsService;
            _settingsService         = settingsService;

            _timer = new DispatcherTimer {
                Interval = TimeSpan.FromMilliseconds(500)
            };

            NextTrackCommand     = new DelegateCommand(OnNextTrackCommand);
            PreviousTrackCommand = new DelegateCommand(OnPreviosTrackCommand);
            PlayPauseCommand     = new DelegateCommand(OnPlayPauseCommand);
            PlayTrackCommand     = new DelegateCommand <PlayerItem>(OnPlayTrackCommand);
            ShowLyricsCommand    = new DelegateCommand(OnShowLyricsCommand,
                                                       () => CurrentTrack?.Track.VKInfo != null && CurrentTrack.Track.VKInfo.LyricsID != 0);
        }
Esempio n. 9
0
 public PlayerViewModel(
     InTouch inTouch,
     IInTouchWrapper inTouchWrapper,
     INavigationService navigationService,
     IPlayerService playerService,
     IPlayerPlaylistService playerPlaylistService,
     IImagesCacheService imagesCacheService,
     ITracksShuffleService tracksShuffleService,
     IDownloadsServiceHelper downloadsServiceHelper,
     IAppLoaderService appLoaderService,
     ILastFmLoginService lastFmLoginService,
     IPurchaseService purchaseService,
     ILocService locService,
     IDialogsService dialogsService,
     IAppNotificationsService appNotificationsService,
     ISettingsService settingsService,
     IEventAggregator eventAggregator)
     : this(inTouch, inTouchWrapper, navigationService, playerService, playerPlaylistService, imagesCacheService,
            tracksShuffleService, downloadsServiceHelper, appLoaderService, lastFmLoginService, purchaseService,
            locService, dialogsService, appNotificationsService, settingsService)
 {
     _eventAggregator = eventAggregator;
 }
Esempio n. 10
0
 public PhotoAlbumsViewModel(IVKService vkService, IAppNotificationsService appNotificationsService, ObservableCollection <AlbumModel> albumList)
 {
     this.appNotificationsService = appNotificationsService;
     this.vkService = vkService;
 }
Esempio n. 11
0
 /// <summary>
 /// Инициализирует новый экземпляр класса <see cref="VKLongPollService"/>.
 /// </summary>
 /// <param name="appNotificationsService">Сервис внутренних уведомлений.</param>
 /// <param name="vkService">Сервис работы с ВКонтакте.</param>
 public VKLongPollService(IAppNotificationsService appNotificationsService, IVKService vkService)
 {
     this.appNotificationsService = appNotificationsService;
     this.vkService = vkService;
 }
Esempio n. 12
0
 /// <summary>
 /// Инициализирует новый экземпляр класса <see cref="GrooveMusicService"/>.
 /// </summary>
 /// <param name="appNotificationService">Сервис внутренних уведомлений.</param>
 public GrooveMusicService(IAppNotificationsService appNotificationService)
 {
     this.appNotificationService = appNotificationService;
     client = new XboxMusicServiceClient(CLIENT_NAME, CLIENT_SECRET);
 }