private void pictureBox1_Click(object sender, EventArgs e)
        {
            int photoSubId = 0;
            if (sender is PictureBox)
            {
                if (((PictureBox)sender).Name == "pictureBox2")
                    photoSubId = 1;
            }
            else if (sender is LinkLabel)
            {
                if (((LinkLabel)sender).Name == "linkLabelChangePhoto2")
                    photoSubId = 1;
            }

            ShowPictureForm showPictureForm = new ShowPictureForm(group, this, photoSubId);
            showPictureForm.ShowDialog();
        }
        private void pictureBox_Click(object sender, EventArgs e)
        {
            int photoSubId=0;
            if (sender is PictureBox)
            {
                if (((PictureBox)sender).Name == "pictureBox2")
                    photoSubId = 1;
            }
            else if (sender is LinkLabel)
                if (((LinkLabel)sender).Name == "changePhotoLinkLabel2")
                    photoSubId = 1;

            ShowPictureForm showPictureForm = new ShowPictureForm(_tempPerson, photoSubId, this);
            showPictureForm.ShowDialog();
        }
 private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     int photoSubId;
     if (((LinkLabel)sender).Name == "changePhotoLinkLabel")
         photoSubId = 0;//it means that we want to get 1st picture
     else
         photoSubId = 1;//it means that we want to get 2nd picture
     ShowPictureForm pictureForm = new ShowPictureForm(Person, photoSubId, this);
     pictureForm.ShowDialog();
 }
Exemplo n.º 4
0
        private void PictureBox1Click(object sender, EventArgs e)
        {
            ShowPictureForm showPictureForm;
            if (sender is PictureBox)
            {
                if (((PictureBox)sender).Name=="pictureBox1")
                {

                    showPictureForm = new ShowPictureForm(_corporate, this, 0);
                    showPictureForm.ShowDialog();

                }
                else if (((PictureBox)sender).Name=="pictureBox2")
                {
                    showPictureForm = new ShowPictureForm(_corporate, this, 1);
                    showPictureForm.ShowDialog();
                }
            }
            else if (sender is LinkLabel)
            {
                switch (((LinkLabel)sender).Name)
                {
                    case "linkLabelChangePhoto":
                        showPictureForm = new ShowPictureForm(_corporate, this, 0);
                        showPictureForm.ShowDialog();
                        break;
                    case "linkLabelChangePhoto2":
                        showPictureForm = new ShowPictureForm(_corporate, this, 1);
                        showPictureForm.ShowDialog();
                        break;
                }
            }
        }
Exemplo n.º 5
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            int photoSubId = 0;
            if (sender is PictureBox)
            {
                if (((PictureBox)sender).Name == "pictureBox2")
                    photoSubId = 1;
            }

            ShowPictureForm showPictureForm = new ShowPictureForm(_village, this, photoSubId);
            showPictureForm.ShowDialog();
        }
Exemplo n.º 6
0
        private void changePhotoLinkLbl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            int photoSubId = 0;
            if (sender is LinkLabel)
            {
                if (((LinkLabel)sender).Name == "linkLabelChangePhoto2")
                    photoSubId = 1;
            }

            ShowPictureForm showPictureForm = new ShowPictureForm(_village, this, photoSubId);
            showPictureForm.ShowDialog();
        }