상속: Caliburn.Micro.PropertyChangedBase
예제 #1
0
 public void OnPositionChanged(Position position)
 {
     var handler = PositionChanged;
     if (handler != null) PositionChanged(this, new PositionChangedEventArgs(position, this));
 }
예제 #2
0
 public PositionChangedEventArgs(Position position, ImbClientStatus status)
 {
     ClientStatus = status;
     Position = position;
 }
예제 #3
0
 internal void UpdatePosition(string c)
 {
     var cc = c.Split('|');
     try
     {
         var p = new Position
         {
             Date = DateTime.Now,
             Latitude = double.Parse(cc[0], CultureInfo.InvariantCulture),
             Longitude = double.Parse(cc[1], CultureInfo.InvariantCulture),
             Precision = double.Parse(cc[2], CultureInfo.InvariantCulture),
             Course = double.Parse(cc[3], CultureInfo.InvariantCulture),
             Speed = double.Parse(cc[4], CultureInfo.InvariantCulture)
         };
         Position = p;
         OnPositionChanged(p);
     }
     catch (Exception)
     {
         Console.WriteLine("Error parsing position ");
     }
 }