Ejemplo n.º 1
0
        private void imageButton_Click(object sender, EventArgs e)
        {
            PictureForm pictureForm = new PictureForm(DataContext);

            if (pictureForm.ShowDialog() == DialogResult.OK)
            {
                AddTag("img src=\"/Images/" + pictureForm.SelectedPicture.PictureId + "\"", false);
            }
        }
Ejemplo n.º 2
0
        private void pictureBox_Click(object sender, EventArgs e)
        {
            PictureForm pictureForm = new PictureForm(DataContext);

            if (pictureForm.ShowDialog() == DialogResult.OK)
            {
                School.Picture   = pictureForm.SelectedPicture;
                pictureBox.Image = System.Drawing.Image.FromStream(new MemoryStream(School.Picture.Data.ToArray()));
            }
        }
Ejemplo n.º 3
0
        private void pictureBox_DoubleClick(object sender, EventArgs e)
        {
            if (SelectedNews != null)
            {
                PictureForm pictureForm = new PictureForm(DataContext);

                if (pictureForm.ShowDialog() == DialogResult.OK)
                {
                    SelectedNews.Picture = pictureForm.SelectedPicture;
                    pictureBox.Image     = new Bitmap(new MemoryStream(SelectedNews.Picture.Data.ToArray()));
                }
            }
        }
Ejemplo n.º 4
0
        private void editFlagToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (SelectedCountry != null)
            {
                PictureForm pictureForm = new PictureForm(DataContext);

                if (pictureForm.ShowDialog() == DialogResult.OK)
                {
                    SelectedCountry.Picture = pictureForm.SelectedPicture;
                    DataContext.SubmitChanges();

                    countryImageList.Images.RemoveByKey(SelectedCountry.Name);
                    countryImageList.Images.Add(SelectedCountry.Name, new Bitmap(new MemoryStream(SelectedCountry.Picture.Data.ToArray())));
                }
            }
        }
Ejemplo n.º 5
0
        private void VerticalPicture_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left || VerticalPicture.ImageLocation == null)
                return;

            PictureForm form = new PictureForm();
            form.ImageLocation = VerticalPicture.ImageLocation;
            form.Title = VerticalPictureTitleLabel.Text;
            form.ShowDialog();
        }
        private void pb_Click(object sender, EventArgs e)
        {
            PictureForm pf = new PictureForm((sender as PictureBox).Image, true);

            pf.ShowDialog();
        }