Ejemplo n.º 1
0
        public string ToXMLString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("<Region>");
            sb.AppendLine("<ID>" + ID + "</ID>");
            sb.AppendLine("<OutputResult>" + OutputResult.ToString().ToUpper() + "</OutputResult>");
            sb.AppendLine("<TimelyReportTimeInterval>" + TimelyReportTimeInterval + "</TimelyReportTimeInterval>");
            sb.AppendLine("<HumanSuperscale>");
            sb.AppendLine("<InSide>");
            sb.AppendLine(BreakIn.ToXMLString());
            sb.AppendLine("</InSide>");
            sb.AppendLine("<OutSide>");
            sb.AppendLine(BreakOut.ToXMLString());
            sb.AppendLine("</OutSide>");
            sb.AppendLine("</HumanSuperscale>");

            sb.AppendLine("<InSide>" + RegionTypeIn.ToString().ToUpper() + "</InSide>");
            sb.AppendLine("<OutSide>" + RegionTypeOut.ToString().ToUpper() + "</OutSide>");
            sb.AppendLine("<PointNum>" + RegionPointList.Count + "</PointNum>");
            sb.AppendLine("<PointSet>");
            foreach (System.Drawing.Point item in RegionPointList)
            {
                sb.AppendLine("<Point>");
                sb.AppendLine("<X>" + item.X + "</X>");
                sb.AppendLine("<Y>" + item.Y + "</Y>");
                sb.AppendLine("</Point>");
            }
            sb.AppendLine("</PointSet>");
            sb.AppendLine("</Region>");

            return(sb.ToString());
        }
Ejemplo n.º 2
0
        public string ToXMLString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("<Line>");
            sb.AppendLine("<ID>" + ID + "</ID>");
            sb.AppendLine("<OutputResult>" + OutputResult.ToString().ToUpper() + "</OutputResult>");
            sb.AppendLine("<TimelyReportTimeInterval>" + TimelyReportTimeInterval + "</TimelyReportTimeInterval>");
            sb.AppendLine("<HumanSuperscale>");
            sb.AppendLine("<PosBeyond>");
            sb.AppendLine(PosBeyond.ToXMLString());
            sb.AppendLine("</PosBeyond>");
            sb.AppendLine("<NegBeyond>");
            sb.AppendLine(NegBeyond.ToXMLString());
            sb.AppendLine("</NegBeyond>");
            sb.AppendLine("</HumanSuperscale>");


            sb.AppendLine("<PosBeyond>" + PassLinePos.ToString().ToUpper() + "</PosBeyond>");
            sb.AppendLine("<NegBeyond>" + PassLineNeg.ToString().ToUpper() + "</NegBeyond>");
            sb.AppendLine("<BeyondLinePointSet>");
            sb.AppendLine("<Point>");
            sb.AppendLine("<X>" + PassLineStart.X + "</X>");
            sb.AppendLine("<Y>" + PassLineStart.Y + "</Y>");
            sb.AppendLine("</Point>");
            sb.AppendLine("<Point>");
            sb.AppendLine("<X>" + PassLineEnd.X + "</X>");
            sb.AppendLine("<Y>" + PassLineEnd.Y + "</Y>");
            sb.AppendLine("</Point>");
            sb.AppendLine("</BeyondLinePointSet>");
            sb.AppendLine("<DirectLinePointSet>");
            sb.AppendLine("<Point>");
            sb.AppendLine("<X>" + DirectLineStart.X + "</X>");
            sb.AppendLine("<Y>" + DirectLineStart.Y + "</Y>");
            sb.AppendLine("</Point>");
            sb.AppendLine("<Point>");
            sb.AppendLine("<X>" + DirectLineEnd.X + "</X>");
            sb.AppendLine("<Y>" + DirectLineEnd.Y + "</Y>");
            sb.AppendLine("</Point>");
            sb.AppendLine("</DirectLinePointSet>");
            sb.AppendLine("</Line>");

            return(sb.ToString());
        }