private void btImportTemp_Click(object sender, EventArgs e) { var file = new OpenFileDialog(); if (file.ShowDialog() == DialogResult.OK) { CsvImporter.Import(file.FileName, true); } }
private void btImport_Click(object sender, EventArgs e) { var file = new OpenFileDialog(); if (file.ShowDialog() == DialogResult.OK) { try { Cursor.Current = Cursors.WaitCursor; CsvImporter.Import(file.FileName); Cursor.Current = Cursors.Default; } catch (Exception exception) { Cursor.Current = Cursors.Default; MessageBox.Show(exception.Message); } } }