Example #1
0
        public MainForm()
        {
            //   private string m_strNEMALogFile = null;
             //   private string m_strGPSTrackFile = null;

             		XmlParser xp = new XmlParser();

            xp.OnElementStart += new OnElementStartD(xp_OnElementStart);
            //xp.OnElementEnd += new OnElementEndD(xp_OnElementEnd);
            //xp.OnElementData += new OnElementDataD(xp_OnElementData);

            xp.Load("gpstracker.xml");

            xp.Parse();

            //m_strNEMALogFile = System.Configuration.ConfigurationSettings.AppSettings["NMEALogFile"];
             		//m_strGPSTrackFile = ConfigurationSettings.AppSettings["GPSTrackFileName"];
             		//m_strErrorLogFile  = ConfigurationSettings.AppSettings["ErrorLogFile"];

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            m_GPSWrapper = new GPSWrapper();

            m_GPSWrapper.NMEALogFileLocation = 	m_strNEMALogFile;

            m_GPSWrapper.GPSData.CoordinateChange += new CoordinateChangeHandler(GPSCoordsUpdated);
            m_GPSWrapper.GPSException +=  new ExceptionHandler(GPSException);

            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
        }
Example #2
0
        public MainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            XmlParser xp = new XmlParser();

            xp.OnElementStart += new OnElementStartD(xp_OnElementStart);
            //xp.OnElementEnd += new OnElementEndD(xp_OnElementEnd);
            //xp.OnElementData += new OnElementDataD(xp_OnElementData);

            xp.Load("gpstracker.xml");

            xp.Parse();
        }
Example #3
0
        public MainForm()
        {
            //   private string m_strNEMALogFile = null;
             //   private string m_strGPSTrackFile = null;

             		XmlParser xp = new XmlParser();

            xp.OnElementStart += new OnElementStartD(xp_OnElementStart);
            //xp.OnElementEnd += new OnElementEndD(xp_OnElementEnd);
            //xp.OnElementData += new OnElementDataD(xp_OnElementData);

            xp.Load("gpstracker.xml");

            xp.Parse();

            //m_strNEMALogFile = System.Configuration.ConfigurationSettings.AppSettings["NMEALogFile"];
             		//m_strGPSTrackFile = ConfigurationSettings.AppSettings["GPSTrackFileName"];
             		//m_strErrorLogFile  = ConfigurationSettings.AppSettings["ErrorLogFile"];

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            m_GPSWrapper = new GPSWrapper();

            m_GPSWrapper.NMEALogFileLocation = 	m_strNEMALogFile;
                                //public event GPSFixHandler GPSCoordUpdateEvent;

            if (m_bUseGPSUpdateEvents)
            {
                m_GPSWrapper.GPSCoordUpdateEvent += new GPSFixHandler(GPSCoordsUpdated);
            }

            m_GPSWrapper.GPSException +=  new ExceptionHandler(ExceptionHandler);

            if (m_bUseFormTimer)
            {
                m_UpdateTimer = new Timer();
                m_UpdateTimer.Interval = m_iFormTimerInterval;
                m_UpdateTimer.Enabled = true;
                m_UpdateTimer.Tick += new System.EventHandler (OnFormTimerEvent);

            }
            if (m_bUseLogTimer)
            {
                m_LogTimer = new Timer();
                m_LogTimer.Interval = m_iLogTimerInterval;
                m_LogTimer.Enabled = true;
                m_LogTimer.Tick += new System.EventHandler (OnLogTimerEvent);

            }

                        // Set the interval on our timer and start the
            // timer. It will run for the duration of the
            // program
            m_PowerResetTimer = new Timer();
            int interval = ShortestTimeoutInterval();
            m_PowerResetTimer.Interval = interval;
            m_PowerResetTimer.Enabled = true;
            m_LogTimer.Tick += new System.EventHandler (PowerResetTimer_Tick);

            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            this.commport.Text = m_strGPSCOMPort;

            this.txtErrorCount.Text = m_iErrorCount.ToString();

            this.chkSupressErrors.Checked = m_blnSuppressErrors; // take value of control...
        }