Exemple #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            string fileStream = richTextBox1.Text.ToString();

            FileRW.fileWriter(GlobalConfig.FilePath, fileStream);
            this.Close();
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            DialogResult dr;

            dr = MessageBox.Show("Do you want to save changes ?", "FileEditor", MessageBoxButtons.YesNoCancel);
            if (dr == DialogResult.No)
            {
                this.Close();
            }
            else if (dr == DialogResult.Yes)
            {
                string fileStream = richTextBox1.Text.ToString();
                FileRW.fileWriter(GlobalConfig.FilePath, fileStream);
                this.Close();
            }
        }