Esempio n. 1
0
        public static void DumpLayerAcreAll(FieldItemLayer layer)
        {
            using var sfd = new SaveFileDialog
                  {
                      Filter   = "New Horizons Field Item Layer (*.nhl)|*.nhl|All files (*.*)|*.*",
                      FileName = "acres.nhl",
                  };
            if (sfd.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            var path = sfd.FileName;
            var data = layer.DumpAll();

            File.WriteAllBytes(path, data);
        }