Ejemplo n.º 1
0
        private async void OnOpenButtonClicked(object sender, EventArgs e)
        {
            var files   = _fileWorker.GetFilesAsync().Result.ToArray();
            var archive = await DisplayActionSheet("Choose archive", "Cancel", null, files);

            if (archive == "Cancel")
            {
                return;
            }
            _jsonKeeper.Filename = archive;
            _deviceData          = await _jsonKeeper.Browse();
        }
Ejemplo n.º 2
0
        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();
            }
        }