init lserp cs 5.0
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lskj.BrowserShell", "Lskj.BrowserShell\Lskj.BrowserShell.csproj", "{CB0E51A4-14FF-4524-B854-752E00E677F5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{CB0E51A4-14FF-4524-B854-752E00E677F5}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{CB0E51A4-14FF-4524-B854-752E00E677F5}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{CB0E51A4-14FF-4524-B854-752E00E677F5}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{CB0E51A4-14FF-4524-B854-752E00E677F5}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{CB0E51A4-14FF-4524-B854-752E00E677F5}.Debug|x86.Build.0 = Debug|x86
|
||||
{CB0E51A4-14FF-4524-B854-752E00E677F5}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{CB0E51A4-14FF-4524-B854-752E00E677F5}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{CB0E51A4-14FF-4524-B854-752E00E677F5}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{CB0E51A4-14FF-4524-B854-752E00E677F5}.Release|x86.ActiveCfg = Release|x86
|
||||
{CB0E51A4-14FF-4524-B854-752E00E677F5}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using CommonLib.utils;
|
||||
|
||||
namespace Lskj.BrowserShell
|
||||
{
|
||||
/// <summary>
|
||||
/// c#库被调用统一接口类
|
||||
/// </summary>
|
||||
public sealed class DllBaseClass : IForm
|
||||
{
|
||||
public DllBaseClass()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DllBaseClass(string[] obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
FrmMain frm = new FrmMain();
|
||||
SubForm = frm;
|
||||
frm.FormText = obj[0];
|
||||
frm.OperatorId = obj[1];
|
||||
frm.OperatorName = obj[2];
|
||||
frm.Privilege = obj[3];
|
||||
frm.DLLCoid = obj[4];
|
||||
|
||||
if (obj.Length > 6)
|
||||
frm.TargetDLLCoid = obj[6];
|
||||
if (obj.Length > 7)
|
||||
frm.BetweenDLLCoid = obj[7];
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 窗口
|
||||
/// </summary>
|
||||
public Form SubForm { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
namespace Lskj.BrowserShell
|
||||
{
|
||||
partial class FrmMain
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows 窗体设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// FrmMain
|
||||
//
|
||||
this.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Appearance.Options.UseFont = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(824, 525);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.LookAndFeel.SkinName = "Office 2010 Blue";
|
||||
this.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Office2003;
|
||||
this.Name = "FrmMain";
|
||||
this.Text = "朗速浏览器";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using CommonLib.data;
|
||||
using CommonLib;
|
||||
using System.Web;
|
||||
using Lskj.Common;
|
||||
|
||||
namespace Lskj.BrowserShell
|
||||
{
|
||||
public partial class FrmMain : FormBase
|
||||
{
|
||||
public string TargetDLLCoid;
|
||||
public string BetweenDLLCoid;
|
||||
public FrmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:窗体加载时</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-09-01 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string urlStart = SqlHelper.ExecuteDataTable("select OAUrl from P_systemTab").Rows[0]["OAUrl"] + "";
|
||||
string urlEnd = string.IsNullOrEmpty(TargetDLLCoid) ? DLLCoid : HttpUtility.UrlEncode(PubClass.ReqSqlParam(TargetDLLCoid, OperatorId, OperatorName));
|
||||
string urlBetween = string.IsNullOrEmpty(BetweenDLLCoid) ? null : PubClass.ReqSqlParam(BetweenDLLCoid, OperatorId, OperatorName);
|
||||
string sqlValue = string.Format("select Password from P_employeeTab where employeeid='{0}'", OperatorId);
|
||||
DataTable table = SqlHelper.ExecuteDataTable(sqlValue);
|
||||
if (table != null && table.Rows.Count > 0)
|
||||
{
|
||||
urlEnd = urlEnd.Replace("{password}", table.Rows[0]["Password"] + "");
|
||||
}
|
||||
string url = urlStart + urlBetween + urlEnd;
|
||||
ModuleWebView previewFrm = new ModuleWebView();
|
||||
previewFrm.Dock = DockStyle.Fill;
|
||||
previewFrm.Navigate(url, 1);
|
||||
this.Controls.Add(previewFrm);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//LogHelper.Instance.WriteError(ex, "浏览器dll");
|
||||
//MessageUtil.Show(ex.Message + "\r\n" + ex.StackTrace);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,166 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.IO;
|
||||
|
||||
namespace Lskj.BrowserShell
|
||||
{
|
||||
/// <summary>
|
||||
/// Ini 文件操作类
|
||||
/// </summary>
|
||||
public static class IniHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 写入INI文件
|
||||
/// </summary>
|
||||
/// <param name="section">节点名称[如[TypeName]]</param>
|
||||
/// <param name="key">键</param>
|
||||
/// <param name="val">值</param>
|
||||
/// <param name="filepath">文件路径</param>
|
||||
/// <returns></returns>
|
||||
[DllImport("kernel32")]
|
||||
private static extern long WritePrivateProfileString(string section, string key, string val, string filepath);
|
||||
/// <summary>
|
||||
/// 读取INI文件
|
||||
/// </summary>
|
||||
/// <param name="section">节点名称</param>
|
||||
/// <param name="key">键</param>
|
||||
/// <param name="def">值</param>
|
||||
/// <param name="retval">stringbulider对象</param>
|
||||
/// <param name="size">字节大小</param>
|
||||
/// <param name="filePath">文件路径</param>
|
||||
/// <returns></returns>
|
||||
[DllImport("kernel32")]
|
||||
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retval, int size, string filePath);
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:写入Ini文件(以键值对的形式存放)</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-07-22</para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="key">键</param>
|
||||
/// <param name="value">值</param>
|
||||
/// <returns></returns>
|
||||
public static void Write(string key, string value)
|
||||
{
|
||||
try
|
||||
{
|
||||
//根据INI文件名设置要写入INI文件的节点名称
|
||||
//此处的节点名称完全可以根据实际需要进行配置
|
||||
string filePath = PubUtil.MainMenuConfigPath;
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
File.Create(filePath);
|
||||
}
|
||||
string fileName = Path.GetFileNameWithoutExtension(filePath);
|
||||
WritePrivateProfileString(fileName, key, value, filePath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:通过Key获取Value值</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-07-22</para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="key">键</param>
|
||||
/// <returns>值</returns>
|
||||
public static string Read(string key)
|
||||
{
|
||||
string value = string.Empty;
|
||||
try
|
||||
{
|
||||
//判读INI文件是否存在
|
||||
string filePath = PubUtil.MainMenuConfigPath;
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
StringBuilder temp = new StringBuilder(1024);
|
||||
string fileName = Path.GetFileNameWithoutExtension(filePath);
|
||||
GetPrivateProfileString(fileName, key, "", temp, 1024, filePath);
|
||||
|
||||
return temp + "";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:写入Ini文件(以键值对的形式存放)</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-07-22</para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="key">键</param>
|
||||
/// <param name="value">值</param>
|
||||
/// <returns></returns>
|
||||
public static void Write(string iniName, string key, string value)
|
||||
{
|
||||
try
|
||||
{
|
||||
//根据INI文件名设置要写入INI文件的节点名称
|
||||
//此处的节点名称完全可以根据实际需要进行配置
|
||||
string filePath = Path.Combine(new string[] { PubUtil.AbsolutelyPath + iniName });
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
File.Create(filePath);
|
||||
}
|
||||
string fileName = Path.GetFileNameWithoutExtension(filePath);
|
||||
WritePrivateProfileString(fileName, key, value, filePath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:通过Key获取Value值</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-07-22</para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="key">键</param>
|
||||
/// <returns>值</returns>
|
||||
public static string Read(string iniName, string key)
|
||||
{
|
||||
string value = string.Empty;
|
||||
try
|
||||
{
|
||||
//判读INI文件是否存在
|
||||
string filePath = Path.Combine(new string[] { PubUtil.AbsolutelyPath + iniName });
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
StringBuilder temp = new StringBuilder(1024);
|
||||
string fileName = Path.GetFileNameWithoutExtension(filePath);
|
||||
GetPrivateProfileString(fileName, key, "", temp, 1024, filePath);
|
||||
|
||||
return temp + "";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{CB0E51A4-14FF-4524-B854-752E00E677F5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Lskj.BrowserShell</RootNamespace>
|
||||
<AssemblyName>Lskj.BrowserShell</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\publish\lib\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevExpress.Data.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\publish\DevExpress.Data.v13.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Utils.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\publish\DevExpress.Utils.v13.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraEditors.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\publish\DevExpress.XtraEditors.v13.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Geckofx-Core">
|
||||
<HintPath>D:\lserp\引用DLL\Geckofx-Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Geckofx-Winforms">
|
||||
<HintPath>D:\lserp\引用DLL\Geckofx-Winforms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FrmMain.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmMain.Designer.cs">
|
||||
<DependentUpon>FrmMain.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="IniHelper.cs" />
|
||||
<Compile Include="ModuleWebView.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ModuleWebView.Designer.cs">
|
||||
<DependentUpon>ModuleWebView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DllBaseClass.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="PubUtil.cs" />
|
||||
<EmbeddedResource Include="FrmMain.resx">
|
||||
<DependentUpon>FrmMain.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ModuleWebView.resx">
|
||||
<DependentUpon>ModuleWebView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\CommonLib\CommonLib.csproj">
|
||||
<Project>{3E8E6529-5D8A-4F17-8C41-27CD7380178D}</Project>
|
||||
<Name>CommonLib</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\ControlLib\ControlLib.csproj">
|
||||
<Project>{73C024E7-D9DC-44C3-BABC-2AA1544ECCF9}</Project>
|
||||
<Name>ControlLib</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Lskj.Common\Lskj.Common.csproj">
|
||||
<Project>{DE7EFD7F-2DFE-4D50-A578-452A2DBFD088}</Project>
|
||||
<Name>Lskj.Common</Name>
|
||||
</ProjectReference>
|
||||
</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.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,57 @@
|
||||
namespace Lskj.BrowserShell
|
||||
{
|
||||
partial class ModuleWebView
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.panel = new System.Windows.Forms.Panel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel
|
||||
//
|
||||
this.panel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel.Name = "panel";
|
||||
this.panel.Size = new System.Drawing.Size(767, 532);
|
||||
this.panel.TabIndex = 0;
|
||||
//
|
||||
// ModuleWebView
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.panel);
|
||||
this.Name = "ModuleWebView";
|
||||
this.Size = new System.Drawing.Size(767, 532);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Gecko.Events;
|
||||
using Gecko;
|
||||
using System.IO;
|
||||
|
||||
namespace Lskj.BrowserShell
|
||||
{
|
||||
public partial class ModuleWebView : UserControl
|
||||
{
|
||||
public ModuleWebView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public GeckoWebBrowser browser;
|
||||
public WebBrowser browserNew;
|
||||
public static bool Evenflag;
|
||||
public bool RightKeyflag;
|
||||
public EventHandler<GeckoNavigatingEventArgs> OnNavigating;
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:打开网页</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2019-03-14 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public void Navigate(string url, int RightKeyFlag=1)
|
||||
{
|
||||
this.RightKeyflag = RightKeyFlag == 1;
|
||||
Navigate(url, GeckoLoadFlags.None);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2019-12-24 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="url">The URL.</param>
|
||||
/// <param name="flag">The flag.</param>
|
||||
public void Navigate(string url, GeckoLoadFlags flag)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Directory.Exists(PubUtil.WebViewPath) && File.Exists(Path.Combine(PubUtil.WebViewPath, "crashreporter.exe")))
|
||||
{
|
||||
//url = url + "&t=" + DateTime.Now.Ticks;
|
||||
if (browser != null)
|
||||
{
|
||||
browser.Dispose();
|
||||
browser = null;
|
||||
}
|
||||
Xpcom.Initialize(PubUtil.WebViewPath);
|
||||
browser = new GeckoWebBrowser();
|
||||
browser.Dock = DockStyle.Fill;
|
||||
browser.Name = "browser";
|
||||
browser.NoDefaultContextMenu = !RightKeyflag; //禁用右键菜单
|
||||
if (OnNavigating != null)
|
||||
{
|
||||
browser.Navigating += OnNavigating;
|
||||
}
|
||||
this.panel.Controls.Add(browser);
|
||||
if (!Evenflag)
|
||||
{
|
||||
//Gecko.LauncherDialog.Download += new EventHandler<LauncherDialogEvent>(OnLauncherDialogDownload);
|
||||
//Evenflag = true;
|
||||
}
|
||||
browser.Navigate(url, flag);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("未找到浏览器资源文件,请联系开发人员.");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("浏览器出错!" + ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的常规信息通过以下
|
||||
// 特性集控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Lskj.BrowserShell")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Lskj.BrowserShell")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 使此程序集中的类型
|
||||
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
|
||||
// 则将该类型上的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("4ed7b1b7-b05f-4ee4-9fe3-d87c7a8ad92e")]
|
||||
|
||||
// 程序集的版本信息由下面四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 内部版本号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Lskj.BrowserShell.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lskj.BrowserShell.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用此强类型资源类,为所有资源查找
|
||||
/// 重写当前线程的 CurrentUICulture 属性。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Lskj.BrowserShell.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,199 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
namespace Lskj.BrowserShell
|
||||
{
|
||||
/// <summary>
|
||||
/// 程序通用方法管理类
|
||||
/// </summary>
|
||||
public sealed class PubUtil
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>说明:获取应用程序启动目录</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-08-21 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <returns>System.String.</returns>
|
||||
public static string AbsolutelyPath
|
||||
{
|
||||
get { return Application.StartupPath + "\\"; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取应用程序启动目录下的Lib目录
|
||||
/// </summary>
|
||||
/// <value>The absolutely library path.</value>
|
||||
public static string AbsolutelyLibPath
|
||||
{
|
||||
get { return AbsolutelyPath + "Lib/"; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取应用程序启动目录下的Browser目录
|
||||
/// </summary>
|
||||
/// <value>The absolutely browser path.</value>
|
||||
public static string AbsolutelyBrowserPath
|
||||
{
|
||||
get { return AbsolutelyPath + "Browser/"; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取应用程序启动目录下的小平台目录
|
||||
/// </summary>
|
||||
/// <value>The absolutely small client path.</value>
|
||||
public static string AbsolutelySmallClientPath
|
||||
{
|
||||
get { return AbsolutelyPath + "Client.exe"; }
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:获取附件下载存放临时目录</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-11-01 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <returns>System.String.</returns>
|
||||
public static string FileDownLoadTempPath
|
||||
{
|
||||
get
|
||||
{
|
||||
string path = AbsolutelyPath + "TempFiles/";
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取打印文件路径
|
||||
/// </summary>
|
||||
/// <value>The print file absolutely path.</value>
|
||||
public static string PrintFileAbsolutelyPath
|
||||
{
|
||||
get { return AbsolutelyPath + "Lib/P_PubPrint.lsp"; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取新版打印文件路径
|
||||
/// </summary>
|
||||
/// <value>The print file absolutely path.</value>
|
||||
public static string PrintFileAbsolutelyPath70
|
||||
{
|
||||
get { return AbsolutelyPath + "Lib/p_pubprint70.lsp"; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 附件exe文件路径
|
||||
/// </summary>
|
||||
/// <value>The name of the file executable.</value>
|
||||
public static string AbsolutelyFileUploadPath
|
||||
{
|
||||
get { return AbsolutelyPath + "Attach/LSTest.exe"; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 主界面模块图片加载路径
|
||||
/// </summary>
|
||||
/// <value>The main menu default image.</value>
|
||||
public static string MainMenuDefaultImage
|
||||
{
|
||||
get { return BitMapPath + "Main/Module/"; }
|
||||
}
|
||||
public static string MesItemImage
|
||||
{
|
||||
get { return BitMapPath + "MesItem/"; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 主界面、登录界面、子系统图片存放位置
|
||||
/// </summary>
|
||||
/// <value>The bit map path.</value>
|
||||
public static string BitMapPath
|
||||
{
|
||||
get { return AbsolutelyPath + "Images/"; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 身份证阅读器图片存放位置
|
||||
/// </summary>
|
||||
/// <value>The identifier card bit map path.</value>
|
||||
public static string IDCardBitMapPath
|
||||
{
|
||||
get
|
||||
{
|
||||
string filePath = AbsolutelyPath + "Card\\";
|
||||
if (!Directory.Exists(filePath))
|
||||
Directory.CreateDirectory(filePath);
|
||||
return filePath;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 模块配置文件存放路径
|
||||
/// </summary>
|
||||
/// <value>The main menu configuration path.</value>
|
||||
public static string MainMenuConfigPath
|
||||
{
|
||||
get { return AbsolutelyPath + "MenuConfig.ini"; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Excel模板路径
|
||||
/// </summary>
|
||||
/// <value>The menu excel path.</value>
|
||||
public static string MenuExcelPath
|
||||
{
|
||||
get
|
||||
{
|
||||
string filePath = AbsolutelyPath + "Templete/";
|
||||
if (!Directory.Exists(filePath))
|
||||
{
|
||||
Directory.CreateDirectory(filePath);
|
||||
}
|
||||
return filePath;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 打印模板 repx文件存放地址
|
||||
/// </summary>
|
||||
public static string PrintModePath
|
||||
{
|
||||
get
|
||||
{
|
||||
string filePath = AbsolutelyPath + "Reports\\";
|
||||
if (!Directory.Exists(filePath))
|
||||
{
|
||||
Directory.CreateDirectory(filePath);
|
||||
}
|
||||
return filePath;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 打印模板语言包存放位置
|
||||
/// </summary>
|
||||
public static string PrintModeResourcePath
|
||||
{
|
||||
get
|
||||
{
|
||||
return AbsolutelyPath + "Localization\\Chinese (Simplified).frl";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 软件升级日志
|
||||
/// </summary>
|
||||
/// <value>The system update log path.</value>
|
||||
public static string SystemUpdateLogPath
|
||||
{
|
||||
get { return AbsolutelyPath + "\\Log.txt"; }
|
||||
}
|
||||
/// <summary>
|
||||
/// WebView2
|
||||
/// </summary>
|
||||
/// <value>The system update log path.</value>
|
||||
public static string WebViewPath
|
||||
{
|
||||
get { return AbsolutelyPath + "\\Browser2\\"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
Reference in New Issue
Block a user