Beispiel #1
0
 public void AssignCharMapping(Dictionary <string, IMapObject> mapper, string styleName, string val, bool isMapped, bool split = false)
 {
     if (isMapped)
     {
         if (!mapper.ContainsKey(styleName))
         {
             mapper.Add(styleName, new MapObject {
                 ControlData = val
             });
         }
         else
         {
             mapper[styleName] = new MapObject {
                 ControlData = val
             };
         }
     }
     else
     {
         if (!mapper.ContainsKey(styleName))
         {
             mapper.Add(styleName, new NoMapObject());
         }
         else
         {
             mapper[styleName] = new NoMapObject();
         }
     }
 }
Beispiel #2
0
 public void AssignParaMapping(Dictionary <string, IMapObject> mapper, string styleName, string val, bool isMapped, bool split, string type)
 {
     if (isMapped)
     {
         if (!mapper.ContainsKey(styleName))
         {
             int ca = 0;
             // TODO: Better level implementation, if needed
             if (styleName.StartsWith("h") && Int32.TryParse(styleName.Substring(1, 1), out ca))
             {
             }
             mapper.Add(styleName, new MapObject {
                 FragmentSplit = split, FragmentTypeName = type, ControlAttributes = ca.ToString(), ControlData = val
             });
         }
         else
         {
             mapper[styleName] = new MapObject {
                 FragmentSplit = split, FragmentTypeName = type, ControlAttributes = "", ControlData = val
             };
         }
     }
     else
     {
         if (!mapper.ContainsKey(styleName))
         {
             mapper.Add(styleName, new NoMapObject());
         }
         else
         {
             mapper[styleName] = new NoMapObject();
         }
     }
 }