コード例 #1
0
ファイル: SettingsViewModel.cs プロジェクト: RomanGL/VKSaver
        public SettingsViewModel(
            INavigationService navigationService,
            IVKLoginService vkLoginService,
            ISettingsService settingsService,
            ILastFmLoginService lastFmLoginSevice,
            ILocService locService,
            IDialogsService dialogsService,
            IInTouchWrapper inTouchWrapper,
            InTouch inTouch,
            ILaunchViewResolver launchViewResolver,
            INotificationsService notificationsService)
        {
            _navigationService    = navigationService;
            _vkLoginService       = vkLoginService;
            _settingsService      = settingsService;
            _lastFmLoginService   = lastFmLoginSevice;
            _inTouchWrapper       = inTouchWrapper;
            _inTouch              = inTouch;
            _locService           = locService;
            _dialogsService       = dialogsService;
            _launchViewResolver   = launchViewResolver;
            _notificationsService = notificationsService;

            Authorizations            = new ObservableCollection <IServiceAuthorization>();
            UpdateDatabaseCommand     = new DelegateCommand(OnUpdateDatabaseCommand);
            ExtractMp3FromVksmCommand = new DelegateCommand(OnExtractMp3FromVksmCommand);
        }
コード例 #2
0
        public InTouchWrapper(InTouch inTouch, IVKBehaviorSimulator vkBehaviorSimulator)
        {
            _inTouch             = inTouch;
            _vkBehaviorSimulator = vkBehaviorSimulator;

            _queue = new TaskQueue();
        }
コード例 #3
0
 public VKBehaviorSimulator(
     InTouch inTouch,
     ILogService logService)
 {
     _inTouch    = inTouch;
     _logService = logService;
 }
コード例 #4
0
        public PopularVKAudioViewModel(
            InTouch inTouch,
            IAppLoaderService appLoaderService,
            IDialogsService dialogsService,
            IInTouchWrapper inTouchWrapper,
            IDownloadsServiceHelper downloadsServiceHelper,
            IPlayerService playerService,
            ILocService locService,
            INavigationService navigationService,
            ISettingsService settingsService,
            IPurchaseService purchaseService)
            : base(inTouch, appLoaderService, dialogsService, inTouchWrapper,
                   downloadsServiceHelper, playerService, locService, navigationService, purchaseService)
        {
            _settingsService = settingsService;

            IsReloadButtonSupported  = true;
            IsPlayButtonSupported    = true;
            IsShuffleButtonSupported = true;

            ShowFilterFlyoutCommand   = new DelegateCommand(OnShowFilterFlyoutCommand);
            FilterFlyoutClosedCommand = new DelegateCommand(OnFilterFlyoutClosedCommand);

            CreateFilters();
        }
コード例 #5
0
        public static InTouch ResolveInTouch(IUnityContainer container)
        {
            var inTouch = new InTouch(userAgent: AppConstants.VK_USER_AGENT);

            inTouch.Md5Func = Md5Helper.GetMd5Hash;
            return(inTouch);
        }
コード例 #6
0
        public AudioSearchViewModel(
            InTouch inTouch,
            INavigationService navigationService,
            ILocService locService,
            ISettingsService settingsService,
            IDialogsService dialogsService,
            IPlayerService playerService,
            IAppLoaderService appLoaderService,
            IDownloadsServiceHelper downloadsServiceHelper,
            IInTouchWrapper inTouchWrapper,
            IPurchaseService purchaseService)
            : base(inTouch, navigationService, locService, settingsService, dialogsService, inTouchWrapper)
        {
            _playerService          = playerService;
            _appLoaderService       = appLoaderService;
            _downloadsServiceHelper = downloadsServiceHelper;
            _purchaseService        = purchaseService;

            DownloadCommand         = new DelegateCommand <Audio>(OnDownloadCommand);
            DownloadSelectedCommand = new DelegateCommand(OnDownloadSelectedCommand, HasSelectedItems);

            AddToMyAudiosCommand         = new DelegateCommand <Audio>(OnAddToMyAudiosCommand, CanAddToMyAudios);
            AddSelectedToMyAudiosCommand = new DelegateCommand(OnAddSelectedToMyAudiosCommand, HasSelectedItems);

            DeleteCommand         = new DelegateCommand <Audio>(OnDeleteCommand, CanDeleteAudio);
            DeleteSelectedCommand = new DelegateCommand(OnDeleteSelectedCommand, HasSelectedItems);

            PlaySelectedCommand        = new DelegateCommand(OnPlaySelectedCommand, HasSelectedItems);
            ShowPerformerFlyoutCommand = new DelegateCommand(OnShowPerformerFlyoutCommand);
            ShowTrackInfoCommand       = new DelegateCommand <Audio>(OnShowTrackInfoCommand);
        }
