public static bool MainWindowSetFlat()//从主窗口过来的一键设置平原
        {
            Microsoft.Win32.OpenFileDialog op = new Microsoft.Win32.OpenFileDialog();
            op.Filter = "游戏存档文件(farm_*.data)|farm_*.data";
            op.ShowDialog();
            if (op.FileName == "" || op.FileName == null)
            {
                return(false);
            }
            SaveAddress = op.FileName;
            SData.LoadFromSave(SaveAddress, RootData);

            SData chunks = RootData.TurnTo("Chunks");

            foreach (var chunk in chunks.Sons)
            {
                Console.WriteLine(chunk.TurnTo("ChunkPosition").Value);
                chunk.TurnTo("ChunkId").Value = "\"Flat_Chunk\"";
            }
            if (!Directory.Exists(Directory.GetCurrentDirectory() + "\\DataGenerated"))
            {
                Directory.CreateDirectory(Directory.GetCurrentDirectory() + "\\DataGenerated");
            }
            StreamWriter SW0 = new StreamWriter("DataGenerated\\farm_" + TheSaveNumber);

            SData.SaveFromSData(RootData, SW0);
            SW0.Close();
            return(SData.GzipPack());
        }
        private void SaveGame()
        {
            if (!Directory.Exists(Directory.GetCurrentDirectory() + "\\DataGenerated"))
            {
                Directory.CreateDirectory(Directory.GetCurrentDirectory() + "\\DataGenerated");
            }
            StreamWriter SW0 = new StreamWriter("DataGenerated\\farm_" + TheSaveNumber);

            SData.SaveFromSData(RootData, SW0);
            SW0.Close();
            if (SData.GzipPack())
            {
                MessageBox.Show("修改成功!修改后第一次进入游戏并载入存档可能会有较长时间卡顿,请耐心等待。");
            }
            else
            {
                MessageBox.Show("修改失败。");
            }
        }