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;
                }
            }
        }
示例#2
0
        private void pictureBox_Click(object sender, EventArgs e)
        {
            int photoSubId = 0;

            if (sender is PictureBox)
            {
                if (((PictureBox)sender).Name == "pictureBox2")
                {
                    photoSubId = 1;
                }
                else if (((PictureBox)sender).Name == "pbSignature")
                {
                    photoSubId = 2;
                }
            }
            else if (sender is LinkLabel)
            {
                if (((LinkLabel)sender).Name == "changePhotoLinkLabel2")
                {
                    photoSubId = 1;
                }
                else if (((LinkLabel)sender).Name == "changeSignatureLinkLabel")
                {
                    photoSubId = 2;
                }
            }

            ShowPictureForm showPictureForm = new ShowPictureForm(_tempPerson, photoSubId, this);

            showPictureForm.ShowDialog();
        }
示例#3
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();
        }
示例#4
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();
        }
示例#5
0
        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();
        }