private void HandleDetectedGroupInfo(IMarshallable dataReceived) { DetectedGroupInfo det = dataReceived as DetectedGroupInfo; if (det != null) { ShowInfo("### DetectedGroupInfo received: " + det.ToString()); if (_DetectedGroups.Contains(det)) { _DetectedGroups.Remove(det); } _DetectedGroups.Add(det); } }
public DetectedGroupInfo GetDetectedGroupInfo() { DetectedGroupInfo info = new DetectedGroupInfo(); info.Id = Id; info.Name = Name; info.Description = ToString(); foreach (var unit in DetectedUnits) { info.DetectedUnitIds.Add(unit.Id); } if (Position != null) { info.Position = Position.GetPositionInfo(); info.Position.IsDetection = true; } return(info); }