示例#1
0
 private static void Start(string worldName, double worldSize, object[] cities, double[] center, string title)
 {
     IsHiRes    = false;
     currentMap = new MapInfos()
     {
         worldSize = worldSize,
         worldName = worldName.ToLowerInvariant(),
         center    = new System.Collections.Generic.List <int>()
         {
             (int)worldSize / 2, (int)worldSize / 2
         },                                                                                              //center.Select(i => (int)i).ToList(),
         title  = title,
         cities = cities.Cast <object[]>().Select(c => new CityInfos()
         {
             name = (string)c[0],
             x    = (double)((object[])c[1])[0],
             y    = (double)((object[])c[1])[1]
         }).ToList(),
         tilePattern = "/maps/" + worldName.ToLowerInvariant() + "/{z}/{x}/{y}.png",
         attribution = "&copy; Bohemia Interactive"
     };
     mapDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Arma3MapExporter", "maps", currentMap.worldName);
     if (!Directory.Exists(mapDataPath))
     {
         Directory.CreateDirectory(mapDataPath);
     }
 }
示例#2
0
 private static void Stop()
 {
     if (FullImage != null)
     {
         SplitFullImage();
         FullImage = null;
     }
     mapDataPath = null;
     currentMap  = null;
 }
示例#3
0
 private static void Dispose()
 {
     if (FullImage != null)
     {
         FullImage.Dispose();
         FullImage = null;
     }
     mapDataPath = null;
     currentMap  = null;
     IsHiRes     = false;
 }