Exemplo n.º 1
0
        public static void DumpTerrainAll(TerrainManager m)
        {
            using var sfd = new SaveFileDialog
                  {
                      Filter   = "New Horizons Terrain (*.nht)|*.nht|All files (*.*)|*.*",
                      FileName = "terrainAcres.nht",
                  };
            if (sfd.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            var path = sfd.FileName;
            var data = m.DumpAllAcres();

            File.WriteAllBytes(path, data);
        }
Exemplo n.º 2
0
        private void B_DumpAllAcres_Click(object sender, EventArgs e)
        {
            using var sfd = new SaveFileDialog
                  {
                      Filter   = "New Horizons Terrain (*.nht)|*.nht|All files (*.*)|*.*",
                      FileName = $"{CB_Acre.Text}.nht",
                  };
            if (sfd.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            var path = sfd.FileName;
            var data = Terrain.DumpAllAcres();

            File.WriteAllBytes(path, data);
        }