Ejemplo n.º 1
0
 private static bool IsHotspot(BeginApplicationStructure beginApplicationStructure)
 {
     if (beginApplicationStructure == null)
     {
         return(false);
     }
     return(HotspotAPSTypes.Contains(beginApplicationStructure.Type.ToUpperInvariant()));
 }
Ejemplo n.º 2
0
        public override void AcceptDelimiterBeginApplicationStructure(BeginApplicationStructure beginApplicationStructure, HotspotContext parameter)
        {
            parameter.BeginAPS(beginApplicationStructure);

            if (IsHotspot(beginApplicationStructure))
            {
                parameter.BeginHotspot(beginApplicationStructure.Identifier);
            }
        }
 public ApplicationStructureViewModel(BeginApplicationStructure beginApplicationStructure)
 {
     Identifier = beginApplicationStructure.Identifier;
     Type       = beginApplicationStructure.Type;
     Descriptor = new SimpleNode("APPLICATION STRUCTURE DESCRIPTOR")
     {
         new SimpleNode(string.Format("Identifier: '{0}'", beginApplicationStructure.Identifier)),
         new SimpleNode(string.Format("Type: '{0}'", beginApplicationStructure.Type)),
         new SimpleNode(string.Format("Inheritance: {0}", beginApplicationStructure.Inheritance)),
     };
     Nodes.Add(Descriptor);
 }
Ejemplo n.º 4
0
 public void AddAPSElement(BeginApplicationStructure beginApplicationStructure)
 {
     switch (beginApplicationStructure.Type.ToUpperInvariant())
     {
     case "GROBJECT": // [WebCGM20-XCF 4.3.5]
     case "LAYER":    // [WebCGM20-XCF 4.3.4]
     case "PARA":     // [WebCGM20-XCF 4.3.6]
     case "SUBPARA":  // [WebCGM20-XCF 4.3.7]
         var apsElement = new XElement(xcf + beginApplicationStructure.Type.ToLower(),
                                       new XAttribute("apsid", beginApplicationStructure.Identifier));
         XCF.Root.Add(apsElement);
         _lastElement = apsElement;
         break;
     }
 }
Ejemplo n.º 5
0
 public override void AcceptDelimiterBeginApplicationStructure(BeginApplicationStructure beginApplicationStructure, XCFDocumentContext parameter)
 {
     parameter.AddAPSElement(beginApplicationStructure);
 }
Ejemplo n.º 6
0
 public void AcceptDelimiterBeginApplicationStructure(BeginApplicationStructure beginApplicationStructure, PrintContext parameter)
 {
     parameter.WriteLine("Begin Application Structure: {0} '{1}'", beginApplicationStructure.Type, beginApplicationStructure.Identifier);
     parameter.BeginLevel();
 }
Ejemplo n.º 7
0
 public virtual void AcceptDelimiterBeginApplicationStructure(BeginApplicationStructure beginApplicationStructure, T parameter)
 {
     // intentionally left blank
 }
 public override void AcceptDelimiterBeginApplicationStructure(BeginApplicationStructure beginApplicationStructure, APSStructureContext parameter)
 {
     parameter.BeginLevel("{0} '{1}'", beginApplicationStructure.Type, beginApplicationStructure.Identifier);
 }
Ejemplo n.º 9
0
 public void BeginAPS(BeginApplicationStructure beginAps)
 {
     _apsStack.Push(beginAps);
 }