예제 #1
0
 public void LoadIdsFromAreaDefinitions(AreaDefinitionList areas)
 {
     foreach (var area in areas.AreaDefinitions)
     {
         if (area.Active)
         {
             areaIds.Add(area.Id);
         }
     }
 }
예제 #2
0
        public HttpStatusCode GetSVGLayoutInfo(out Model.AreaDefinitionList areasList,
                                               out Model.LineDefinitionList linesList)
        {
            ValidateIsBound();

            var    client       = new MoveRestClient(_device, _port, _username, _password);
            string body         = null;
            var    responseCode = client.GetLayout(out body);
            string msg          = (body.Length > _DATA_PREVIEW_SIZE) ? body.Substring(0, _DATA_PREVIEW_SIZE) : body;

            Trace.TraceInformation("\nRaw JSON data:  {0}{1}", msg, (msg.Length < body.Length) ? "..." : "");

            areasList = XmlHelper.XmlToAreaDefinitionsList(body);
            linesList = XmlHelper.XmlToLineDefinitionsList(body);

            return(responseCode);
        }