public RRExtension() { if (SDK.Created == false) { SDK.SetSDK(); } if (IdDistList.Created == false) { IdDistList.SetIdList(); } if (IdWidthList.Created == false) { IdWidthList.SetIdWidthList(); } }
public Point(XmlNode x) { id = "no"; // Номер точки name = "noname"; lattitude = 0; // Широта longitude = 0; // Долгота hdg = 360; // Азимут hdg_back = 360; // Обратный азимут deltahdg = 360; // Угол проверки азимута dist = 150; // Расстояние до точки в метрах width = 50; skincommand = "no"; // Команда передаваемая в Road Runner skincommand_out = "no"; InSeach = true; real_dist = 0; CultureInfo en = new CultureInfo("en-US"); for (int i = 0; i < x.Attributes.Count; i++) { switch (x.Attributes[i].Name.ToLower()) { case "id": id = x.Attributes[i].Value; break; case "name": name = x.Attributes[i].Value; { string tmp_w = IdWidthList.GetValue("PoiWidthId" + id); if (tmp_w == "") { width = 50; } else { width = Convert.ToInt16(tmp_w); } if (width == 0) { width = 50; } } break; case "lattitude": lattitude = Convert.ToDouble(x.Attributes[i].Value, en); break; case "longitude": longitude = Convert.ToDouble(x.Attributes[i].Value, en); break; case "hdg": hdg = Convert.ToInt16(x.Attributes[i].Value); break; case "hdg_back": hdg_back = Convert.ToInt16(x.Attributes[i].Value); break; case "deltahdg": deltahdg = Convert.ToInt16(x.Attributes[i].Value); break; case "dist": { string tmp_w = IdDistList.GetValue("PoiDistId" + id); if (tmp_w == "") { dist = 0; } else { dist = Convert.ToInt16(tmp_w); } if (dist == 0) { dist = Convert.ToInt16(x.Attributes[i].Value); } } break; case "skincommand": skincommand = x.Attributes[i].Value; break; case "skincommand_out": skincommand_out = x.Attributes[i].Value; break; } } }