Initial commit

This commit is contained in:
GG Z
2019-05-06 22:07:15 +08:00
commit 029830781e
126 changed files with 10507 additions and 0 deletions

6
LandXML/App.config Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>

58
LandXML/LandXML.csproj Normal file
View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C8D102CB-A711-44AF-BA30-8B3B4CAB4686}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>LandXML</RootNamespace>
<AssemblyName>LandXML</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CorridorModel\CorridorModel.csproj">
<Project>{d8ffa8fe-d920-4a55-a7bb-5381642ce016}</Project>
<Name>CorridorModel</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>C:\Users\ZGG\Desktop\LandXML测试</StartArguments>
<EnableUnmanagedDebugging>true</EnableUnmanagedDebugging>
</PropertyGroup>
</Project>

59
LandXML/Program.cs Normal file
View File

@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;
using CorridorModel;
namespace LandXML
{
class Program
{
static void Main(string[] args)
{
if (args.Length != 1)
throw new ArgumentException("Expected single directory for LandXML loading");
string[] files = Directory.GetFiles(@args[0], "锦龙立交.xml", SearchOption.AllDirectories);
foreach (var file in files)
{
Loader load = new Loader();
Model result = load.Load(file);
//Model m = new Model();
//m = Model.Deserialize(file);
}
}
}
public class Loader
{
public Model Load(string fileName)
{
XmlSerializer xmlSerializer = new XmlSerializer(typeof(Model));
using (FileStream fileStream = File.Open(fileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite))
{
using (NamespaceIgnorantXmlTextReader objXmlReader = new NamespaceIgnorantXmlTextReader(fileStream))
{
return (Model)xmlSerializer.Deserialize(objXmlReader);
}
}
}
}
public class NamespaceIgnorantXmlTextReader : XmlTextReader
{
public NamespaceIgnorantXmlTextReader(Stream reader) : base(reader) { }
public override string NamespaceURI
{
get { return string.Empty; }
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("LandXML")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LandXML")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("c8d102cb-a711-44af-ba30-8b3b4cab4686")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>

Binary file not shown.

View File

@@ -0,0 +1 @@
b35f80db05f9808e6ffbd33797de575deca16f96

View File

@@ -0,0 +1,20 @@
G:\Development\CorridorModel\LandXML\bin\Debug\LandXML.exe.config
G:\Development\CorridorModel\LandXML\bin\Debug\LandXML.exe
G:\Development\CorridorModel\LandXML\bin\Debug\LandXML.pdb
G:\Development\CorridorModel\LandXML\bin\Debug\CorridorModel.dll
G:\Development\CorridorModel\LandXML\bin\Debug\CorridorModel.pdb
G:\Development\CorridorModel\LandXML\obj\Debug\LandXML.csprojAssemblyReference.cache
G:\Development\CorridorModel\LandXML\obj\Debug\LandXML.csproj.CoreCompileInputs.cache
G:\Development\CorridorModel\LandXML\obj\Debug\LandXML.csproj.CopyComplete
G:\Development\CorridorModel\LandXML\obj\Debug\LandXML.exe
G:\Development\CorridorModel\LandXML\obj\Debug\LandXML.pdb
G:\开发\CorridorModel\LandXML\bin\Debug\LandXML.exe.config
G:\开发\CorridorModel\LandXML\bin\Debug\LandXML.exe
G:\开发\CorridorModel\LandXML\bin\Debug\LandXML.pdb
G:\开发\CorridorModel\LandXML\bin\Debug\CorridorModel.dll
G:\开发\CorridorModel\LandXML\bin\Debug\CorridorModel.pdb
G:\开发\CorridorModel\LandXML\obj\Debug\LandXML.csprojAssemblyReference.cache
G:\开发\CorridorModel\LandXML\obj\Debug\LandXML.csproj.CoreCompileInputs.cache
G:\开发\CorridorModel\LandXML\obj\Debug\LandXML.csproj.CopyComplete
G:\开发\CorridorModel\LandXML\obj\Debug\LandXML.exe
G:\开发\CorridorModel\LandXML\obj\Debug\LandXML.pdb

Binary file not shown.

Binary file not shown.