private void LoadMap(string Path)
        {
            string MapLogicName = FilePath.Substring(0, FilePath.Length - 4).Substring(22);

            BattleMapViewer.Preload();
            ConquestMap ActiveConquestMap = new ConquestMap(MapLogicName, 0, null);

            Helper = new ConquestMapHelper(ActiveConquestMap);
            InitMap(ActiveConquestMap);

            this.Text = BattleMapViewer.ActiveMap.MapName + " - Project Eternity Conquest Map Editor";
        }
예제 #2
0
        public ProjectEternityConquestEditor(string FilePath, object[] Params)
            : this()
        {
            this.FilePath = FilePath;
            if (!File.Exists(FilePath))
            {
                FileStream fs = File.Create(FilePath);
                fs.Close();
                ConquestMap NewMap = new ConquestMap(FilePath, string.Empty, null);
                ActiveMap = BattleMapViewer.ActiveMap = NewMap;
                NewMap.ListLayer.Add(new MapLayer(NewMap));

                SaveItem(FilePath, FilePath);
            }

            LoadMap(FilePath);
        }
        public ProjectEternityConquestEditor(string FilePath, object[] Params)
            : this()
        {
            this.FilePath = FilePath;
            if (!File.Exists(FilePath))
            {
                FileStream fs = File.Create(FilePath);
                fs.Close();
                ConquestMap NewMap = new ConquestMap(FilePath, 0, null);
                ActiveMap = BattleMapViewer.ActiveMap = NewMap;
                NewMap.ListLayer.Add(new MapLayer(NewMap, NewMap.ListBackgrounds, NewMap.ListForegrounds));
                BattleMapViewer.ActiveMap.ArrayMultiplayerColor = new Color[] { Color.Turquoise, Color.White, Color.SteelBlue, Color.Silver, Color.SandyBrown, Color.Salmon, Color.Purple, Color.PaleGreen, Color.Orange, Color.Gold, Color.ForestGreen, Color.Firebrick, Color.Chartreuse, Color.Beige, Color.DeepPink, Color.DarkMagenta };

                SaveItem(FilePath, FilePath);
            }

            LoadMap(FilePath);
        }
 public ConquestMapHelper(ConquestMap ActiveMap)
 {
     this.ActiveMap = ActiveMap;
 }