} // ******************* end Detect edges ***************************************** private void pictureBox2_MouseClick(object sender, MouseEventArgs e) // DrawComb { int StandX, StandY; if (!radioButton1.Checked && !radioButton2.Checked) { MessageBox.Show("Please click one of the right radio buttons"); } if (radioButton2.Checked) { pictureBox1.Image = origBmp; radioButton1.Checked = false; StandX = (int)((e.X - marginX) / Scale1); StandY = (int)((e.Y - marginY) / Scale1); label2.Visible = true; label3.Visible = true; pictureBox3.Visible = true; ExtremIm.DrawImageLine(StandY, StandX, Threshold, SigmaIm, CombIm.Grid, this); } if (radioButton1.Checked) { StandX = (int)((e.X - marginX) / Scale1); StandY = (int)((e.Y - marginY) / Scale1); label2.Visible = false; label3.Visible = false; pictureBox3.Visible = false; CombIm.DrawComb(StandX, StandY, this); } if (BmpGraph) { pictureBox1.Refresh(); pictureBox2.Refresh(); } } //***************************** end MouseClick ******************************
private void pictureBox2_MouseClick(object sender, MouseEventArgs e) // Click for "DrawComb" { int StandX = (int)((double)(e.X - marginX) / Scale1); int StandY = (int)((double)(e.Y - marginY) / Scale1); CombIm.DrawComb(StandX, StandY, false, this); } //*************************** end Click for "DrawComb" **********************************
} //*********************************** end Detect edges ************************************ private void pictureBox2_MouseClick(object sender, MouseEventArgs e) // If you click to pictureBox2 after having detected edges you wiil see a fragment of the egdes. { int StandX = (int)((e.X - marginX) / Scale1); int StandY = (int)((e.Y - marginY) / Scale1); MessageBox.Show("Mouse; standard coord. of upper left corner: StandX=" + StandX + " StandY=" + StandY); CombIm.DrawComb(StandX, StandY, this); } //************************************ end MouseClick *****************************************
} //***************************** end Detect edges ******************************* private void pictureBox2_MouseClick(object sender, MouseEventArgs e) { int StandX = (int)((e.X - marginX) / Scale1); int StandY = (int)((e.Y - marginY) / Scale1); if (MessReturn("MouseClick: Version=" + Version) < 0) { return; } switch (Version) { case 1: CombIm.DrawComb(StandX, StandY, this); break; case 2: CombIm.DrawCombPix(StandX, StandY, this); break; case 3: ExtremIm.DrawImageLine(StandY, StandX, Threshold, SigmaIm, CombIm.Grid, this); break; } }