private void save_Click(object sender, EventArgs e) { if (saveFileDialog.ShowDialog() == DialogResult.OK) { try { FileStr.WriteStr(StudentsToString(Arr2ToStudents(DataGridViewUtils.GridToArray2 <string>(Output))), saveFileDialog.FileName); } catch (Exception ex) { MessageBox.Show(ex.Message, "ошибка"); } } }
private void save_Click(object sender, EventArgs e) { if (saveFileDialog.ShowDialog() == DialogResult.OK) { try { FileStr file = new FileStr(saveFileDialog.FileName); file.WriteStr(Output.Text); } catch (Exception ex) { MessageBox.Show(ex.Message, "ошибка"); } } }
static void FileWrite(string str, string Path) { FileStr.WriteStr(str, Path); }