//using at end of trening public MapResultPage(List <Plugin.Geolocator.Abstractions.Position> newTrening, MapPreparedData newTreningData, object mapPolyline) { InitializeComponent(); resultRoad = new List <Plugin.Geolocator.Abstractions.Position>(newTrening); resultData = new MapPreparedData(newTreningData); workoutManager = DBConnection.MainConnection.WorkoutItem; mapManager = DBConnection.MainConnection.MapPoint; sendMapPointList = new List <MapPointItem>(); //ToLocalTime switch (Device.RuntimePlatform) { case Device.iOS: break; case Device.Android: this.Title = "Add"; break; case Device.UWP: break; } ResultMap.DrawRoadAtStart(mapPolyline); }
private DBConnection() { Client = new MobileServiceClient(Constants.ApplicationURL); const string offlineDbPath = @"localstore.db"; var store = new MobileServiceSQLiteStore(offlineDbPath); store.DefineTable <WorkoutItem>(); store.DefineTable <UserItem>(); store.DefineTable <MapPointItem>(); //Initializes the SyncContext using the default IMobileServiceSyncHandler.This class executes the async calls to synchronize the database Client.SyncContext.InitializeAsync(store, new MobileServiceSyncHandler()); WorkoutItem = new WorkoutItemManager(Client); MapPoint = new MapPointManager(Client); UserItem = new UserItemManager(Client); UserLogin = DependencyService.Get <ILoginSupplier>(); }
public WorkoutListPage() { InitializeComponent(); managerWorkout = DBConnection.MainConnection.WorkoutItem; managerMapPoints = DBConnection.MainConnection.MapPoint; StackLUWP.IsVisible = false; switch (Device.RuntimePlatform) { case Device.UWP: //Windows: StackLUWP.IsVisible = true; var syncButton = new Button { Text = "Items synchronization", HeightRequest = 30 }; syncButton.Clicked += OnRefreshButtonUWP; buttonsPanel.Children.Add(syncButton); break; } }