예제 #1
0
        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();
        }
예제 #2
0
        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);
            }
        }