예제 #1
0
 public static bool AddWaypoint(Database db, WaypointData gd)
 {
     bool result = true;
     if (!Core.Settings.Default.GeocacheCodeIgnored(gd.GeocacheCode))
     {
         Waypoint gc = db.WaypointCollection.GetWaypoint(gd.ID);
         if (gc == null)
         {
             gc = new Waypoint(db, gd);
         }
         else
         {
             if (gc.DataFromDate < gd.DataFromDate)
             {
                 gc.BeginUpdate();
                 WaypointData.Copy(gd, gc);
                 gc.EndUpdate();
             }
         }
     }
     else
     {
         result = false;
     }
     return result;
 }
예제 #2
0
 public static bool AddWaypoint(Database db, WaypointData gd)
 {
     bool result = true;
     Waypoint gc = db.WaypointCollection.GetWaypoint(gd.ID);
     if (gc == null)
     {
         gc = new Waypoint(db, gd);
     }
     else
     {
         if (gc.DataFromDate < gd.DataFromDate)
         {
             gc.BeginUpdate();
             WaypointData.Copy(gd, gc);
             gc.EndUpdate();
         }
     }
     return result;
 }