Exemple #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            FileName = textBox3.Text;
            Dir      = textBox2.Text;

            if (FileName.EndsWith(".txt"))
            {
                instance = new TXT(FileName, Dir);
            }
            else if (FileName.EndsWith(".doc"))
            {
                instance = new DOC(FileName, Dir);
            }

            MessageBox.Show(instance.EditFile(textBox1.Text));
        }
Exemple #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            FileName = textBox3.Text;
            Dir      = textBox2.Text;

            if (FileName.EndsWith(".txt"))
            {
                instance = new TXT(FileName, Dir);
            }
            else if (FileName.EndsWith(".doc"))
            {
                instance = new DOC(FileName, Dir);
            }

            textBox1.Text = instance.OpenFile();
        }