public static void Main()
{
window = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.window_xml));
GlideTouch.Initialize();
btn = (GHI.Glide.UI.Button)window.GetChildByName("instance115");
btn.TapEvent += OnTap;
textBlock = (TextBlock)window.GetChildByName("instance1325");
// write your code here
com1.DataReceived += new SerialDataReceivedEventHandler(Scale_DataReceived);
com1.Open();
TareScale();
Timer myTimer = new Timer(new TimerCallback(ReadScale), null, 5000, 100);
Glide.MainWindow = window;
Thread.Sleep(Timeout.Infinite);
}
This is part of my code, when it gets to btn.TapEvent += OnTap; it throws an exception. This is exactly as the example Glide code.Using NETMF 4.3 on G120E development board.
If you single step your code past this line and then check btn you will see if this is the one that is failing. Single stepping your code is one the great things about debugging NETMF.