コード例 #7
0
ファイル: Class1.cs プロジェクト: gitter-badger/InTouch
        public void TestSetup()
        {
            var mockHttp = new MockHttpMessageHandler();

            mockHttp.When("http://localost/api/user/*").Respond("application/json", "{'name' : 'Test McGee'}");

            _apiCLient = new InTouch(mockHttp, 1488, "superSecret");
        }
コード例 #8
0
        public SelectSearchTypeViewModel(INavigationService navigationService, InTouch inTouch,
                                         IPurchaseService purchaseService)
        {
            _navigationService = navigationService;
            _inTouch           = inTouch;
            _purchaseService   = purchaseService;

            GoToSearchCommand = new DelegateCommand <string>(OnGoToSearchCommand);
        }
コード例 #9
0
        public UserCommViewModel(InTouch inTouch, INavigationService navigationService,
                                 IInTouchWrapper inTouchWrapper)
        {
            _inTouch           = inTouch;
            _navigationService = navigationService;
            _inTouchWrapper    = inTouchWrapper;

            ExecuteItemCommand    = new DelegateCommand <object>(OnExecuteItemCommand);
            NotImplementedCommand = new DelegateCommand(() => _navigationService.Navigate("AccessDeniedView", null));
        }
コード例 #10
0
 public VKAdService(
     IInTouchWrapper inTouchWrapper,
     InTouch inTouch,
     IMetricaService metricaService,
     ILogService logService)
 {
     _inTouchWrapper = inTouchWrapper;
     _inTouch        = inTouch;
     _metricaService = metricaService;
     _logService     = logService;
 }
コード例 #11
0
        public TrackLyricsViewModel(InTouch inTouch, INavigationService navigationService,
                                    IDialogsService dialogService, ILocService locService, IInTouchWrapper inTouchWrapper)
        {
            _inTouch           = inTouch;
            _navigationService = navigationService;
            _dialogService     = dialogService;
            _locService        = locService;
            _inTouchWrapper    = inTouchWrapper;

            ReloadLyricsCommand = new DelegateCommand(OnReloadLyricsCommand);
        }
コード例 #12
0
 public UploadsPreprocessor(
     InTouch inTouch,
     IInTouchWrapper inTouchWrapper,
     ILocService locService,
     IDialogsService dialogsService)
 {
     _inTouch        = inTouch;
     _inTouchWrapper = inTouchWrapper;
     _locService     = locService;
     _dialogsService = dialogsService;
 }
