예제 #1
0
파일: Map.cs 프로젝트: configare/hispeed
 public Map(string name, string url, MapVersion version, MapAuthor author, MapArguments arg, ILayer[] layers)
     : this(name, url, version, author, arg)
 {
     _inputLayers          = layers;
     _conflictDefForSymbol = new ConflictDefinition();
     _conflictDefForLabel  = new ConflictDefinition(new Size(60, 16), true);
 }
예제 #2
0
파일: Map.cs 프로젝트: configare/hispeed
 public Map(string name, string url, IFeatureLayer[] layers)
     : this(name, url)
 {
     _inputLayers          = layers;
     _conflictDefForSymbol = new ConflictDefinition();
     _conflictDefForLabel  = new ConflictDefinition(new Size(60, 16), true);
 }
예제 #3
0
 public void Dispose()
 {
     _host.OnCanvasSizeChanged -= _resizeHandler;
     _grids       = null;
     _conflictDef = null;
     _host        = null;
 }
예제 #4
0
파일: Map.cs 프로젝트: configare/hispeed
 public Map()
 {
     _version              = new MapVersion();
     _author               = new MapAuthor();
     _arguments            = new MapArguments();
     _conflictDefForSymbol = new ConflictDefinition();
     _conflictDefForLabel  = new ConflictDefinition(new Size(60, 16), true);
 }
예제 #5
0
 public PixelConflictor(ConflictDefinition conflictDef, IMapRuntimeHost host)
 {
     _conflictDef               = conflictDef;
     _host                      = host;
     _resizeHandler             = new EventHandler(_control_SizeChanged);
     _host.OnCanvasSizeChanged += _resizeHandler;
     BuildGrids();
 }
예제 #6
0
파일: Map.cs 프로젝트: configare/hispeed
 public Map(string name, string url)
 {
     _name                 = name;
     _url                  = url;
     _version              = new MapVersion();
     _author               = new MapAuthor();
     _arguments            = new MapArguments();
     _conflictDefForSymbol = new ConflictDefinition();
     _conflictDefForLabel  = new ConflictDefinition(new Size(60, 16), true);
 }
예제 #7
0
파일: Map.cs 프로젝트: configare/hispeed
 internal void SetConflictDefinition(ConflictDefinition sym, ConflictDefinition label)
 {
     if (sym != null)
     {
         _conflictDefForSymbol = sym;
     }
     if (label != null)
     {
         _conflictDefForLabel = label;
     }
 }
예제 #8
0
파일: Map.cs 프로젝트: configare/hispeed
 public Map(string name, string url, MapVersion version, MapAuthor author, MapArguments arg)
 {
     _name    = name;
     _url     = url;
     _version = version;
     _author  = author;
     if (arg == null)
     {
         arg = new MapArguments();
     }
     _arguments            = arg;
     _conflictDefForSymbol = new ConflictDefinition();
     _conflictDefForLabel  = new ConflictDefinition(new Size(60, 16), true);
 }
예제 #9
0
        public static ConflictDefinition FromXElement(XElement ele)
        {
            if (ele == null)
            {
                return(new ConflictDefinition());
            }
            string sizestr = ele.Attribute("gridsize").Value;

            string[]           sizestrs = sizestr.Split(',');
            ConflictDefinition def      = new ConflictDefinition();

            def.GridSize = new Size(int.Parse(sizestrs[0]), int.Parse(sizestrs[1]));
            def.Enabled  = bool.Parse(ele.Attribute("enabled").Value);
            return(def);
        }
예제 #10
0
        private static void GetConflictDef(XDocument doc, out ConflictDefinition sym, out ConflictDefinition label)
        {
            sym   = null;
            label = null;
            var result = doc.Element("Map").Element("ConflictDefinitionSymbol");

            if (result == null)
            {
                return;
            }
            sym    = ConflictDefinition.FromXElement(result.Element("ConflictDefinition") as XElement);
            result = doc.Element("Map").Element("ConflictDefinitionLabel");
            label  = ConflictDefinition.FromXElement(result.Element("ConflictDefinition") as XElement);
            return;
        }
예제 #11
0
 public void Dispose()
 {
     if (_graphics != null)
     {
         _graphics.Dispose();
         _graphics = null;
     }
     if (_bitmap != null)
     {
         _bitmap.Dispose();
         _bitmap = null;
     }
     _host.OnCanvasSizeChanged -= _resizeHandler;
     _resizeHandler             = null;
     //_control.SizeChanged -= _resizeHandler;
     _conflictDef = null;
     //_control = null;
     _host = null;
 }
예제 #12
0
 private static IMap ParseMapFromXml(string filename)
 {
     PersistObject.BeginParse();
     try
     {
         XDocument          doc = XDocument.Load(filename);
         MapAuthor          author = GetMapAuthor(doc);
         MapVersion         version = GetMapVersion(doc);
         MapArguments       arg = GetMapArguments(doc);
         ConflictDefinition csym = null, clabel = null;
         GetConflictDef(doc, out csym, out clabel);
         ILayer[] layers  = GetFeatureLayer(doc);
         string   mapname = doc.Element("Map").Attribute("name").Value;
         Map      map = new Map(mapname, filename, version, author, arg, layers);
         map.SetConflictDefinition(csym, clabel);
         return(map);
     }
     finally
     {
         PersistObject.EndParse();
     }
 }