Esempio n. 1
1
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);

             _toastService = Mvx.Resolve<IToastService> ();
             AnalyticsService = Mvx.Resolve<IAnalyticsService> ();

             _connectivityManager = (ConnectivityManager)GetSystemService (ConnectivityService);
        }
Esempio n. 2
0
 public MessagePublisher(IClientConnection clientConnection, IToastService toastService, ILogger <MessagePublisher> logger)
 {
     _clientConnection = clientConnection;
     _clientConnection.MessageReceived += MessageReceived;
     _toastService = toastService;
     _logger       = logger;
 }
Esempio n. 3
0
        public WebService(IJSRuntime jsRuntime, IToastService toastService)
        {
            _jsRuntime    = jsRuntime;
            _toastService = toastService;

            _thisRef = DotNetObjectReference.Create(this);
        }
Esempio n. 4
0
 public CreateBusinessAdminViewModel(IHttpClient client, IHttpExecutor httpExecutor, IModalService modalService, IToastService toastService)
 {
     _client       = client;
     _httpExecutor = httpExecutor;
     _modalService = modalService;
     _toastService = toastService;
 }
Esempio n. 5
0
 public NotificationsPage()
 {
     InitializeComponent();
     _toastService  = Injector.Get <IToastService>();
     _tileService   = Injector.Get <ITileService>();
     _dialogService = Injector.Get <IDialogService>();
 }
 static ToastHelper()
 {
     if (toast == null)
     {
         toast = DependencyService.Get <IToastService>();
     }
 }
Esempio n. 7
0
 public QueryNewOldViewModel(INavigationService navigationService, ICardService cardService, IToastService toastService, ISettingService settingService)
 {
     this.navigationService = navigationService;
     this.cardService       = cardService;
     this.toastService      = toastService;
     this.settingService    = settingService;
 }
Esempio n. 8
0
        public TransactionViewModel(IBlockchainTransaction tx, CurrencyConfig currencyConfig, decimal amount, decimal fee)
        {
            Transaction = tx ?? throw new ArgumentNullException(nameof(tx));
            Id          = Transaction.Id;
            Currency    = currencyConfig;
            State       = Transaction.State;
            Type        = GetType(Transaction.Type);
            //Type = Transaction.Type;
            Amount = amount;

            TxExplorerUri = $"{Currency.TxExplorerUri}{Id}";

            ToastService = DependencyService.Get <IToastService>();

            var netAmount = amount + fee;

            AmountFormat = currencyConfig.Format;
            CurrencyCode = currencyConfig.Name;
            Time         = tx.CreationTime ?? DateTime.UtcNow;
            CanBeRemoved = tx.State == BlockchainTransactionState.Failed ||
                           tx.State == BlockchainTransactionState.Pending ||
                           tx.State == BlockchainTransactionState.Unknown ||
                           tx.State == BlockchainTransactionState.Unconfirmed;

            Description = GetDescription(
                type: tx.Type,
                amount: Amount,
                netAmount: netAmount,
                amountDigits: currencyConfig.Digits,
                currencyCode: currencyConfig.Name);
        }
Esempio n. 9
0
 public EjectService(IVolumeContainer volumeContainer, IToastService toastService, ILoggerFactory loggerFactory)
 {
     Logger          = loggerFactory.CreateLogger <EjectService>();
     VolumeContainer = volumeContainer;
     ToastService    = toastService;
     LoggerFactory   = loggerFactory;
 }
 public void OnKick(IToastService toastService, IMoveModel move, String playerName)
 {
     if (NotifyOnKick)
     {
         toastService.ShowWarning("kicked '" + move.ThrownMeeple.Player.Name + "'.", playerName);
     }
 }
Esempio n. 11
0
 public AuthenticationService(EvaluateContext dbContext, ProtectedSessionStorage storage, IToastService toastService, NavigationManager navigation)
 {
     _db           = dbContext;
     _storage      = storage;
     _toastService = toastService;
     _navigation   = navigation;
 }
