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(); } }
private void txtDocumentToolStripMenuItem_Click(object sender, EventArgs e) { string path = "new"; Creator creator = new TxtCreator(path); Product doc = creator.FactoryMethod(); }