Beispiel #1
0
        public TransferViewModel(
            IDownloadsService downloadsService,
            IUploadsService uploadsService,
            IDialogsService dialogsService,
            IAppLoaderService appLoaderService,
            ILocService locService,
            IDispatcherWrapper dispatcherWrapper)
        {
            _downloadsService  = downloadsService;
            _uploadsService    = uploadsService;
            _dialogsService    = dialogsService;
            _appLoaderService  = appLoaderService;
            _locService        = locService;
            _dispatcherWrapper = dispatcherWrapper;

            Downloads = new ObservableCollection <TransferItemViewModel>();
            Uploads   = new ObservableCollection <TransferItemViewModel>();

            ShowInfoCommand           = new DelegateCommand <TransferItemViewModel>(OnShowInfoCommand);
            CancelDownloadCommand     = new DelegateCommand <TransferItemViewModel>(OnCancelDownloadCommand);
            CancelUploadCommand       = new DelegateCommand <TransferItemViewModel>(OnCancelUploadCommand);
            PauseDownloadCommand      = new DelegateCommand <TransferItemViewModel>(OnPauseResumeDownloadCommand);
            ResumeDownloadCommand     = new DelegateCommand <TransferItemViewModel>(OnPauseResumeDownloadCommand);
            CancelAllDownloadsCommand = new DelegateCommand(OnCancelAllDownloadsCommand, CanExecuteCancelAllDownloadsCommand);
            CancelAllUploadsCommand   = new DelegateCommand(OnCancelAllUploadsCommand, CanExecuteCancelAllUploadsCommand);
        }
        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);
        }
 public DialogsViewModel(IDialogsService dialogsService, INavigationService navigationService)
     : base(navigationService)
 {
     Title = "Dialogs";
     this.dialogsService = dialogsService;
     InitializeEntries();
 }
        public PhotoViewerViewModel(
            IDialogsService dialogsService)
        {
            _dialogsService = dialogsService;

            OpenCommand = new AsyncCommand(OpenAsync);
        }
Beispiel #5
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();
        }
Beispiel #6
0
        public MainForm(IDialogsService dialogsService)
        {
            this.dialogsService = dialogsService;

            InitializeComponent();
            InitializeClientData();
        }
Beispiel #7
0
        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);
        }
Beispiel #8
0
        public PurchaseViewModel(IPurchaseService purchaseService, INavigationService navigationService,
                                 IDialogsService dialogsService, ILocService locService)
        {
            _purchaseService   = purchaseService;
            _navigationService = navigationService;
            _dialogsService    = dialogsService;
            _locService        = locService;

            _screenItems = new ScreenItem[]
            {
                new ScreenItem(_locService["PurchaseView_Screen1_Line1_Text"],
                               _locService["PurchaseView_Screen1_Line2_Text"], 1),
                new ScreenItem(_locService["PurchaseView_Screen2_Line1_Text"],
                               _locService["PurchaseView_Screen2_Line2_Text"], 2),
                new ScreenItem(_locService["PurchaseView_Screen3_Line1_Text"],
                               _locService["PurchaseView_Screen3_Line2_Text"], 3),
                new ScreenItem(_locService["PurchaseView_Screen4_Line1_Text"],
                               _locService["PurchaseView_Screen4_Line2_Text"], 4),
                new ScreenItem(_locService["PurchaseView_Screen5_Line1_Text"],
                               _locService["PurchaseView_Screen5_Line2_Text"], 5),
                new ScreenItem(_locService["PurchaseView_Screen0_Line1_Text"],
                               _locService["PurchaseView_Screen0_Line2_Text"], 0, true)
                {
                    BuyPermanentCommand = new DelegateCommand(OnBuyPermanentCommand),
                    BuyMonthlyCommand   = new DelegateCommand(OnBuyMonthlyCommand)
                }
            };
        }
 public ChatMessageViewModel(
     IFormatService formatService,
     IDialogsService dialogsService)
 {
     _formatService  = formatService;
     _dialogsService = dialogsService;
 }
