private async void Sample_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e) { Token = await StorageInterface.PickExternalStorageFile_NewFile("log.txt"); await StorageInterface.WriteToKnownStorageFile(Token, "acc;accX;accY;accZ;alt;baro;compMN;compTN;compAC;gyroX;gyroY;gyroZ;pitch;roll;yaw;sos;ts(acc);isFast\r\n"); UserInteraction.ShowToast("Sensors", "INIT DONE!"); }
private async void Download() { String Token = await StorageInterface.ReadFromLocalFolder("Storage.Garfield.token"); if (Token == null || Token.Equals("")) { await UserInteraction.ShowDialogAsync("INFORMATION", "You will now be prompted to chose a Folder in which to save the Comic. This App will create a new Folder within the Folder you selected, called \"Garfield\", which will be used to store the images (in order not to confuse them with your files). The App will remember the location you have picked and will use this location until you change it in the Settings."); Token = await StorageInterface.PickExternalStorageFolder(); await StorageInterface.WriteToLocalFolder("Storage.Garfield.token", Token); } try { await StorageInterface.WriteBytesToKnownFolder("Garfield/Garfield_" + date.ToString("yyyy_MM_dd") + ".gif", await NetworkInterface.DownloadGarfield(date), Token); } catch (Exception e) { e.PrintStackTrace(); UserInteraction.ShowToast("ERROR! Could not save file.", "Garfield"); return; } UserInteraction.ShowToast("Comic has successfully been saved", "Garfield"); }
private void Pacer_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e) { rapid = !rapid; UserInteraction.ShowToast("Sensors", "Toggled Mode"); }
private void StartStop_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e) { logging = !logging; Log(); UserInteraction.ShowToast("Sensors", "Start/Stop Request handled"); }