示例#1
0
 //--------------------------------------------------------------------------------------
 private void pbSource_MouseClick(object sender, MouseEventArgs e)
 {
     if (((Control.ModifierKeys & Keys.Alt) == Keys.Alt) && e.Button == MouseButtons.Left)
     {
         FColorBorderExplorer form = new FColorBorderExplorer(((PictureBox)sender).Image);
         form.Show();
     }
     else if (((Control.ModifierKeys & Keys.Alt) == Keys.Alt) && e.Button == MouseButtons.Right)
     {
         FBordersByColorForImage form = new FBordersByColorForImage(((PictureBox)sender).Image);
         form.Show();
     }
 }
示例#2
0
 //--------------------------------------------------------------------------------------
 private void tsbBordersByColorForImage_Click(object sender, EventArgs e)
 {
     try
     {
         Bitmap lInBmp = fPictureFocus.Image as Bitmap;
         if (lInBmp == null)
         {
             MessageBox.Show("Нет картинки");
             return;
         }
         FBordersByColorForImage form = new FBordersByColorForImage(lInBmp);
         form.Show();
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.ToString());
     }
 }