Beispiel #10
0
        public AccelerometerViewModel(IDialogsService dialogsService, INavigationService navigationService)
            : base(navigationService)
        {
            Title = "Accelerometer";

            this.dialogsService = dialogsService;
            SetReading(null);
        }
 public ControlPanelViewModel(ISystemService systemService, IMessagesAggregator messagesAggregator,
                              IShellDialogsService shellDialogsService, IDialogsService dialogsService)
 {
     this.systemService       = systemService;
     this.shellDialogsService = shellDialogsService;
     this.dialogsService      = dialogsService;
     this.messagesAggregator  = messagesAggregator;
 }
Beispiel #12
0
 public ExamplesViewModel(IGeneratorService generatorService, IDialogsService dialogsService,
                          IAppWindowsService appWindowsService, IAppSettingsService appSettingsService)
 {
     this.dialogsService     = dialogsService;
     this.generatorService   = generatorService;
     this.appWindowsService  = appWindowsService;
     this.appSettingsService = appSettingsService;
 }
        public SettingsViewModel(INavigationService navigationService, IDialogsService dialogsService, IAppSettings appSettings)
            : base(navigationService)
        {
            this.dialogsService = dialogsService;
            this.appSettings    = appSettings;

            LoadSettings();
        }
Beispiel #14
0
        public PermissionsViewModel(IDialogsService dialogsService, IPermsService permissionsService, INavigationService navigationService)
            : base(navigationService)
        {
            Title = "Permissions";

            this.permissionsService = permissionsService;
            this.dialogsService     = dialogsService;
            InitializePermissions();
        }
Beispiel #15
0
 public BaseViewModel()
 {
     this.LoggingService      = Locator.Resolve <ILoggingService>();
     this.DialogsService      = Locator.Resolve <IDialogsService>();
     this.ConnectivityService = Locator.Resolve <IConnectivityService>();
     this.NavigationService   = Locator.Resolve <INavigationService>();
     this.SessionService      = Locator.Resolve <ISessionService>();
     this.TaskHelperFactory   = new TaskHelperFactory(DialogsService, ConnectivityService);
 }
        public NewPlacePageViewModel(INavigationService navigationService, IDialogsService dialogsService, IApiService apiService) : base(navigationService)
        {
            _dialogsService = dialogsService;
            _apiService     = apiService;

            CreateCommand            = new DelegateCommand(async() => await Create());
            Items                    = new ObservableCollection <ILocationViewModel>();
            Items.CollectionChanged += Items_CollectionChanged;
        }
        public ModalPageViewModel(IDialogsService dialogsService)
        {
            _dialogsService = dialogsService;

            OpenDialogCommand = new AsyncCommand(OpenDialogAsync);
            SaveCommand       = new RelayCommand(() =>
            {
                DialogComponent.CloseCommand.Execute(new ModalPageDialogResult(Text));
            });
        }
        public LocalStorageViewModel(IDialogsService dialogsService, IDataAccessService dataAccessService, INavigationService navigationService)
            : base(navigationService)
        {
            Title = "Local storage";

            this.dialogsService    = dialogsService;
            this.dataAccessService = dataAccessService;

            UpdateUsers();
        }
        /// <summary>
        ///     Creates a <see cref="DialogFluentNavigator{TViewModel}"/>
        ///     from the specified <see cref="IDialogsService"/>.
        /// </summary>
        /// <typeparam name="T">Type of ViewModel.</typeparam>
        /// <param name="dialogsService">Instance of <see cref="IDialogsService"/>.</param>
        /// <returns>
        ///     Instance of <see cref="DialogFluentNavigator{TViewModel}"/>
        ///     created from the specified <see cref="IDialogsService"/>.
        /// </returns>
        /// <exception cref="T:System.ArgumentNullException">
        ///     <paramref name="dialogsService"/> cannot be <see langword="null"/>.
        /// </exception>
        public static DialogFluentNavigator <T> For <T>(this IDialogsService dialogsService)
            where T : class, IDialogViewModel
        {
            if (dialogsService == null)
            {
                throw new ArgumentNullException(nameof(dialogsService));
            }

            return(new DialogFluentNavigator <T>(dialogsService));
        }
