2012-02-17 05:09:27 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace ArdupilotMega
|
|
|
|
|
{
|
|
|
|
|
class myGMAP : GMap.NET.WindowsForms.GMapControl
|
|
|
|
|
{
|
2012-02-20 07:30:47 -04:00
|
|
|
|
public bool inOnPaint = false;
|
|
|
|
|
string otherthread = "";
|
2012-02-17 05:09:27 -04:00
|
|
|
|
|
|
|
|
|
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (inOnPaint)
|
|
|
|
|
{
|
2012-02-20 07:30:47 -04:00
|
|
|
|
Console.WriteLine("Was in onpaint Gmap th:" + System.Threading.Thread.CurrentThread.Name + " in " + otherthread);
|
2012-02-17 05:09:27 -04:00
|
|
|
|
return;
|
|
|
|
|
}
|
2012-02-20 07:30:47 -04:00
|
|
|
|
|
|
|
|
|
otherthread = System.Threading.Thread.CurrentThread.Name;
|
|
|
|
|
|
2012-02-17 05:09:27 -04:00
|
|
|
|
inOnPaint = true;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
base.OnPaint(e);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex) { Console.WriteLine(ex.ToString()); }
|
|
|
|
|
|
|
|
|
|
inOnPaint = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
base.OnMouseMove(e);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex) { Console.WriteLine(ex.ToString()); }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|