Esempio n. 12
0
 public GameAdmonViewModel(IToastService toastService, GamingComunication gamingComunication,
                           IConfiguration configuration)
 {
     this._toastService       = toastService;
     this._gamingComunication = gamingComunication;
     this._configuration      = configuration;
 }
Esempio n. 13
0
 public CategoriesViewModel(ICategoriesModel model, IToastService toastService, ILocalizationService localizationService)
 {
     _model               = model;
     _toastService        = toastService;
     _localizationService = localizationService;
     List = new ObservableCollection <CategoryListViewItemViewModel>();
 }
 public EightTracksMixTrackStream(Mix startMix, IToastService toastService)
 {
     _startMix = startMix;
     _toastService = toastService;
     _currentMix = startMix;
     Description = _currentMix.Name;
 }
Esempio n. 15
0
 public CompleteAdminViewModel(ILogger <CompleteAdminViewModel> logger, AccountService accountService, IToastService toastService, NavigationManager navigationService)
 {
     _toastService      = toastService;
     _navigationService = navigationService;
     _accountService    = accountService;
     _logger            = logger;
 }
 public ApiData(HttpClient httpClient, Themenschaedel.Web.Services.Interfaces.IUserSession userSession,
                IToastService toastService)
 {
     _httpClient   = httpClient;
     _userSession  = userSession;
     _toastService = toastService;
 }
Esempio n. 17
0
 public FixingService(LocalLoginService localLoginService, IToastService toastService, TextService textService, INavigationService navigationService)
 {
     _localLoginService = localLoginService;
     _toastService      = toastService;
     _textService       = textService;
     _navigationService = navigationService;
 }
Esempio n. 18
0
 public AccountsViewModel(IAccountsModel model, IToastService toastService, ILocalizationService localizationService)
 {
     _model               = model;
     _toastService        = toastService;
     _localizationService = localizationService;
     List = new ObservableCollection <AccountListViewItemViewModel>();
 }
Esempio n. 19
0
      protected override void OnCreate (Bundle bundle)
      {
         AppSettings.TrackingId = "UA-65892866-1";
         AppSettings.RegisterTypes ();

         Logger.Instance = new AndroidLogger ();
         Mvx.RegisterType<IToastService, ToastService> ();
         Mvx.RegisterType<IAnalyticsService, AnalyticsService> ();

         base.OnCreate (bundle);

         SetContentView (Resource.Layout.Main);

         _apiService = Mvx.Resolve<IApiService> ();
         _toastService = Mvx.Resolve<IToastService> ();
         _loginService = Mvx.Resolve<ILoginService> ();

         IsLoading = true;
         CheckUserExists ();

         Button button = FindViewById<Button> (Resource.Id.button_register);

         button.Click += ClickHandler;

         AppLocation.Current.LocationServiceConnected += (object sender, ServiceConnectedEventArgs e) => {
         };
         AppLocation.StartLocationService ();
      }
Esempio n. 20
0
 public ExampleAppender(Dexie dexie, MetaFactory metaFactory, IToastService toastService, Appender appender)
 {
     _dexie        = dexie;
     _metaFactory  = metaFactory;
     _toastService = toastService;
     _appender     = appender;
 }
Esempio n. 21
0
        protected override void OnCreate(Bundle bundle)
        {
            AppSettings.TrackingId = "UA-65892866-1";
            AppSettings.RegisterTypes();

            Logger.Instance = new AndroidLogger();
            Mvx.RegisterType <IToastService, ToastService> ();
            Mvx.RegisterType <IAnalyticsService, AnalyticsService> ();

            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);

            _apiService   = Mvx.Resolve <IApiService> ();
            _toastService = Mvx.Resolve <IToastService> ();
            _loginService = Mvx.Resolve <ILoginService> ();

            IsLoading = true;
            CheckUserExists();

            Button button = FindViewById <Button> (Resource.Id.button_register);

            button.Click += ClickHandler;

            AppLocation.Current.LocationServiceConnected += (object sender, ServiceConnectedEventArgs e) => {
            };
            AppLocation.StartLocationService();
        }
