public QuondamRetraceForm(TwoTrails.DataAccess.DataAccessLayer dal, int pointIndex, int polyIndex)
        {
            InitializeComponent();

            DAL = dal;

            Init(pointIndex, polyIndex);
        }
        public QuondamRetraceForm(TwoTrails.DataAccess.DataAccessLayer dal, int pointIndex, int polyIndex)
        {
            DAL = dal;

            if (Engine.Values.WideScreen)
                InitializeComponentWide();
            else
                InitializeComponent();

            Init(pointIndex, polyIndex);
        }
 private void pointNavigationCtrl_IndexChanged(object sender, TwoTrails.Controls.PointNavigationCtrl.PointNavEventArgs e)
 {
     pointNavigationCtrl_IndexChanged2(sender, e);
 }
        private void GPSA_BurstReceived(TwoTrails.GpsAccess.NmeaBurst b)
        {
            //string data = "Lat: " + b._latitude.ToString() + ", Lon: " + b._longitude.ToString();

            /*

            if (startCheck)
            {
                if (!gpsRecvData)
                {
                    Values.Settings.DeviceOptions.GpsConfigured = true;
                    startCheck = false;

                    this.GuiInvoke(() =>
                        {
                            gpsRecvData = true;
                            txtGpsOutput.Text = "GPS Successful";
                            Values.GPSA.CloseGps(); ;

                            AutoClosingMessageBox.Show("GPS Configured", "Gps Configuration", 1000);
                        });
                }
            }
            */
        }
        public void getLoc(TwoTrails.GpsAccess.NmeaBurst b)
        {
            b.CalcRealZone();

            myGpsPosX = b._X;
            myGpsPosY = b._Y;

            if (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond - lastDraw > 999)
            {
                if (b.IsValid)
                    ignoreMyPos = false;
                else
                    ignoreMyPos = true;

                try
                {
                    if (MapValues.mapDetails)
                    {
                        if (ignoreMyPos)
                            lblLoc.Text = "Bad GPS Position";

                        if (MapValues.mapDetailsUTM)
                        {
                            lblLoc.Text = String.Format("Zone:{0} {1:F}M {2}, {3:F}M {4}", b._utm_zone, b._X,
                                b._longDir.ToString(), b._Y, b._latDir.ToString());
                        }
                        else
                        {
                            lblLoc.Text = String.Format("Lat: {0}{1}  Lon: {2}{3}", b._latitude.ToString().Substring(0, 8),
                                (b._longDir == EastWest.West) ? ('W') : ('E'), b._longitude.ToString().Substring(0, 8), (b._latDir == NorthSouth.North) ? ('N') : ('S'));
                        }
                    }
                }
                catch (Exception ex)
                {
                    TtUtils.WriteError(ex.Message, "MapFormLogic", ex.StackTrace);
                }

                drawPanel.Refresh();
            }
        }
 private void GPSA_BurstReceived(TwoTrails.GpsAccess.NmeaBurst b)
 {
     this.Invoke(m_DelegateGotBurst, b);
 }
        private void pointNavigationCtrl1_IndexChanged2(object sender, TwoTrails.Controls.PointNavigationCtrl.PointNavEventArgs e)
        {
            SaveCurrentPolygon();

            _ignoreMakeDirty = true;

            int index = CNs.IndexOf(e.NextPointCN);

            if (index > -1 && index < Polygons.Count)
            {
                CurrentPolygon = Polygons[index];
                UpdatedPolygon = CurrentPolygon;
                AdjustNavControls(index);
                actionsControlPolygons.MiscButtonEnabled = true;
            }
            else
            {
                actionsControlPolygons.MiscButtonEnabled = false;
            }

            Lock(true);

            Kb.Hide(this);

            _ignoreMakeDirty = false;
        }
 private void pointInfoCtrl1_OnLocked_CheckedChanged(object sender, TwoTrails.Controls.LockStateEventArgs e)
 {
     pointInfoCtrl_OnLocked_CheckedChanged2(sender, e);
 }
        private void GPSA_BurstReceived(TwoTrails.GpsAccess.NmeaBurst b)
        {
            b.CalcZone(currZone);

            this.GuiInvoke(() =>
            {
                if (this.Parent.Visible)
                    this.Invoke(m_DelegateGotBurst, b);
            });
        }
        private void pointNavigationCtrl_IndexChanged2(object sender, TwoTrails.Controls.PointNavigationCtrl.PointNavEventArgs e)
        {
            pointInfoCtrl.FlashPoint = false;

            ChangePoint(e.NextPointCN);
            LockControls(true);
        }
 private void pointNavigationCtrl_IndexChanged2(object sender, TwoTrails.Controls.PointNavigationCtrl.PointNavEventArgs e)
 {
     ChangeMeta(e.NextPointCN);
 }