From d6e6dd4ac9719c491bf9d570c87ece759b0fbc6a Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期二, 08 十一月 2022 20:30:24 +0800 Subject: [PATCH] 1 --- ExportMap/cs/ExportUtil.cs | 35 +++++++++++++++++ ExportMap/ExportMap.csproj | 32 ++++++++++++++++ 2 files changed, 67 insertions(+), 0 deletions(-) diff --git a/ExportMap/ExportMap.csproj b/ExportMap/ExportMap.csproj index 6e7fa2b..1f75eb9 100644 --- a/ExportMap/ExportMap.csproj +++ b/ExportMap/ExportMap.csproj @@ -104,7 +104,11 @@ <Content Include="js\jquery.1.12.4.js" /> <Content Include="js\rollups.js" /> <Content Include="js\rsa.min.js" /> + <Content Include="Sources\logo.png" /> <Content Include="Sources\render.py" /> + <Content Include="Sources\shps\SITEPOINT.shp.xml" /> + <Content Include="Sources\shps\STATIONSERIES.shp.xml" /> + <Content Include="Sources\shps\VALVEHOUSEPOINT.shp.xml" /> <Content Include="Test.html" /> <Content Include="Web.config"> <SubType>Designer</SubType> @@ -116,6 +120,7 @@ <Compile Include="Controllers\licenseEncryptionController.cs" /> <Compile Include="cs\CacheUtil.cs" /> <Compile Include="cs\CustomMultipartFormDataStreamProvider.cs" /> + <Compile Include="cs\ExportUtil.cs" /> <Compile Include="cs\NoBufferPolicySelector.cs" /> <Compile Include="cs\Tool.cs" /> <Compile Include="db\ModelHandler.cs" /> @@ -139,6 +144,33 @@ <Content Include="Sources\Test.qpt" /> <Content Include="Sources\Test.qgz" /> </ItemGroup> + <ItemGroup> + <Content Include="Sources\shps\SITEPOINT.cpg" /> + <Content Include="Sources\shps\SITEPOINT.dbf" /> + <Content Include="Sources\shps\SITEPOINT.prj" /> + <Content Include="Sources\shps\SITEPOINT.qix" /> + <Content Include="Sources\shps\SITEPOINT.sbn" /> + <Content Include="Sources\shps\SITEPOINT.sbx" /> + <Content Include="Sources\shps\SITEPOINT.shi" /> + <Content Include="Sources\shps\SITEPOINT.shp" /> + <Content Include="Sources\shps\SITEPOINT.shx" /> + <Content Include="Sources\shps\STATIONSERIES.cpg" /> + <Content Include="Sources\shps\STATIONSERIES.dbf" /> + <Content Include="Sources\shps\STATIONSERIES.prj" /> + <Content Include="Sources\shps\STATIONSERIES.qix" /> + <Content Include="Sources\shps\STATIONSERIES.shi" /> + <Content Include="Sources\shps\STATIONSERIES.shp" /> + <Content Include="Sources\shps\STATIONSERIES.shx" /> + <Content Include="Sources\shps\VALVEHOUSEPOINT.cpg" /> + <Content Include="Sources\shps\VALVEHOUSEPOINT.dbf" /> + <Content Include="Sources\shps\VALVEHOUSEPOINT.prj" /> + <Content Include="Sources\shps\VALVEHOUSEPOINT.qix" /> + <Content Include="Sources\shps\VALVEHOUSEPOINT.sbn" /> + <Content Include="Sources\shps\VALVEHOUSEPOINT.sbx" /> + <Content Include="Sources\shps\VALVEHOUSEPOINT.shi" /> + <Content Include="Sources\shps\VALVEHOUSEPOINT.shp" /> + <Content Include="Sources\shps\VALVEHOUSEPOINT.shx" /> + </ItemGroup> <PropertyGroup> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> diff --git a/ExportMap/cs/ExportUtil.cs b/ExportMap/cs/ExportUtil.cs new file mode 100644 index 0000000..0f6a4be --- /dev/null +++ b/ExportMap/cs/ExportUtil.cs @@ -0,0 +1,35 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Configuration; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Web; + +namespace LFServer.cs +{ + public class ExportUtil + { + public static void ExecPython(string py, string qgz, string qpt) + { + try + { + string args = string.Format("{0} -qgz {1} -qpt {2}", py, qgz, qpt); + + Process p = new Process(); + p.StartInfo.UseShellExecute = false; + p.StartInfo.ErrorDialog = true; + p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; + p.StartInfo.RedirectStandardError = false; + p.StartInfo.FileName = "python"; + p.StartInfo.Arguments = args; + p.StartInfo.CreateNoWindow = true; + + p.Start(); + } + catch + { + } + } + } +} -- Gitblit v1.9.3