Esempio n. 22
0
 public EightTracksMixTrackStream(Mix startMix, IToastService toastService)
 {
     _startMix     = startMix;
     _toastService = toastService;
     _currentMix   = startMix;
     Description   = _currentMix.Name;
 }
Esempio n. 23
0
 public ConfigurationXml(IToastService toastService, ICanLoadAndSaveXml loadAndSave)
 {
     mToastService    = toastService ?? throw new ArgumentNullException(nameof(toastService));
     LoadAndSave      = loadAndSave ?? throw new ArgumentNullException(nameof(loadAndSave));
     mMutableChildren = new ObservableCollection <ModelBase>();
     Children         = new ReadOnlyObservableCollection <ModelBase>(mMutableChildren);
 }
        public SingleReportPurchaseViewModel(ValidationModel validation,
                                             Action <Uri> openUri,
                                             string runtimePlatform,
                                             AlertUtility alertUtility,
                                             MainThreadNavigator nav,
                                             IToastService toastService,
                                             IPurchasedReportService prService,
                                             IPurchasingService purchaseService,
                                             ICurrentUserService userCache,
                                             ICache <PurchasedReportModel> prCache,
                                             ILogger <SingleReportPurchaseViewModel> emailLogger)
        {
            _validation      = validation;
            _openUri         = openUri;
            _nav             = nav;
            _toastService    = toastService;
            _runtimePlatform = runtimePlatform;
            _userCache       = userCache;
            _purchaseService = purchaseService;
            _prService       = prService;
            _prCache         = prCache;
            _emailLogger     = emailLogger;
            _alertUtility    = alertUtility;

            SetViewState(validation);
        }
Esempio n. 25
0
 public CreateAdminViewModel(AccountService accountService, IToastService toastService, NavigationManager navigationManager)
 {
     _navigationManager = navigationManager;
     _toastService      = toastService;
     _accountService    = accountService;
     Error = string.Empty;
 }
Esempio n. 26
0
        public ControlsViewModel(
            IRadio radio,
            [Import("CorePlayer")] ITrackPlayer player,
            Dispatcher dispatcher,
            IToastService toastService,
            ILoggerFacade logger)
        {
            _radio = radio;
            _radio.CurrentTrackChanged       += RadioOnCurrentTrackChanged;
            _radio.UpcomingTrackChanged      += RadioOnUpcomingTrackChanged;
            _radio.CurrentTrackStreamChanged += RadioOnCurrentTrackStreamChanged;
            _radio.TrackStreamQueued         += RadioOnTrackStreamQueued;
            _player                   = player;
            _dispatcher               = dispatcher;
            _toastService             = toastService;
            _logger                   = logger;
            _player.IsPlayingChanged += (sender, args) =>
            {
                RaisePropertyChanged("IsPlaying");
                RefreshCommands();
            };

            NextTrackCommand       = new ManualCommand(ExecuteNextTrack, CanExecuteNextTrack);
            TogglePlayPauseCommand = new ManualCommand(ExecuteTogglePlayPause, CanExecuteTogglePlayPause);
            ShareTrackCommand      = new ManualCommand <Track>(ExecuteShareTrack, CanExecuteShareTrack);
        }
Esempio n. 27
0
        public DialogPage(IDialogService dialogService, IToastService toastService)
        {
            this.dialogService = dialogService;
            this.toastService  = toastService;

            InitializeComponent();
        }
