Exemplo n.º 1
0
        private void создатьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormCreate form = new FormCreate();

            form.ShowDialog();
            if (form.Canceled == false)
            {
                CreateBlank(form.W, form.H);
                saveFileDialog1.FileName = form.FileName;
                openFileDialog1.FileName = form.FileName;
            }
        }
Exemplo n.º 2
0
        private void открытьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.InitialDirectory = "C:\\Users\\Pavel\\Pictures";
            openFileDialog1.Filter           = "jpg files (*.jpg) | *.jpg |bmp files (*.bmp) | *.bmp |png files (*.png) | *.png";

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                FormCreate form = new FormCreate();
                pictureBox1.Image    = Image.FromFile(openFileDialog1.FileName);
                pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
            }
        }