コード例 #13
0
        public UserContentViewModel(
            InTouch inTouch,
            INavigationService navigationService,
            IPlayerService playerService,
            IDownloadsServiceHelper downloadsServiceHelper,
            IAppLoaderService appLoaderService,
            IVKLoginService vkLoginService,
            IDialogsService dialogsService,
            ILocService locService,
            IInTouchWrapper inTouchWrapper,
            ILaunchViewResolver launchViewResolver,
            IPurchaseService purchaseService)
        {
            _inTouch                = inTouch;
            _navigationService      = navigationService;
            _playerService          = playerService;
            _downloadsServiceHelper = downloadsServiceHelper;
            _appLoaderService       = appLoaderService;
            _vkLoginService         = vkLoginService;
            _dialogsService         = dialogsService;
            _locService             = locService;
            _inTouchWrapper         = inTouchWrapper;
            _launchViewResolver     = launchViewResolver;
            _purchaseService        = purchaseService;

            SelectedItems  = new List <object>();
            PrimaryItems   = new ObservableCollection <ICommandBarElement>();
            SecondaryItems = new ObservableCollection <ICommandBarElement>();

            ExecuteTracksListItemCommand = new DelegateCommand <object>(OnExecuteTracksListItemCommand);
            NotImplementedCommand        = new DelegateCommand(() => _navigationService.Navigate("AccessDeniedView", null));
            DownloadItemCommand          = new DelegateCommand <object>(OnDownloadItemCommand, CanExecuteDownloadItemCommand);
            ActivateSelectionMode        = new DelegateCommand(SetSelectionMode, CanSelectionMode);
            ReloadContentCommand         = new DelegateCommand(OnReloadContentCommand);
            DownloadSelectedCommand      = new DelegateCommand(OnDownloadSelectedCommand, CanExecuteDownloadSelectedCommand);
            SelectionChangedCommand      = new DelegateCommand(OnSelectionChangedCommand);
            SelectAllCommand             = new DelegateCommand(OnSelectAllCommand, CanSelectionMode);

            AddToMyCollectionCommand         = new DelegateCommand <object>(OnAddToMyCollection, CanAddToMyCollection);
            AddSelectedToMyCollectionCommand = new DelegateCommand(OnAddSelectedToMyCollection, CanAddSelected);
            PlaySelectedCommand = new DelegateCommand(OnPlaySelectedCommand, HasSelectedAudios);
            PlayShuffleCommand  = new DelegateCommand(OnPlayShuffleCommand);

            DeleteCommand         = new DelegateCommand <object>(OnDeleteCommand, CanDelete);
            DeleteSelectedCommand = new DelegateCommand(OnDeleteSelectedCommand, CanDeleteSelected);

            OpenTransferManagerCommand = new DelegateCommand(OnOpenTransferManagerCommand);
            OpenMainViewCommand        = new DelegateCommand(OnOpenMainViewCommand);

            ShowTrackInfoCommand = new DelegateCommand <Audio>(OnShowTrackInfoCommand);
        }
コード例 #14
0
 protected VKAudioImplementedViewModel(
     InTouch inTouch,
     IAppLoaderService appLoaderService,
     IDialogsService dialogsService,
     IInTouchWrapper inTouchWrapper,
     IDownloadsServiceHelper downloadsServiceHelper,
     IPlayerService playerService,
     ILocService locService,
     INavigationService navigationService,
     IPurchaseService purchaseService)
     : base(inTouch, appLoaderService, dialogsService, inTouchWrapper, downloadsServiceHelper,
            playerService, locService, navigationService, purchaseService)
 {
 }
コード例 #15
0
 public RecommendedViewModel(
     InTouch inTouch,
     INavigationService navigationService,
     IPlayerService playerService,
     IDownloadsServiceHelper downloadsServiceHelper,
     IAppLoaderService appLoaderService,
     IDialogsService dialogsService,
     ILocService locService,
     IInTouchWrapper inTouchWrapper,
     IPurchaseService purchaseService)
     : base(inTouch, appLoaderService, dialogsService, inTouchWrapper, downloadsServiceHelper,
            playerService, locService, navigationService, purchaseService)
 {
     IsReloadButtonSupported = true;
 }
コード例 #16
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;
 }
