Ejemplo n.º 1
0
        public PictureForm(PictureForm picture)
        {
            InitializeComponent();

            bitmap = new Bitmap(picture.bitmap);
            pictureBox1.Image = bitmap;

            int height = bitmap.Size.Height;
            int width = bitmap.Size.Width;
            pictureBox1.Width = width * 420 / height;
        }
Ejemplo n.º 2
0
        public HistDiffForm(PictureForm picture)
        {
            InitializeComponent();

            bitmap = new Bitmap(picture.bitmap);
            pictureBox1.Image = bitmap;

            int height = bitmap.Size.Height;
            int width = bitmap.Size.Width;
            pictureBox1.Width = width * 420 / height;

            bmp = new FastBitmap(bitmap);
            numericUpDownX.Maximum = bmp.Width - 1;
            numericUpDownY.Maximum = bmp.Height - 1;
        }
Ejemplo n.º 3
0
        private void duplikujToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PictureForm activeChild = (PictureForm)this.ActiveMdiChild;

            if (activeChild != null)
            {
                PictureForm newChild = new PictureForm(activeChild);
                newChild.Text = new StringBuilder("Obraz ").Append(++formCounter).ToString();
                newChild.MdiParent = this;
                newChild.Show();
            }
        }
Ejemplo n.º 4
0
        private void otwórzToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() != DialogResult.OK)
                return;

            PictureForm picture = new PictureForm(this
            );
            picture.MdiParent = this;
            picture.Text = new StringBuilder("Obraz ").Append(++formCounter).ToString();
            picture.loadImage(openFileDialog1.FileName);
            picture.Show();
        }