コード例 #1
0
        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();
        }
コード例 #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 (sender is LinkLabel)
                if (((LinkLabel)sender).Name == "changePhotoLinkLabel2")
                    photoSubId = 1;

            ShowPictureForm showPictureForm = new ShowPictureForm(_tempPerson, photoSubId, this);
            showPictureForm.ShowDialog();
        }
コード例 #3
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();
 }
コード例 #4
0
ファイル: CorporateUserControl.cs プロジェクト: yimlu/opencbs
        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;
                }
            }
        }
コード例 #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();
        }
コード例 #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();
        }