| | |
| | | <?xml version="1.0"?> |
| | | <configuration> |
| | | <appSettings> |
| | | <add key="ver" value="0.1"/> |
| | | <add key="sizes" value="64,128,256,512,1024,2048"/> |
| | | </appSettings> |
| | | <startup> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace SimuTools.Domain |
| | | { |
| | | public class Duration |
| | | { |
| | | private long start { set; get; } |
| | | |
| | | private long end { set; get; } |
| | | |
| | | public Duration() { } |
| | | |
| | | public Duration(long start, long end) |
| | | { |
| | | this.start = start; |
| | | this.end = end; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace SimuTools.Domain |
| | | { |
| | | public class Extension |
| | | { |
| | | private double minx { set; get; } |
| | | |
| | | private double miny { set; get; } |
| | | |
| | | private double maxx { set; get; } |
| | | |
| | | private double maxy { set; get; } |
| | | |
| | | private double minHeight { set; get; } |
| | | |
| | | private double maxHeight { set; get; } |
| | | |
| | | public Extension() { } |
| | | |
| | | public Extension(double minx, double miny, double maxx, double maxy) |
| | | { |
| | | this.minx = minx; |
| | | this.miny = miny; |
| | | this.maxx = maxx; |
| | | this.maxy = maxy; |
| | | } |
| | | |
| | | public Extension(double minHeight, double maxHeight) |
| | | { |
| | | this.minHeight = minHeight; |
| | | this.maxHeight = maxHeight; |
| | | } |
| | | |
| | | public Extension(double minx, double miny, double maxx, double maxy, double minHeight, double maxHeight) |
| | | { |
| | | this.minx = minx; |
| | | this.miny = miny; |
| | | this.maxx = maxx; |
| | | this.maxy = maxy; |
| | | this.minHeight = minHeight; |
| | | this.maxHeight = maxHeight; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Configuration; |
| | | using System.Linq; |
| | | using System.Net.NetworkInformation; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace SimuTools.Domain |
| | | { |
| | | public class Layer |
| | | { |
| | | private String version { set; get; } |
| | | |
| | | private Duration duration { set; get; } |
| | | |
| | | private Extension extension { set; get; } |
| | | |
| | | private Terrain terrain { set; get; } |
| | | |
| | | private Water waters { set; get; } |
| | | |
| | | public Layer() |
| | | { |
| | | string ver = ConfigurationManager.AppSettings["ver"]; |
| | | if (!string.IsNullOrEmpty(ver)) |
| | | { |
| | | this.version = ver; |
| | | } |
| | | } |
| | | |
| | | public Layer(string version, Duration duration, Extension extension, Terrain terrain, Water waters) |
| | | { |
| | | this.version = version; |
| | | this.duration = duration; |
| | | this.extension = extension; |
| | | this.terrain = terrain; |
| | | this.waters = waters; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Configuration; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace SimuTools.Domain |
| | | { |
| | | public class Terrain |
| | | { |
| | | private List<int[]> size { set; get; } |
| | | |
| | | public Terrain() |
| | | { |
| | | size = new List<int[]>(); |
| | | |
| | | string str = ConfigurationManager.AppSettings["sizes"]; |
| | | if (string.IsNullOrEmpty(str)) return; |
| | | |
| | | string[] strs = str.Split(','); |
| | | foreach (string s in strs) |
| | | { |
| | | int i; |
| | | if (int.TryParse(s, out i)) |
| | | { |
| | | size.Add(new int[] { i, i }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public Terrain(List<int[]> size) |
| | | { |
| | | this.size = size; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace SimuTools.Domain |
| | | { |
| | | public class Water |
| | | { |
| | | private List<long> data { set; get; } |
| | | |
| | | public Water() { } |
| | | |
| | | public Water(List<long> data) |
| | | { |
| | | this.data = data; |
| | | } |
| | | } |
| | | } |
| | |
| | | <HintPath>dlls\log4net4.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Configuration" /> |
| | | <Reference Include="System.Core" /> |
| | | <Reference Include="System.Xml.Linq" /> |
| | | <Reference Include="System.Data.DataSetExtensions" /> |
| | |
| | | <Reference Include="System.Xml" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="Domain\Duration.cs" /> |
| | | <Compile Include="Domain\Extension.cs" /> |
| | | <Compile Include="Domain\Layer.cs" /> |
| | | <Compile Include="Domain\Terrain.cs" /> |
| | | <Compile Include="Domain\Water.cs" /> |
| | | <Compile Include="FrmMain.cs"> |
| | | <SubType>Form</SubType> |
| | | </Compile> |
| | |
| | | <Content Include="dlls\osr_csharp.dll" /> |
| | | <Content Include="dlls\osr_wrap.dll" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Folder Include="Domain\" /> |
| | | </ItemGroup> |
| | | <ItemGroup /> |
| | | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
| | | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
| | | Other similar extension points exist, see Microsoft.Common.targets. |