Ejemplo n.º 1
0
        /// <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)
            {
            }
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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();
            }
        }