public Contact(string spotMessage) { XElement element = XElement.Parse(spotMessage); Call = element.Element("call").Value; Frequency = double.Parse(element.Element("rxfreq").Value) / 100d; OffsetTimestamp = DateTimeOffset.Parse($"{element.Element("timestamp").Value} -00:00"); Band = RadioInfo.DetermineBand(Frequency); }
public Spot(string contactMessage, bool minInfo = false) { XElement element = XElement.Parse(contactMessage); Call = element.Element("dxcall").Value; Frequency = double.Parse(element.Element("frequency").Value); Band = RadioInfo.DetermineBand(Frequency); OffsetTimestamp = DateTimeOffset.Parse($"{element.Element("timestamp").Value} -00:00"); CountryZone = MainForm.CallParser.CheckCall(Call); if (!minInfo) { Action = element.Element("action").Value; SpotterCall = element.Element("spottercall").Value; Comment = element.Element("comment").Value; Status = element.Element("status").Value; Mode = RadioInfo.DetermineMode(Comment); ValueModel = new SpotValueModel(Call, CountryZone, Band, Multiplier); } }