예제 #1
0
        private void txtDocumentToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            OpenFileDialog OPF = new OpenFileDialog();

            OPF.Filter = "Файлы txt|*.txt";
            if (OPF.ShowDialog() == DialogResult.OK)
            {
                Creator creator = new TxtCreator(OPF.FileName);
                Product doc     = creator.FactoryMethod();
            }
        }
예제 #2
0
 private void txtDocumentToolStripMenuItem_Click(object sender, EventArgs e)
 {
     string  path    = "new";
     Creator creator = new TxtCreator(path);
     Product doc     = creator.FactoryMethod();
 }