Esempio n. 28
0
 public PurchaseViewModel(IToastService toastService,
                          IPurchasingService purchaseService,
                          ICache <SubscriptionModel> subCache,
                          ISubscriptionService subService,
                          ICurrentUserService userCache,
                          MainThreadNavigator nav,
                          ValidationModel validationModel,
                          string runtimePlatform,
                          Action <BaseNavPageType> navigateFromMenu,
                          AlertUtility alertUtility,
                          Action <Uri> openUri)
 {
     _toastService         = toastService;
     _purchaseService      = purchaseService;
     _subCache             = subCache;
     _subService           = subService;
     _userCache            = userCache;
     _validationModel      = validationModel;
     _runtimePlatform      = runtimePlatform;
     _openUri              = openUri;
     _alertUtility         = alertUtility;
     _nav                  = nav;
     _navigateFromMenu     = navigateFromMenu;
     LegalLinkCommand      = new Command(() => _openUri(new Uri(Configuration.PrivacyPolicyUrl)));
     PurchaseButtonCommand = new Command(() => PurchaseButtonClicked());
     SetVisualState(validationModel);
 }
Esempio n. 29
0
 public PackagePageViewModel(IPackageService packageService, ICardService cardService, INavigationService navigationService, IToastService toastService)
 {
     this.packageService    = packageService;
     this.cardService       = cardService;
     this.navigationService = navigationService;
     this.toastService      = toastService;
 }
Esempio n. 30
0
 public UserAppender(Dexie dexie, MetaFactory metaFactory, IToastService toastService, Appender appender, UserProvider userProvider)
 {
     _dexie        = dexie;
     _metaFactory  = metaFactory;
     _toastService = toastService;
     _appender     = appender;
     _userProvider = userProvider;
 }
Esempio n. 31
0
        public SimpleBackgroundTask()
        {
            var injector = Injector.Instance;

            injector.Init(new DefaultModule());

            _toastService = injector.Get <IToastService>();
        }
Esempio n. 32
0
 public AdminAccountService(ILogger <AdminAccountService> logger, IHttpClient client, IToastService toastService, IHttpExecutor executor, Endpoints endpoints)
 {
     _logger         = logger;
     _client         = client;
     _toastService   = toastService;
     _executor       = executor;
     this._endpoints = endpoints;
 }
