public override bool OnInitializeView(params object[] datas) { VIPMatchesTaskLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <FootballVIPMatchInfo> >(); MessagingCenter.Subscribe <SettingsViewModel, CoverageLanguage>(this, AppConfig.CULTURE_CHANGED_MSG, OnCultureChanged); return(true); }
public ActivityPageViewModel(INavigationService navigationService, ITcxActivityService activityService) : base(navigationService) { _activityService = activityService; Loader = new TaskLoaderNotifier <SessionMapInfo>(/*emptyStateMessage: AppResources.EmptyActivityMessage*/); }
public TaskLoaderView() { InitializeComponent(); Initialize(); StartTaskCommand = new Command( () => { if (TaskLoaderNotifier == null) { Trace.WriteLine( "StartTaskCommand was called but the TaskSource AND the TaskLoaderNotifier property are null"); return; } TaskLoaderNotifier.Load(); }); ResetCommand = new Command( () => { foreach (var child in Container.Children) { child.IsVisible = _notStartedView == child; } TaskLoaderNotifier?.Reset(); }); }
/// <summary> /// Initializes a new instance of the <see cref="SillyDudeVm"/> class. /// </summary> /// <param name="navigationService"> /// The navigation service. /// </param> /// <param name="sillyDudeService"> /// The silly front service. /// </param> public SillyDudeVm(INavigationService navigationService, ISillyDudeService sillyDudeService) : base(navigationService) { _dudeService = sillyDudeService; SillyDudeLoaderNotifier = new TaskLoaderNotifier <SillyDudeVmo>(); }
public override bool OnInitializeView(params object[] datas) { PredictionsTaskLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <FootballPredictionInfo> >(); _isSetRewardEvent = false; AdsPlayed = false; return(true); }
/// <summary> /// Initializes a new instance of the <see cref="DetailledRideViewModel" /> class. /// </summary> /// <param name="logFactory">The log provider.</param> /// <param name="navigationService">The navigation service.</param> public DetailledRideViewModel(ILoggerFactory logFactory, IMvxNavigationService navigationService, ITcxActivityService tcxactivityService) : base(logFactory, navigationService) { DeleteRideCommand = new MvxAsyncCommand(DeleteRide); CloseSiteCommand = new MvxAsyncCommand(() => this.NavigationService.Close(this)); Loader = new TaskLoaderNotifier <SessionMap>(); _tcxActivityService = tcxactivityService; }
public override bool OnInitializeView(params object[] datas) { Ddl_selectedIndex = -1; TaskLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <FootballStandingsInfo> >(); return(true); }
public HomePageViewModel(INavigationService navigationService, ISillyDudeService sillyDudeService) : base(navigationService) { _sillyDudeService = sillyDudeService; InitCommands(); SillyDudeLoaderNotifier = new TaskLoaderNotifier <SillyDudeVmo>(); }
public override bool OnInitializeView(params object[] datas) { MatchesTaskLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <FootballMatchInfo> >(); _alarmEditMode = false; return(true); }
public SearchViewModel(IMvxNavigationService navigationService) { Games = new ObservableCollection <Game>(); SearchCommand = new Command(Search); GameTapped = new MvxAsyncCommand <Game>(OnItemSelected); _navigationService = navigationService; Loader = new TaskLoaderNotifier <List <Game> >(); }
private void OnTaskStartModeSet() { if (TaskStartMode == TaskStartMode.Manual) { return; } TaskLoaderNotifier?.Load(); }
public ActivityHeaderPageViewModel(INavigationService navigationService, ITcxActivityService activityService) : base(navigationService) { _activityService = activityService; Loader = new TaskLoaderNotifier <List <ActivityHeaderViewModel> >(/*emptyStateMessage: AppResources.EmptyActivityMessage*/); ActivityTappedCommand = new Command <ActivityHeaderViewModel>( item => NavigationService.NavigateAsync($"ActivityPage?activityId={item.Id}")); }
public SessionsViewModel(IMvxNavigationService navigationService) { PlayTapped = new Command <Play>(OnItemSelected); AddPlayCommand = new MvxAsyncCommand(AddPlay); _navigationService = navigationService; Loader = new TaskLoaderNotifier <IEnumerable <SessionGroup> >(); Loader.RefreshCommand = Loader.ReloadCommand = new MvxAsyncCommand(Load); }
public SillyPeopleVm(INavigationService navigationService, ISillyDudeService sillyDudeService, ErrorEmulator errorEmulator) : base(navigationService) { _sillyDudeService = sillyDudeService; InitCommands(); ErrorEmulator = new ErrorEmulatorVm(errorEmulator, () => SillyPeopleLoaderNotifier.Load(LoadSillyPeopleAsync)); SillyPeopleLoaderNotifier = new TaskLoaderNotifier <ObservableCollection <SillyDudeVmo> >(); }
public RouteTabViewModel(ILoggerFactory logFactory, IMvxNavigationService navigationService, IDbActivityService dbactivityService, ITcxActivityService tcxActivityService) : base(logFactory, navigationService) { _dbactivityService = dbactivityService; _tcxActivityService = tcxActivityService; Loader = new TaskLoaderNotifier <List <ActivityHeaderModel> >(); ActivityTappedCommand = new MvxCommand <ActivityHeaderModel>(item => NavigationService.Navigate <DetailledRouteViewModel>(item.Id)); }
public BrowseViewModel(IMvxNavigationService navigationService) { Games = new ObservableCollection <Game>(); GameTapped = new MvxAsyncCommand <Game>((g) => OnItemSelected(g)); LoadItemsCommand = new Command(() => LoaderLoad(true)); _navigationService = navigationService; Loader = new TaskLoaderNotifier <List <Game> >(); }
public override bool OnInitializeView(params object[] datas) { BookmarkedTeamsTaskLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <FootballTeamInfo> >(); string message = _bookmarkService.BuildBookmarkMessage(SportsType.Football, PageDetailType.Team); MessagingCenter.Subscribe <BookmarkService, FootballTeamInfo>(this, message, (s, e) => BookmarkMessageHandler(e)); return(true); }
public GridPageViewModel(INavigationService navigationService, ISillyDudeService sillyDudeService) : base(navigationService) { _sillyDudeService = sillyDudeService; InitCommands(); SillyPeople = new ObservableRangeCollection <SillyDudeVmo>(); SillyPeoplePaginator = new Paginator <SillyDude>(LoadSillyPeoplePageAsync, pageSize: PageSize); SillyPeopleLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <SillyDude> >(); }
public override bool OnInitializeView(params object[] datas) { BookmarkedMatchesTaskLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <FootballMatchInfo> >(); string message = _bookmarkService.BuildBookmarkMessage(SportsType.Football, PageDetailType.Match); MessagingCenter.Subscribe <BookmarkService, FootballMatchInfo>(this, message, (s, e) => BookmarkMessageHandler(e)); MessagingCenter.Subscribe <SettingsViewModel, CoverageLanguage>(this, AppConfig.CULTURE_CHANGED_MSG, OnCultureChanged); return(true); }
public SillyInfinitePeopleVm(INavigationService navigationService, ISillyDudeService sillyDudeService, ErrorEmulator errorEmulator) : base(navigationService) { _sillyDudeService = sillyDudeService; InitCommands(); ErrorEmulator = new ErrorEmulatorVm(errorEmulator, Load); SillyPeople = new ObservableRangeCollection <SillyDudeVmo>(); SillyPeoplePaginator = new Paginator <SillyDude>(LoadSillyPeoplePageAsync, pageSize: PageSize, loadingThreshold: 0.1f); SillyPeopleLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <SillyDude> >(); }
public HeaderFooterGroupingPageViewModel(INavigationService navigationService, ISillyDudeService sillyDudeService) : base(navigationService) { _sillyDudeService = sillyDudeService; InitCommands(); SillyPeople = new List <IDudeItem>(); SillyPeoplePaginator = new Paginator <SillyDude>(LoadSillyPeoplePageAsync, pageSize: PageSize); SillyPeopleLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <SillyDude> >(); GoBackCommand = new TaskLoaderCommand(() => NavigationService.NavigateBackAsync()); }
public RetroGamesViewModel(INavigationService navigationService, IRetroGamingService retroGamingService, ErrorEmulator errorEmulator) : base(navigationService) { _retroGamingService = retroGamingService; ErrorEmulatorViewModel = new ErrorEmulatorViewModel(errorEmulator, () => Loader.Load(InitializeAsync)); // TaskStartMode = Auto // Loader = new TaskLoaderNotifier<List<Game>>(InitializeAsync); // TaskStartMode = Manual (Default mode) Loader = new TaskLoaderNotifier <List <Game> >(); }
/// <summary> /// Initializes a new instance of the <see cref="RouteViewModel" /> class. /// </summary> /// <param name="logFactory">The log provider.</param> /// <param name="navigationService">The navigation service.</param> public RouteViewModel(ILoggerFactory logFactory, IMvxNavigationService navigationService, IRideService rideService, ILocationService locationService, IMvxMessenger messenger) : base(logFactory, navigationService) { this._rideService = rideService; this._locationService = locationService; this._messenger = messenger; this._token = messenger.Subscribe <MvxLocationMessage>(this.OnLocationUpdated); this._token = messenger.Subscribe <MvxTabIndexMessenger>(this.OnTabIndexUpdated); stopwatch = new Stopwatch(); stopwatch.Reset(); Loader = new TaskLoaderNotifier <SessionMap>(); }
public CommandsPageViewModel(INavigationService navigationService, IRetroGamingService retroGamingService) : base(navigationService) { _retroGamingService = retroGamingService; Loader = new TaskLoaderNotifier <Game>(); BuyGameCommand = new TaskLoaderCommand(BuyGame); PlayTheGameCommand = new TaskLoaderCommand(PlayTheGame); CompositeNotifier = new CompositeTaskLoaderNotifier( BuyGameCommand.Notifier, PlayTheGameCommand.Notifier); }
public LoginViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; Random rand = new Random(); int index = rand.Next(welcomes.Length); Welcome = welcomes[index]; Loader = new TaskLoaderNotifier(TimeSpan.FromSeconds(3), _ => AttemptLogin()) { ShowEmptyState = true }; LoginCommand = new Command(Login); }
public HomeViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; Search = new MvxAsyncCommand(SearchAction); GameTappedCommand = new MvxAsyncCommand <Game>(OnItemSelected); Categories = new MvxObservableCollection <CategoryVMO>( Enum.GetValues(typeof(Category)) .Cast <Category>() .Select(s => new CategoryVMO { Name = s.ToString(), Value = s }) .ToList()); ChipTappedCommand = new Command <CategoryVMO>(ChipClicked); Loader = new TaskLoaderNotifier <List <Game> >(); Loader.RefreshCommand = Loader.ReloadCommand = new MvxAsyncCommand(Load); }
private void CreateFromTaskSource() { if (TaskSource == null) { return; } var taskSourceType = TaskSource.GetType(); var taskType = taskSourceType.GenericTypeArguments[0]; if (taskType.IsGenericType) { var taskResultType = taskType.GenericTypeArguments[0]; var taskLoaderNotifierType = typeof(TaskLoaderNotifier <>).MakeGenericType(taskResultType); TaskLoaderNotifier = (ITaskLoaderNotifier)Activator.CreateInstance(taskLoaderNotifierType, TaskSource); return; } TaskLoaderNotifier = new TaskLoaderNotifier(TaskSource); }
public GridPageViewModel(INavigationService navigationService, ISillyDudeService sillyDudeService) : base(navigationService) { _sillyDudeService = sillyDudeService; _navigationService = navigationService; InitCommands(); OnDragAndDropEndCommand = new Command(PosChanged); //CreateDudeCommand = new Command(CreateDude); DeleteDudeCommand = new Command(DeleteDude); SaveDudeCommand = new Command(SaveDude); BackCommand = new Command(Back); BackSaveCommand = new Command(BackSave); SillyPeople = new ObservableRangeCollection <SillyDudeVmo>(); SillyPeoplePaginator = new Paginator <SillyDude>(LoadSillyPeoplePageAsync, pageSize: PageSize); SillyPeopleLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <SillyDude> >(); }
public override bool OnInitializeView(params object[] datas) { BookmarkSearchTaskLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <ISQLiteStorable> >(); return(true); }
public override bool OnInitializeView(params object[] datas) { H2HTaskLoaderNotifier = new TaskLoaderNotifier <IReadOnlyCollection <FootballMatchInfo> >(); return(true); }