コード例 #17
0
        public VideoSearchViewModel(InTouch inTouch, INavigationService navigationService,
                                    ILocService locService, ISettingsService settingsService, IDialogsService dialogsService,
                                    IAppLoaderService appLoaderService, IInTouchWrapper inTouchWrapper)
            : base(inTouch, navigationService, locService, settingsService, dialogsService, inTouchWrapper)
        {
            _appLoaderService = appLoaderService;

            AddToMyVideosCommand         = new DelegateCommand <Video>(OnAddToMyVideosCommand, CanAddToMyVideos);
            AddSelectedToMyVideosCommand = new DelegateCommand(OnAddSelectedToMyAudiosCommand, HasSelectedItems);

            DeleteCommand             = new DelegateCommand <Video>(OnDeleteCommand, CanDeleteVideo);
            DeleteSelectedCommand     = new DelegateCommand(OnDeleteSelectedCommand, HasSelectedItems);
            ShowFilterFlyoutCommand   = new DelegateCommand(OnShowPerformerFlyoutCommand);
            FilterFlyoutClosedCommand = new DelegateCommand(OnFilterFlyoutClosedCommand);
            CreateFilters();
        }
コード例 #18
0
 public AdsService(
     INavigationService navigationService,
     ISettingsService settingsService,
     IDialogsService dialogsService,
     ILocService locService,
     IMetricaService metricaService,
     IInTouchWrapper inTouchWrapper,
     InTouch inTouch)
 {
     _navigationService = navigationService;
     _settingsService   = settingsService;
     _dialogsService    = dialogsService;
     _locService        = locService;
     _metricaService    = metricaService;
     _inTouchWrapper    = inTouchWrapper;
     _inTouch           = inTouch;
 }
コード例 #19
0
        public VideoInfoViewModel(INavigationService navigationService, InTouch inTouch,
                                  IAppLoaderService appLoaderService, ILocService locService,
                                  IVideoLinksExtractor videoLinksExtractor, IDialogsService dialogsService,
                                  IDownloadsServiceHelper downloadsServiceHelper)
        {
            _navigationService      = navigationService;
            _inTouch                = inTouch;
            _appLoaderService       = appLoaderService;
            _locService             = locService;
            _videoLinksExtractor    = videoLinksExtractor;
            _dialogsService         = dialogsService;
            _downloadsServiceHelper = downloadsServiceHelper;

            LoadLinksCommand     = new DelegateCommand(OnLoadLinksCommand);
            PlayVideoCommand     = new DelegateCommand(OnPlayVideoCommand, CanPlayAndDownload);
            DownloadVideoCommand = new DelegateCommand(OnDownloadVideoCommand, CanPlayAndDownload);
        }
コード例 #20
0
ファイル: PlayerViewModel.cs プロジェクト: RomanGL/VKSaver
        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);
        }
コード例 #21
0
        public TrackInfoViewModel(
            INavigationService navigationService,
            InTouch inTouch,
            IInTouchWrapper inTouchWrapper,
            IPlayerService playerService,
            IDownloadsServiceHelper downloadsServiceHelper,
            IAppLoaderService appLoaderService,
            IDialogsService dialogsService,
            ILocService locService,
            IImagesCacheService imagesCacheService,
            IPurchaseService purchaseService)
            : base(inTouch, appLoaderService, dialogsService, inTouchWrapper, downloadsServiceHelper,
                   playerService, locService, navigationService, purchaseService)
        {
            _imagesCacheService = imagesCacheService;

            ShowOtherTracksCommand = new DelegateCommand(OnShowOtherTracksCommand);
        }
コード例 #22
0
        public AudioAlbumViewModel(
            INavigationService navigationService,
            IPlayerService playerService,
            IDownloadsServiceHelper downloadsServiceHelper,
            InTouch inTouch,
            IAppLoaderService appLoaderService,
            IDialogsService dialogsService,
            ILocService locService,
            IInTouchWrapper inTouchWrapper,
            IPurchaseService purchaseService)
            : base(inTouch, appLoaderService, dialogsService, inTouchWrapper,
                   downloadsServiceHelper, playerService, locService, navigationService, purchaseService)
        {
            IsReloadButtonSupported = true;

            DeleteAudioCommand    = new DelegateCommand <Audio>(OnDeleteAudioCommand, CanDeleteAudio);
            DeleteSelectedCommand = new DelegateCommand(OnDeleteSelectedCommand, HasSelectedItems);
        }
