End Google Ads 201810 - BS.net 01 -->
I'm stuck on a problem and would like your help. I have a class - “public class NmeaInterpreter” well known and written by Jon Person - , where it is sent and receive events through delegates / events:
/ / **********
public class NmeaInterpreter public delegate void PositionReceivedEventHandler (string latitude, string longitude); .... .... PositionReceivedEventHandler PositionReceived public event; .... ...
/ / ************
I have two more Forms( ) :
Form 2 ( ) - where I set the serial port, and sending the sentences received by GPS.
Form 1 ( ) - generally where I analyze and get the values and step formatted for a TextBox.
Although the Form1 ( ) deal with events :
/ / ****
NmeaInterpreter GPS NmeaInterpreter = new ( ) ; public Form1 ( ) { InitializeComponent ( ) ; GPS.PositionReceived = new NmeaInterpreter.PositionReceivedEventHandler ( GPS_PositionReceived ) ; } private void GPS_PositionReceived (string latitude, string longitude ) { TestBox.Text latitude.ToString = (); } / / **************
- I cannot read or have no value in Textboxes ! Any idea?
When I debug step by step, just noticed that it ignores the methods created ...
Another thing is that if I have only one Form( ), where I treat the events and do the settings of the serial ports , it works ... but if I want to pass the data / strings from “class NmeaInterpreter” and show to another Form ( ) , does not work ! Where is the error?
Thanks for the support
Jose
مواقع النشر (المفضلة)