Beispiel #20
0
        public MainWindowViewModel(IDialogsService dialogsService, IAppSettings appSettings,
                                   IWindowsService windowsService, ISystemService systemService)
        {
            this.dialogsService = dialogsService;
            this.appSettings    = appSettings;
            this.windowsService = windowsService;
            this.systemService  = systemService;

            XsdExePath = appSettings.XsdExePath;
        }
        public DialogsRootPageViewModel(
            IDialogsService dialogsService)
        {
            _dialogsService = dialogsService;

            ShowModalScreenCommand            = new AsyncCommand(ShowModalScreenAsync);
            ShowModalScreenWithoutWaitCommand = new AsyncCommand(ShowModalScreenWithoutWait);
            AlertCommand = new AsyncCommand(AlertAsync);
            AlertWithTwoButtonsCommand = new AsyncCommand(AlertWithTwoButtonsAsync);
        }
        public SettingsViewModel(IAppSettings appSettings, IDialogsService dialogsService, INavigationService navigationService)
            : base(navigationService)
        {
            Title = "Settings";

            this.appSettings    = appSettings;
            this.dialogsService = dialogsService;

            CurrentValue = appSettings.Value;
        }
Beispiel #23
0
 public UploadsPreprocessor(
     InTouch inTouch,
     IInTouchWrapper inTouchWrapper,
     ILocService locService,
     IDialogsService dialogsService)
 {
     _inTouch        = inTouch;
     _inTouchWrapper = inTouchWrapper;
     _locService     = locService;
     _dialogsService = dialogsService;
 }
Beispiel #24
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);
        }
Beispiel #25
0
 public DownloadsServiceHelper(
     IDialogsService dialogsService,
     IDownloadsService downloadsService,
     ILocService locService,
     IAppNotificationsService appNotificationsService)
 {
     _dialogsService          = dialogsService;
     _downloadsService        = downloadsService;
     _locService              = locService;
     _appNotificationsService = appNotificationsService;
 }
Beispiel #26
0
 public FeedbackService(
     ISettingsService settingsService,
     IDialogsService dialogsService,
     IDispatcherWrapper dispatcherWrapper,
     ILocService locService)
 {
     _settingsService   = settingsService;
     _dialogsService    = dialogsService;
     _dispatcherWrapper = dispatcherWrapper;
     _locService        = locService;
 }
        public MainViewModel(IAppCore appCore, ILazyProxyClient lazyProxyClient, INavigationService navigationService,
                             IDialogsService dialogsService, IAppSettings appSettings)
            : base(navigationService)
        {
            this.appCore         = appCore;
            this.dialogsService  = dialogsService;
            this.lazyProxyClient = lazyProxyClient;
            this.appSettings     = appSettings;

            SetDisconnectedStatus();
        }
Beispiel #28
0
 public UploadsServiceHelper(
     IUploadsPreprocessor uploadsPreprocessor,
     IUploadsService uploadsService,
     ILocService locService,
     IDialogsService dialogsService)
 {
     _uploadsPreprocessor = uploadsPreprocessor;
     _uploadsService      = uploadsService;
     _locService          = locService;
     _dialogsService      = dialogsService;
 }
Beispiel #29
0
        public VideoPlayerViewModel(INavigationService navigationService, ILocService locService,
                                    IDialogsService dialogsService, IAppLoaderService appLoaderService)
        {
            _navigationService = navigationService;
            _locService        = locService;
            _dialogsService    = dialogsService;
            _appLoaderService  = appLoaderService;

            MediaOpenedCommand = new DelegateCommand(OnMediaOpenedCommand);
            MediaEndedCommand  = new DelegateCommand(OnMediaEndedCommand);
            MediaFailedCommand = new DelegateCommand(OnMediaFailedCommand);
        }
        public MainPageViewModel(INavigationService navigationService, IDialogsService dialogsService, IApiService apiService)
            : base(navigationService)
        {
            Title = AppResources.ApplicationName;

            _dialogsService = dialogsService;
            _apiService     = apiService;

            SelectPlaceCommand = new DelegateCommand <PlaceModel>
                                     (async(selectedPlace) => await SelectPlace(selectedPlace));
            NavigateCommand = new DelegateCommand <string>
                                  (async(pageKey) => await Navigate(pageKey));
        }