コード例 #23
0
ファイル: MainViewModel.cs プロジェクト: RomanGL/VKSaver
        public MainViewModel(
            InTouch inTouch,
            LastfmClient lfClient,
            IInTouchWrapper inTouchWrapper,
            INavigationService navigationService,
            IPurchaseService purchaseService,
            IPlayerService playerService,
            IDownloadsServiceHelper downloadsServiceHelper,
            IImagesCacheService imagesCacheService,
            IAdsService adsService)
        {
            _inTouch                = inTouch;
            _lfClient               = lfClient;
            _inTouchWrapper         = inTouchWrapper;
            _navigationService      = navigationService;
            _purchaseService        = purchaseService;
            _playerService          = playerService;
            _downloadsServiceHelper = downloadsServiceHelper;
            _imagesCacheService     = imagesCacheService;
            _adsService             = adsService;

            GoToTrackInfoCommand         = new DelegateCommand <LastTrack>(OnGoToTrackInfoCommand);
            GoToArtistInfoCommand        = new DelegateCommand <LastArtist>(OnGoToArtistInfoCommand);
            GoToTopTracksCommand         = new DelegateCommand(OnGoToTopTracksCommand);
            GoToTopArtistsCommand        = new DelegateCommand(OnGoTopArtistsCommand);
            GoToUserContentCommand       = new DelegateCommand <string>(OnGoToUserContentCommand);
            GoToUserCommCommand          = new DelegateCommand <string>(OnGoToUserCommCommand);
            GoToTransferViewCommand      = new DelegateCommand <string>(OnGoToTransferViewCommand);
            GoToAboutViewCommand         = new DelegateCommand(OnGoToAboutViewCommand);
            GoToRecommendedViewCommand   = new DelegateCommand(OnGoToRecommendedViewCommand);
            GoToPlayerViewCommand        = new DelegateCommand(OnGoToPlayerViewCommand);
            PlayRecommendedTracksCommand = new DelegateCommand <Audio>(OnPlayRecommendedTracksCommand);
            PlayUserTracksCommand        = new DelegateCommand <Audio>(OnPlayUserTracksCommand);
            DownloadTrackCommand         = new DelegateCommand <Audio>(OnDownloadTrackCommand);
            GoToSearchCommand            = new DelegateCommand(OnGoToSearchCommand);
            GoToSettingsViewCommand      = new DelegateCommand(OnGoToSettingsViewCommand);
            GoToNewsViewCommand          = new DelegateCommand(OnGoToNewsViewCommand);
            GoToLibraryViewCommand       = new DelegateCommand <string>(OnGoToLibraryViewCommand);
            GoToUploadFileViewCommand    = new DelegateCommand(OnGoToUploadFileViewCommand);
            GoToPopularVKViewCommand     = new DelegateCommand(OnGoToPopularVKViewCommand);

            NotImplementedCommand = new DelegateCommand(() => _navigationService.Navigate("AccessDeniedView", null));
        }
コード例 #24
0
ファイル: GeneralClientTest.cs プロジェクト: RomanGL/InTouch
        public void SettingSessionData()
        {
            _it1 = new InTouch(12345, "super_secret");

            Throws <ArgumentNullException>(() => _it1.SetSessionData("", 0));
            Throws <ArgumentException>(() => _it1.SetSessionData("access_token", 0));
            Throws <ArgumentException>(() => _it1.SetSessionData("access_token", 1, 0));
            Throws <ArgumentNullException>(() => _it1.SetSessionData(null));
            DoesNotThrow(() => _it1.SetSessionData("access_token", 1));
            IsNotNull(_it1.Session, "_it1.Session != null");

            _it1.SetApplicationSettings(123456, "super_secret2");

            IsNull(_it1.Session, "_it1.Session != null");

            _it1.SetSessionData("access_token", 1);
            _it1.SetApplicationSettings(123456, "super_secret2");

            IsNotNull(_it1.Session, "_it1.Session != null");
        }
