public void ShowForm(int Width, int Height) { DrawForm subform = new DrawForm(this, drawForms.Count, Width, Height); lastform = drawForms.Count; subform.setTool(selectedTool, value, color); drawForms.Add(subform); subform.Show(); }
private void открытьToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog open = new OpenFileDialog(); open.Title = "Открыть"; open.Filter = "Bitmap (*.bmp)|*.bmp| Jpeg (*.jpeg)|*.jpeg| PNG (*.png)|*.png| Все файлы (*.*)|*.*"; if (open.ShowDialog() == DialogResult.OK) { DrawForm subform = new DrawForm(this, drawForms.Count); lastform = drawForms.Count; drawForms.Add(subform); subform.Show(); subform.Open(open.FileName); } }