Beispiel #1
0
        void GetRadarData(string url)
        {
            if (!Enabled)
            {
                return;
            }
            using (var client = new WebClient())
            {
                try
                {
                    Debug.WriteLine("Downloading radar data from " + url);
                    Stream       response = client.OpenRead(url);
                    MemoryStream stream   = new MemoryStream();
                    response.CopyTo(stream);
                    decoder.setStreamResource(stream);
                    decoder.parseMHB();
                    description = decoder.parsePDB();
                    symbology   = (RadialSymbologyBlock)decoder.parsePSB();
                    gotdata     = true;
                }
                catch (Exception ex)
                {
                }
            }
            //decoder.setFileResource("e:\\users\\dennis\\downloads\\KOKX_SDUS51_N0ROKX_202009292354");

            //RecomputeVertices(_center, _scale, _rotation);
            if (!recomputeVerticesThread.IsAlive)
            {
                recomputeVerticesThread.Start();
            }
            recompute = true;
        }
Beispiel #2
0
    private XElement FormattedXML(MemberSubSection section)
    {
        var finalList = new List <XElement>();
        var sigList   = section.SignatureEntryList.Where(sig => sig.Asm != null).Select(sig => FormattedXML(sig.Asm));

        finalList.AddRange(sigList);
        finalList.Add(new XElement("Summary", section.Summary));
        if (section.Parameters != null && section.Parameters.Count > 0)
        {
            var paramsList = section.Parameters.Select(paramWithDoc => FormattedXML(paramWithDoc));
            finalList.AddRange(paramsList);
        }

        if (section.ReturnDoc != null)
        {
            finalList.Add(FormattedXML(section.ReturnDoc));
        }

        var blocks = new List <XElement>();

        foreach (var block in section.TextBlocks)
        {
            XElement         blockXML         = new XElement("dummy");
            DescriptionBlock descriptionBlock = block as DescriptionBlock;
            if (descriptionBlock != null)
            {
                blockXML = FormattedXML(descriptionBlock);
            }

            ExampleBlock exampleBlock = block as ExampleBlock;
            if (exampleBlock != null)
            {
                blockXML = FormattedXML(exampleBlock);
            }
            blocks.Add(blockXML);
        }
        finalList.AddRange(blocks);
        return(new XElement("Section", finalList));
    }
Beispiel #3
0
 private static XElement FormattedXML(DescriptionBlock block)
 {
     return(new XElement("Description", new XCData(block.Text)));
 }