コード例 #25
0
        protected VKAudioViewModel(
            InTouch inTouch,
            IAppLoaderService appLoaderService,
            IDialogsService dialogsService,
            IInTouchWrapper inTouchWrapper,
            IDownloadsServiceHelper downloadsServiceHelper,
            IPlayerService playerService,
            ILocService locService,
            INavigationService navigationService,
            IPurchaseService purchaseService)
            : base(downloadsServiceHelper, appLoaderService, playerService, locService, navigationService)
        {
            _inTouch         = inTouch;
            _dialogsService  = dialogsService;
            _inTouchWrapper  = inTouchWrapper;
            _purchaseService = purchaseService;

            AddToMyAudiosCommand         = new DelegateCommand <T>(OnAddToMyAudiosCommand, CanAddToMyAudios);
            AddSelectedToMyAudiosCommand = new DelegateCommand(OnAddSelectedToMyAudiosCommand, () => HasSelectedItems() & CanAddSelectedAudios());
            ShowTrackInfoCommand         = new DelegateCommand <T>(OnShowTrackInfoCommand, CanShowTrackInfo);
        }
コード例 #26
0
        public VideoAlbumViewModel(INavigationService navigationService, InTouch inTouch,
                                   IAppLoaderService appLoaderService, IDialogsService dialogsService, ILocService locService,
                                   IInTouchWrapper inTouchWrapper)
        {
            _navigationService = navigationService;
            _inTouch           = inTouch;
            _dialogsService    = dialogsService;
            _locService        = locService;
            _appLoaderService  = appLoaderService;
            _inTouchWrapper    = inTouchWrapper;

            PrimaryItems   = new ObservableCollection <ICommandBarElement>();
            SecondaryItems = new ObservableCollection <ICommandBarElement>();

            ReloadContentCommand       = new DelegateCommand(OnReloadContentCommand);
            AddToMyVideosCommand       = new DelegateCommand <Video>(OnAddToMyVideosCommand, CanAddToMyVideos);
            OpenVideoCommand           = new DelegateCommand <Video>(OnOpenVideoCommand);
            OpenTransferManagerCommand = new DelegateCommand(OnOpenTransferManagerCommand);

            DeleteVideoCommand = new DelegateCommand <Video>(OnDeleteVideoCommand, CanDeleteVideo);
        }
コード例 #27
0
ファイル: PlayerViewModel.cs プロジェクト: RomanGL/VKSaver
 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;
 }
コード例 #28
0
        public SearchViewModelBase(InTouch inTouch, INavigationService navigationService,
                                   ILocService locService, ISettingsService settingsService, IDialogsService dialogsService,
                                   IInTouchWrapper inTouchWrapper)
        {
            _inTouch           = inTouch;
            _navigationService = navigationService;
            _locService        = locService;
            _settingsService   = settingsService;
            _dialogsService    = dialogsService;
            _inTouchWrapper    = inTouchWrapper;

            PrimaryItems   = new ObservableCollection <ICommandBarElement>();
            SecondaryItems = new ObservableCollection <ICommandBarElement>();
            SelectedItems  = new List <object>();

            QueryBoxKeyDownCommand     = new DelegateCommand <KeyRoutedEventArgs>(OnQueryBoxKeyDownCommand);
            SelectionChangedCommand    = new DelegateCommand(OnSelectionChangedCommand);
            ExecuteItemCommand         = new DelegateCommand <T>(OnExecuteItemCommand);
            OpenTransferManagerCommand = new DelegateCommand(OnOpenTransferManagerCommand);
            ReloadCommand = new DelegateCommand(Search);
            ActivateSelectionModeCommand = new DelegateCommand(SetSelectionMode, CanActivateSelectionModeCommand);
            SelectAllCommand             = new DelegateCommand(() => SelectAll = !SelectAll);
        }
