/// <summary> /// Saves the current program /// </summary> /// <param name="content">Content of th Pgm</param> private void SaveCurrentPgm(string content) { PgmDialog dialog = new PgmDialog(mainForm, currentPgmName, content, PgmDialog.PgmDialogMode.SaveProgram); DialogResult result = dialog.ShowDialog(); if (result == DialogResult.OK) { } }
private void btnSave_Click(object sender, EventArgs ev) { PgmDialog dialog = new PgmDialog(mainForm, currentPgmName, this.txtTextArea.Text, PgmDialog.PgmDialogMode.SaveProgram); DialogResult result = dialog.ShowDialog(); if (result == DialogResult.OK) { currentPgmName = dialog.ProgramName; txtTextArea.Text = dialog.Content; SetTitle(); } dialog.Close(); }
private void btnOpen_Click(object sender, EventArgs e) { PgmDialog dialog = new PgmDialog(mainForm, string.Empty, string.Empty, PgmDialog.PgmDialogMode.OpenProgram); DialogResult result = dialog.ShowDialog(); if (result == DialogResult.OK) { currentPgmName = dialog.ProgramName; txtTextArea.Text = dialog.Content; SetTitle(); } if (result != DialogResult.None) { dialog.Close(); } }