public void marker_Click(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { Form form2 = new QuestionForm(this, sender); Console.WriteLine("test"); form2.Show(); } }
public void panel1_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Form form2 = new QuestionForm(this, sender); //textBox1.Text = string.Format("X: {0} , Y: {1}", Cursor.Position.X, Cursor.Position.Y); Point p = new Point(e.Location.X, e.Location.Y); //textBox1.Text = p.ToString(); // PositionSystem.Instance().X = p.X; // PositionSystem.Instance().Y = p.Y; PointLatLng pp = gmap.FromLocalToLatLng(e.Location.X, e.Location.Y); // Point test = getPositionOnScreen(stuff.Longitude, stuff.Latitude); // Console.WriteLine("lat:" + stuff.Latitude.ToString() + "lng" +stuff.Longitude.ToString()); //Console.WriteLine(stuff.ToString()); ((QuestionForm)form2).AddCoords(pp); form2.Show(); } }