コード例 #29
0
ファイル: MethodParamsGroup.cs プロジェクト: RomanGL/InTouch
        public MethodParams GetParams(InTouch api)
        {
            API = api;

            return GetParams();
        }
コード例 #30
0
 public void TestSetup()
 {
     _inTouch = Ex.GetMockedClient("notes");
 }
コード例 #31
0
ファイル: FaveMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="FaveMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal FaveMethods(InTouch api) : base(api, "fave") { }
コード例 #32
0
ファイル: MarketMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="MarketMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal MarketMethods(InTouch api) : base(api, "market") { }
コード例 #33
0
ファイル: SearchMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="SearchMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal SearchMethods(InTouch api) : base(api, "search") { }
コード例 #34
0
ファイル: AuthMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal AuthMethods(InTouch api) : base(api, "auth") { }
コード例 #35
0
ファイル: BoardMethodsTests.cs プロジェクト: RomanGL/InTouch
 public void TestSetup()
 {
     _inTouch = Ex.GetMockedClient("board");
 }
コード例 #36
0
ファイル: LikesMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="LikesMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal LikesMethods(InTouch api) : base(api, "likes") { }
コード例 #37
0
ファイル: FaveMethodsTests.cs プロジェクト: RomanGL/InTouch
 public void TestSetup()
 {
     _inTouch = Ex.GetMockedClient("fave");
 }
コード例 #38
0
ファイル: StorageMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="StorageMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal StorageMethods(InTouch api) : base(api, "storage") { }
コード例 #39
0
ファイル: DatabaseMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="DatabaseMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal DatabaseMethods(InTouch api) : base(api, "database") { }
コード例 #40
0
ファイル: MarketMethodsTests.cs プロジェクト: RomanGL/InTouch
 public void TestSetup()
 {
     _inTouch = Ex.GetMockedClient("market");
 }
コード例 #41
0
ファイル: UsersMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="UsersMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal UsersMethods(InTouch api) : base(api, "users") { }
コード例 #42
0
ファイル: StatsMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="StatsMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal StatsMethods(InTouch api) : base(api, "stats") { }
コード例 #43
0
 public void TestSetup()
 {
     _inTouch = Ex.GetMockedClient("database");
 }
コード例 #44
0
ファイル: FriendsMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="FriendsMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal FriendsMethods(InTouch api) : base(api, "friends") { }
コード例 #45
0
ファイル: WallMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="WallMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal WallMethods(InTouch api) : base(api, "wall") { }
コード例 #46
0
 public void TestSetup()
 {
     _inTouch = Ex.GetMockedClient("notifications");
 }
コード例 #47
0
 public void TestSetup()
 {
     _inTouch = Ex.GetMockedClient("auth");
 }
コード例 #48
0
ファイル: AudioMethodsTests.cs プロジェクト: RomanGL/InTouch
 public void TestSetup()
 {
     _inTouch = Ex.GetMockedClient("audio");
 }
コード例 #49
0
ファイル: VideoMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="VideoMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal VideoMethods(InTouch api) : base(api, "video") { }
コード例 #50
0
ファイル: AudioMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="AudioMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal AudioMethods(InTouch api) : base(api, "audio") { }
コード例 #51
0
ファイル: GiftsMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="GiftsMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal GiftsMethods(InTouch api) : base(api, "gifts") { }
コード例 #52
0
ファイル: PlacesMethods.cs プロジェクト: RomanGL/InTouch
 /// <summary>
 /// Initializes a new instance of the <see cref="PlacesMethods"/> class with a given <see cref="InTouch"/> instance.
 /// </summary>
 /// <param name="api">An instance of <see cref="InTouch"/> class.</param>
 internal PlacesMethods(InTouch api) : base(api, "places") { }