private async void LoadLastDataModel() { var _fileWorker = DependencyService.Get <IFileWorker>(); var _jsonKeeper = new JsonDataKeeper <DeviceDataViewModel>(); var files = _fileWorker.GetFilesAsync().Result.ToArray(); if (files.Length == 0) { _lastData = new DeviceDataViewModel(); } else { _jsonKeeper.Filename = files[files.Length - 1]; _lastData = await _jsonKeeper.Browse(); } }
public PulsationAnalyzePage() { InitializeComponent(); Bluetooth = DependencyService.Get <Bluetooth>(); #if DEBUG _impulseInvoker = new MockImpulseInvoker(); #endif _vm = new DeviceDataViewModel(); _ddp = DeviceDataProvider.GetProvider; _timer = new StoppableTimer(TimeSpan.FromMilliseconds(Constants.UPDATE_INTERVAL), TimerTick); FirstChanelSeries.ItemsSource = _vm.FirstChanelSeriesData; SecondChanelSeries.ItemsSource = _vm.SecondChanelSeriesData; _jsonKeeper = new JsonDataKeeper <DeviceDataViewModel>(); }
public ArchivePage() { InitializeComponent(); OptionsList.ItemsSource = new List <Option> { new Option { Name = "Open trend", Command = new Command(() => Navigation.PushModalAsync(new OpenTrendPage(_deviceData))) }, new Option { Name = "Open trend graphic", Command = new Command(() => Navigation.PushModalAsync(new NavigationPage(new OpenTrendGraphicPage(_deviceData)))) } }; OptionsList.ItemSelected += OnOptionSelected; _fileWorker = DependencyService.Get <IFileWorker>(); _jsonKeeper = new JsonDataKeeper <DeviceDataViewModel>(); }
static GameData() { DataKeeper = new JsonDataKeeper <Data>(Application.persistentDataPath + "/" + FileName, true); }
public DataKeeper() { _dataKeeper = new JsonDataKeeper <GameData>(Application.persistentDataPath + "/" + FileName, true); }