Example #1
0
        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);
            }
        }
Example #2
0
        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);
        }