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;
|
|
namespace SimuTools.Tools
|
{
|
public class Handle
|
{
|
public static readonly string BaseDir = AppDomain.CurrentDomain.BaseDirectory;
|
|
public static void Run(string terrainFile, string waterPath, string flowPath, string outPath)
|
{
|
Layer layer = new Layer();
|
layer.terrain = new Terrain();
|
layer.duration = new Duration();
|
layer.extension = new Extension();
|
layer.waters = new Water();
|
|
CopeTerrain(terrainFile, outPath, layer);
|
CopeWater(waterPath, outPath, layer);
|
CopeFlow(flowPath, outPath, layer);
|
CopeLayerJson(outPath, layer);
|
}
|
|
private static void CopeTerrain(string terrainFile, string outPath, Layer layer)
|
{
|
|
}
|
|
private static void CopeWater(string waterPath, string outPath, Layer layer)
|
{
|
|
}
|
|
private static void CopeFlow(string flowPath, string outPath, Layer layer)
|
{
|
|
}
|
|
private static void CopeLayerJson(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);
|
}
|
}
|
}
|
}
|