private void ImportFromCSV_Click(object sender, RoutedEventArgs e) { if (Preferences.ShowWarningWhenImportingFromCSVFile) { GetInput.ShowInfoDialog("CSV Import Warning", "About importing from CSV", "When you use this tool to import data from a CSV, you are making many modifications quickly, " + "which can be hard to undo. \n" + "To import a CSV, make sure that, in the CSV you want to import, the column with Device IDs is named " + "\"deviceId\", without the quotes. That will allow ChromebookGUI to run the mass operation.\n" + "If you want to silence this warning in the future, go to File -> Preferences and untick the appropriate " + "box." ); } string filePath = GetInput.GetFileSelection("csv"); if (filePath == null) { GetInput.ShowInfoDialog("ChromebookGUI: No file selected", "No File Selected", "You didn't select a file or pressed cancel. Either way no changes have been made."); return; } Globals.ClearGlobals(); Globals.CsvLocation = filePath; Globals.DeviceId = "csv"; currentView.ToggleMainWindowButtons(true); }