Esempio n. 33
0
 public CreateBusinessViewModel(ILogger <CreateBusinessViewModel> logger, BusinessService businessService, IToastService toastService, IOperationsManager operationManager, NavigationManager navigationManager)
 {
     _logger            = logger;
     _businessService   = businessService;
     _toastService      = toastService;
     _operationManager  = operationManager;
     _navigationManager = navigationManager;
 }
 public StyleTrackStream(
     StaticArgument argument,
     IRadio radio,
     IToastService toastService)
 {
     _argument = argument;
     _radio = radio;
     _toastService = toastService;
 }
        public MainStationViewModel(
            ILoadingIndicatorService loadingIndicatorService,
            IRadio radio,
            IToastService toastService,
            ILoggerFacade logger,
            IDocumentStore documentStore)
        {
            _loadingIndicatorService = loadingIndicatorService;
            _radio = radio;
            _toastService = toastService;
            _logger = logger;
            _documentStore = documentStore;
            _fetchPreviewTimer = new Timer(1000);
            _fetchPreviewTimer.Elapsed += FetchPreviewTimerTick;
            _scheduler = TaskScheduler.FromCurrentSynchronizationContext();
            _styles = new ObservableCollection<TermModel>();
            _moods = new ObservableCollection<TermModel>();
            _selectedMoods = new ObservableCollection<TermModel>();
            _selectedMoods.CollectionChanged += (sender, args) =>
            {
                RaisePropertyChanged("SelectedMoodsText");
                _fetchPreviewTimer.Stop();
                _fetchPreviewTimer.Start();
            };

            _selectedStyles = new ObservableCollection<TermModel>();
            _selectedStyles.CollectionChanged += (sender, args) =>
            {
                RaisePropertyChanged("SelectedStylesText");
                _fetchPreviewTimer.Stop();
                _fetchPreviewTimer.Start();
            };

            ToggleStyleCommand = new StaticCommand<TermModel>(ExecuteToggleStyle);
            ToggleMoodCommand = new StaticCommand<TermModel>(ExecuteToggleMood);
            StartRadioCommand = new AutomaticCommand(ExecuteStartRadio, CanExecuteStartRadio);
            IncreaseBoostCommand = new StaticCommand<TermModel>(ExecuteIncreaseBoost);
            DecreaseBoostCommand = new StaticCommand<TermModel>(ExecuteDecreaseBoost);
            RequireTermCommand = new StaticCommand<TermModel>(ExecuteRequireTerm);
            BanTermCommand = new StaticCommand<TermModel>(ExecuteBanTerm);
            Tempo = new Range();
            Tempo.Rounding = MidpointRounding.ToEven;
            Tempo.RangeChanged += MetricChanged;
            Loudness = new Range();
            Loudness.RangeChanged += MetricChanged;
            Energy = new Range();
            Energy.RangeChanged += MetricChanged;
            ArtistFamiliarity = new Range();
            ArtistFamiliarity.RangeChanged += MetricChanged;
            ArtistHotness = new Range();
            ArtistHotness.RangeChanged += MetricChanged;
            SongHotness = new Range();
            SongHotness.RangeChanged += MetricChanged;
            Danceability = new Range();
            Danceability.RangeChanged += MetricChanged;
        }
        public HotArtistsViewModel(
            IRadio radio,
            IToastService toastService,
            ILoadingIndicatorService loadingIndicator,
            ILoggerFacade logger,
            Dispatcher dispatcher)
        {
            _radio = radio;
            _toastService = toastService;
            _loadingIndicator = loadingIndicator;
            _logger = logger;
            _dispatcher = dispatcher;
            _artists = new ObservableCollection<HotArtistModel>();

            PlayAllTracksCommand = new DelegateCommand(ExecutePlayAllTracks);
            PlayTopTrackCommand = new DelegateCommand<HotArtistModel>(ExecutePlayTopTrack);
            QueueTopTrackCommand = new DelegateCommand<HotArtistModel>(ExecuteQueueTopTrack);
        }
 public CoreRadio(
     [Import("CorePlayer")]ITrackPlayer corePlayer,
     IDocumentStore documentStore,
     ILoadingIndicatorService loadingIndicatorService,
     IToastService toastService,
     ILoggerFacade logger,
     Dispatcher dispatcher)
 {
     _trackQueuePublic = new ObservableCollection<Track>();
     _trackStreamQueuePublic = new ObservableCollection<ITrackStream>();
     _trackStreamQueue = new ConcurrentQueue<ITrackStream>();
     _trackQueue = new ConcurrentQueue<Track>();
     _corePlayer = corePlayer;
     _documentStore = documentStore;
     _loadingIndicatorService = loadingIndicatorService;
     _toastService = toastService;
     _logger = logger;
     _dispatcher = dispatcher;
     _corePlayer.Volume = 0.2;
     _corePlayer.TrackComplete += OnTrackComplete;
     _corePlayer.Initialize();
 }
 public AddBillViewModel(INavigationService navigationService, DataService dataService, IToastService toastService)
 {
     _navigationService = navigationService;
     _dataService = dataService;
     _toastService = toastService;
     _resourceLoader = new ResourceLoader();
 }
        public DetailBillViewModel(INavigationService navigationService, DataService dataService, IToastService toastService)
        {
            _dataService = dataService;
            _toastService = toastService;
            _navigationService = navigationService;
            _resourceLoader = new ResourceLoader();

            Messenger.Default.Register<BillModel>(this, model =>
            {
                if (model == null) return;
                _accountModel = model;
                BillType = model.BillType;
                Name = model.Name;
                DateTime = model.DateTime;
                Note = model.Note;
                Money = model.Money;
                Category = model.Category / 10000 == 1 ? _resourceLoader.GetString("Expanse") : _resourceLoader.GetString("Income");
                Category += (model.Category / 100) % 100 != 0
                    ? "-" + CateGoryItems.FirstOrDefault(a => a.BillType == model.BillType && a.Id == (model.Category % 10000) / 100)
                    .Name : "";
            });
        }