Beispiel #1
0
        public void Build_Prediction_Marker(PointLatLng Base_Position, string ACID, MySqlProvider.PredictionTableNumberType Table_Type, ref GMapOverlay Overlay)
        {
            MySqlProvider SqlProvider = new MySqlProvider();
            System.Collections.Generic.List<MySqlProvider.PredictionDataSetOneRow> Record = SqlProvider.GetOneRecordPerTimeAndACID(Table_Type, SharedData.LookAheadTime, ACID, false);

            // If prediction data for the given parameters exists
            // then lets add it to the display list.
            if (Record.Count > 0)
            {
                GeoCordSystemDegMinSecUtilities.LatLongClass P_Pont = new GeoCordSystemDegMinSecUtilities.LatLongClass(double.Parse(Record[0].Lat), double.Parse(Record[0].Lon));

                PointLatLng PredictedPoint = new PointLatLng(P_Pont.GetLatLongDecimal().LatitudeDecimal, P_Pont.GetLatLongDecimal().LongitudeDecimal);
                PredictionMarker PM;

                string label = Record[0].ACID + "\n" + Record[0].Time.ToShortTimeString();

                switch (Table_Type)
                {
                    case MySqlProvider.PredictionTableNumberType.One:
                        PM = new PredictionMarker(Base_Position, Color.Magenta, PredictedPoint, label);
                        Overlay.Markers.Add(PM);
                        break;
                    case MySqlProvider.PredictionTableNumberType.Two:
                        PM = new PredictionMarker(Base_Position, Color.Blue, PredictedPoint, label);
                        Overlay.Markers.Add(PM);
                        break;
                    case MySqlProvider.PredictionTableNumberType.Three:
                        PM = new PredictionMarker(Base_Position, Color.Orange, PredictedPoint, label);
                        Overlay.Markers.Add(PM);
                        break;
                }
            }
        }
Beispiel #2
0
        // This method returns one distinct record of data for the specified time and ACID
        private System.Collections.Generic.List <MySqlProvider.PredictionDataSetOneRow> GetOneRecordPerTimeAndACID()
        {
            MySqlProvider MySQL     = new MySqlProvider();
            TimeSpan      TimeToAdd = new TimeSpan((int)this.numericUpDownHrs.Value, (int)this.numericUpDownMin.Value, 0);

            return(MySQL.GetOneRecordPerTimeAndACID(GetTableChoice(), TimeToAdd, this.comboBoxACID.Text, true));
        }
Beispiel #3
0
        public void Build_Prediction_Marker(PointLatLng Base_Position, string ACID, MySqlProvider.PredictionTableNumberType Table_Type, ref GMapOverlay Overlay)
        {
            MySqlProvider SqlProvider = new MySqlProvider();

            System.Collections.Generic.List <MySqlProvider.PredictionDataSetOneRow> Record = SqlProvider.GetOneRecordPerTimeAndACID(Table_Type, SharedData.LookAheadTime, ACID, false);

            // If prediction data for the given parameters exists
            // then lets add it to the display list.
            if (Record.Count > 0)
            {
                GeoCordSystemDegMinSecUtilities.LatLongClass P_Pont = new GeoCordSystemDegMinSecUtilities.LatLongClass(double.Parse(Record[0].Lat), double.Parse(Record[0].Lon));

                PointLatLng      PredictedPoint = new PointLatLng(P_Pont.GetLatLongDecimal().LatitudeDecimal, P_Pont.GetLatLongDecimal().LongitudeDecimal);
                PredictionMarker PM;

                string label = Record[0].ACID + "\n" + Record[0].Time.ToShortTimeString();

                switch (Table_Type)
                {
                case MySqlProvider.PredictionTableNumberType.One:
                    PM = new PredictionMarker(Base_Position, Color.Magenta, PredictedPoint, label);
                    Overlay.Markers.Add(PM);
                    break;

                case MySqlProvider.PredictionTableNumberType.Two:
                    PM = new PredictionMarker(Base_Position, Color.Blue, PredictedPoint, label);
                    Overlay.Markers.Add(PM);
                    break;

                case MySqlProvider.PredictionTableNumberType.Three:
                    PM = new PredictionMarker(Base_Position, Color.Orange, PredictedPoint, label);
                    Overlay.Markers.Add(PM);
                    break;
                }
            }
        }
Beispiel #4
0
 // This method returns one distinct record of data for the specified time and ACID
 private System.Collections.Generic.List<MySqlProvider.PredictionDataSetOneRow> GetOneRecordPerTimeAndACID()
 {
     MySqlProvider MySQL = new MySqlProvider();
     TimeSpan TimeToAdd = new TimeSpan((int)this.numericUpDownHrs.Value, (int)this.numericUpDownMin.Value, 0);
     return MySQL.GetOneRecordPerTimeAndACID(GetTableChoice(), TimeToAdd, this.comboBoxACID.Text, true);
 }