private void базуДанныхToolStripMenuItem_Click(object sender, EventArgs e) { currentDatabase = new DataContainer(); SaveFileDialog dialog = new SaveFileDialog(); dialog.Filter = "Файл Базы Данных Студии (*.cuсf) | *.cucf"; // Creative Universal Compress Format =) dialog.ShowDialog(); CDataFileInterface.WriteToFile(dialog.FileName, currentDatabase); currentDataPath = dialog.FileName; HelpForm.Invalidate_Text(); }
private void сохранитьToolStripMenuItem_Click(object sender, EventArgs e) { try { CDataFileInterface.WriteToFile(currentDataPath, currentDatabase); } catch (Exception ex) { MessageBox.Show(ex.Message, "ошибка"); } HelpForm.Invalidate_Text(); }
private void подкючитьToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog dialog = new OpenFileDialog(); switch (dialog.ShowDialog()) { case System.Windows.Forms.DialogResult.Cancel: MessageBox.Show("Пользователь отменил действие", "отмена"); return; case System.Windows.Forms.DialogResult.OK: currentDatabase = CDataFileInterface.ReadFromFile(dialog.FileName); currentDataPath = dialog.FileName; break; } HelpForm.Invalidate_Text(); }
private void сохранитьКакToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog dialog = new SaveFileDialog(); dialog.Filter = "Файл Базы Данных Студии (*.cuсf) | *.cucf"; // Creative Universal Compress Format =) HelpForm.Invalidate_Text(); switch (dialog.ShowDialog()) { case System.Windows.Forms.DialogResult.OK: try { CDataFileInterface.WriteToFile(dialog.FileName, currentDatabase); currentDataPath = dialog.FileName; HelpForm.Invalidate_Text(); } catch (Exception ex) { MessageBox.Show(ex.Message, "ошибка"); } break; } }