Esempio n. 1
0
        private void MapForm_Load(object sender, EventArgs e)
        {
            BorderKind.MakeCompatible(BorderKind.Wall, BorderKind.Wall2);
            BorderKind.MakeCompatible(BorderKind.Wall, BorderKind.Water);

            try
            {
                TileSet tileSet = TileSet.Load(@"Data\Simple.mdts");
                Debug.Assert(tileSet != null);

                document.NewMap(tileSet);

                document.FillTerrainList(tileSet);
            }
            catch (FileNotFoundException exception)
            {
                MessageBox.Show("There was an error loading the default tileset. Please ensure you have the .NET Framework version 3.5 installed.\n" + exception.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
                return;
            }
        }