| | |
| | | using System; |
| | | using Newtonsoft.Json; |
| | | using SimuTools.Domain; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace SimuTools.Tools |
| | | { |
| | |
| | | |
| | | public static void Run(string terrainFile, string waterPath, string flowPath, string outPath) |
| | | { |
| | | // |
| | | Layer layer = new Layer(); |
| | | layer.terrain = new Terrain(); |
| | | layer.duration = new Duration(1719812810225L, 1719812810225L); |
| | | layer.extension = new Extension(); |
| | | layer.waters = new Water(); |
| | | |
| | | CreateLayerJson(outPath, layer); |
| | | } |
| | | |
| | | private static void CreateLayerJson(string outPath, Layer layer) |
| | | { |
| | | if (null == layer) return; |
| | | |
| | | String json = JsonConvert.SerializeObject(layer); |
| | | |
| | | string filePath = Path.Combine(outPath, "layer.json"); |
| | | using (StreamWriter sw = new StreamWriter(filePath)) |
| | | { |
| | | sw.Write(json); |
| | | } |
| | | } |
| | | } |
| | | } |