Commit 483cd533 authored by 朱天博's avatar 朱天博

Merge branch 'master' of http://192.168.1.181/root/Ftt_Common

parents 6a6f312c be173998
...@@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tools", "Tools\Tools.csproj ...@@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tools", "Tools\Tools.csproj
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ftt.PatchPack", "Ftt.PatchPack\Ftt.PatchPack.csproj", "{42E384C1-CC13-494D-90E2-33C399E13F07}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ftt.PatchPack", "Ftt.PatchPack\Ftt.PatchPack.csproj", "{42E384C1-CC13-494D-90E2-33C399E13F07}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj", "{1447F8DF-E552-40DD-8F02-B55D75FBC77A}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -55,6 +57,18 @@ Global ...@@ -55,6 +57,18 @@ Global
{42E384C1-CC13-494D-90E2-33C399E13F07}.Release|x64.Build.0 = Release|Any CPU {42E384C1-CC13-494D-90E2-33C399E13F07}.Release|x64.Build.0 = Release|Any CPU
{42E384C1-CC13-494D-90E2-33C399E13F07}.Release|x86.ActiveCfg = Release|Any CPU {42E384C1-CC13-494D-90E2-33C399E13F07}.Release|x86.ActiveCfg = Release|Any CPU
{42E384C1-CC13-494D-90E2-33C399E13F07}.Release|x86.Build.0 = Release|Any CPU {42E384C1-CC13-494D-90E2-33C399E13F07}.Release|x86.Build.0 = Release|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Debug|x64.ActiveCfg = Debug|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Debug|x64.Build.0 = Debug|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Debug|x86.ActiveCfg = Debug|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Debug|x86.Build.0 = Debug|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Release|Any CPU.Build.0 = Release|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Release|x64.ActiveCfg = Release|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Release|x64.Build.0 = Release|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Release|x86.ActiveCfg = Release|Any CPU
{1447F8DF-E552-40DD-8F02-B55D75FBC77A}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
...@@ -6,6 +6,48 @@ using System.Threading.Tasks; ...@@ -6,6 +6,48 @@ using System.Threading.Tasks;
namespace Tools.MyCommon namespace Tools.MyCommon
{ {
/*
* Info : 全局的基础信息
*/
/// <summary>
/// 模块信息:菜单渲染时使用
/// </summary>
public class ModuleInfo
{
/// <summary>
/// 窗体对象
/// </summary>
public Type ViewFormType { get; set; }
/// <summary>
/// 显示名称
/// </summary>
public string Text { get; set; }
/// <summary>
/// 提示内容
/// </summary>
public string ToolTipText { get; set; }
}
/// <summary>
/// 绑定信息
/// </summary>
public class BindInfo
{
/// <summary>
/// 绑定的数据源列名称
/// </summary>
public string ColumnName { get; set; }
/// <summary>
/// 绑定的控件属性名称
/// </summary>
public string PropertyName { get; set; }
}
/*
* Type:为部分模块提供相对规范的类型区分
*/
/// <summary> /// <summary>
/// 配置类型 /// 配置类型
/// </summary> /// </summary>
...@@ -46,22 +88,5 @@ namespace Tools.MyCommon ...@@ -46,22 +88,5 @@ namespace Tools.MyCommon
/// </summary> /// </summary>
public static string Doc => "Doc"; public static string Doc => "Doc";
} }
/// <summary>
/// 模块信息
/// </summary>
public class ModuleInfo
{
/// <summary>
/// 窗体对象
/// </summary>
public Type FrmView { get; set; }
/// <summary>
/// 显示名称
/// </summary>
public string Text { get; set; }
/// <summary>
/// 提示内容
/// </summary>
public string ToolTipText { get; set; }
}
} }
...@@ -23,6 +23,10 @@ namespace Tools.MyCommon ...@@ -23,6 +23,10 @@ namespace Tools.MyCommon
/// 全局数据集:应该在InitData()中进行初始化 /// 全局数据集:应该在InitData()中进行初始化
/// </summary> /// </summary>
DataSet _ds { get; set; } DataSet _ds { get; set; }
/// <summary>
/// 模块表集合:通用保存必须初始化该项
/// </summary>
List<TQuery> ModuleTableList { get; set; }
/// <summary> /// <summary>
/// 初始化数据库访问对象 /// 初始化数据库访问对象
......
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
...@@ -27,6 +28,10 @@ namespace Tools.MyCommon ...@@ -27,6 +28,10 @@ namespace Tools.MyCommon
/// 全局数据集 /// 全局数据集
/// </summary> /// </summary>
public DataSet _ds { get; set; } public DataSet _ds { get; set; }
/// <summary>
/// 模块表集合-用于保存
/// </summary>
public List<TQuery> ModuleTableList { get; set; }
/// <summary> /// <summary>
/// 构造函数 /// 构造函数
...@@ -88,7 +93,11 @@ namespace Tools.MyCommon ...@@ -88,7 +93,11 @@ namespace Tools.MyCommon
/// <returns></returns> /// <returns></returns>
public virtual bool SaveCheck() public virtual bool SaveCheck()
{ {
//保存之前的检查,全部放到此方法处理 //结束编辑
this.BaseInfoEndEdit();
this.DataGridViewCommitEditCell(this);
this.DataSetEndEdit(this._ds);
return true; return true;
} }
/// <summary> /// <summary>
...@@ -97,8 +106,155 @@ namespace Tools.MyCommon ...@@ -97,8 +106,155 @@ namespace Tools.MyCommon
/// <returns></returns> /// <returns></returns>
public virtual bool Save() public virtual bool Save()
{ {
//保存的逻辑放到此方法内实现 //保存检查
if (this._ds == null || !this.SaveCheck())
return false;
//未修改提示
if (!this._ds.HasChanges())
{
Utils.Tip("数据未修改!");
return true;
}
//保存数据
if (this._db.SaveData(this._ds.GetChanges(), this.ModuleTableList))
{
Utils.Tip("保存成功!");
}
return true; return true;
} }
#region 结束编辑
/// <summary>
/// 基本信息-结束编辑
/// </summary>
private void BaseInfoEndEdit()
{
BindingManagerBase bm;
foreach (DictionaryEntry item in this.BindingContext)
{
bm = (item.Value as WeakReference).Target as BindingManagerBase;
if (bm != null)
{
bm.EndCurrentEdit();
}
}
}
/// <summary>
/// 数据表格-提交编辑单元格
/// </summary>
/// <param name="root"></param>
private void DataGridViewCommitEditCell(Control root)
{
foreach (Control c in root.Controls)
{
if (c is DataGridView dgv)
{
dgv.CommitEdit(DataGridViewDataErrorContexts.Display);
continue;
}
//递归子控件
if (c.Controls.Count > 0)
{
this.DataGridViewCommitEditCell(c);
}
}
}
/// <summary>
/// 数据集-结束编辑
/// </summary>
/// <param name="ds"></param>
private void DataSetEndEdit(DataSet ds)
{
if (ds == null)
return;
foreach (DataTable dt in ds.Tables)
{
foreach (DataRow r in dt.Rows)
{
if (r.RowState != DataRowState.Deleted
&& r.RowState != DataRowState.Detached)
{
r.EndEdit();
}
}
}
}
#endregion
#region 数据绑定
/// <summary>
/// 绑定基础信息
/// </summary>
/// <param name="parent"></param>
/// <param name="drv"></param>
public void BindBaseInfo(Control parent, DataRowView drv)
{
foreach (Control c in parent?.Controls)
{
if (c is TextBox)
{
this.Binding(c as TextBox, drv);
}
else if (c is CheckBox)
{
this.Binding(c as CheckBox, drv);
}
}
}
/// <summary>
/// 设置控件绑定信息
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="c"></param>
/// <param name="drv"></param>
private void Binding<T>(T c, DataRowView drv) where T : Control
{
//获取绑定信息
var bind = this.GetBindingInfo(c);
//数据源是否包含该列
var field = bind.ColumnName;
if (!drv.Row.Table.Columns.Contains(field))
return;
//布尔特殊处理
if (drv[field] == DBNull.Value && drv.Row.Table.Columns[field].DataType.Name.Equals("Boolean"))
drv[field] = false;
//设置绑定
var property = bind.PropertyName;
c.DataBindings.Clear();
c.DataBindings.Add(property, drv, field);
}
/// <summary>
/// 获取绑定属性名称
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="c"></param>
/// <returns></returns>
private BindInfo GetBindingInfo<T>(T c) where T : Control
{
var property = "";
var column = "";
if (c is TextBox)
{
property = "Text";
column = c.Name.Substring(2);
}
else if (c is CheckBox)
{
property = "Checked";
column = c.Name.Substring(2);
}
return new BindInfo() { ColumnName = column, PropertyName = property };
}
#endregion
} }
} }
This diff is collapsed.
...@@ -150,6 +150,16 @@ namespace Tools.Properties { ...@@ -150,6 +150,16 @@ namespace Tools.Properties {
} }
} }
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 删除 {
get {
object obj = ResourceManager.GetObject("删除", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary> /// </summary>
...@@ -160,6 +170,16 @@ namespace Tools.Properties { ...@@ -160,6 +170,16 @@ namespace Tools.Properties {
} }
} }
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 复制 {
get {
object obj = ResourceManager.GetObject("复制", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary> /// </summary>
...@@ -200,6 +220,16 @@ namespace Tools.Properties { ...@@ -200,6 +220,16 @@ namespace Tools.Properties {
} }
} }
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 新增 {
get {
object obj = ResourceManager.GetObject("新增", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary> /// </summary>
......
...@@ -145,9 +145,15 @@ ...@@ -145,9 +145,15 @@
<data name="分析" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="分析" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\分析.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\分析.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="删除" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\删 除.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="加载" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="加载" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\加载.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\加载.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="复制" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\复制.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="实体类" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="实体类" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\实体类.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\实体类.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
...@@ -160,6 +166,9 @@ ...@@ -160,6 +166,9 @@
<data name="数据库" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="数据库" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\数据库.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\数据库.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="新增" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\新增.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="暂存" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="暂存" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\暂存.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\暂存.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
......
Tools/Resources/sql.png

1.15 KB | W: | H:

Tools/Resources/sql.png

725 Bytes | W: | H:

Tools/Resources/sql.png
Tools/Resources/sql.png
Tools/Resources/sql.png
Tools/Resources/sql.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -160,6 +160,18 @@ ...@@ -160,6 +160,18 @@
</Compile> </Compile>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\wLoginPwd.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\wLoginPwd.Designer.cs">
<DependentUpon>wLoginPwd.cs</DependentUpon>
</Compile>
<Compile Include="UI\wModuleManager.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\wModuleManager.Designer.cs">
<DependentUpon>wModuleManager.cs</DependentUpon>
</Compile>
<Compile Include="UI\wMonitorVisit.cs"> <Compile Include="UI\wMonitorVisit.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -178,6 +190,12 @@ ...@@ -178,6 +190,12 @@
<Compile Include="UI\wSysChecker.Designer.cs"> <Compile Include="UI\wSysChecker.Designer.cs">
<DependentUpon>wSysChecker.cs</DependentUpon> <DependentUpon>wSysChecker.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UI\wXmlGenerator.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\wXmlGenerator.Designer.cs">
<DependentUpon>wXmlGenerator.cs</DependentUpon>
</Compile>
<Compile Include="wExtend.cs" /> <Compile Include="wExtend.cs" />
<Compile Include="wMain.cs"> <Compile Include="wMain.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
...@@ -237,6 +255,12 @@ ...@@ -237,6 +255,12 @@
<EmbeddedResource Include="UI\wDBTools.resx"> <EmbeddedResource Include="UI\wDBTools.resx">
<DependentUpon>wDBTools.cs</DependentUpon> <DependentUpon>wDBTools.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UI\wLoginPwd.resx">
<DependentUpon>wLoginPwd.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\wModuleManager.resx">
<DependentUpon>wModuleManager.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\wMonitorVisit.resx"> <EmbeddedResource Include="UI\wMonitorVisit.resx">
<DependentUpon>wMonitorVisit.cs</DependentUpon> <DependentUpon>wMonitorVisit.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -246,6 +270,9 @@ ...@@ -246,6 +270,9 @@
<EmbeddedResource Include="UI\wSysChecker.resx"> <EmbeddedResource Include="UI\wSysChecker.resx">
<DependentUpon>wSysChecker.cs</DependentUpon> <DependentUpon>wSysChecker.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UI\wXmlGenerator.resx">
<DependentUpon>wXmlGenerator.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="wMain.resx"> <EmbeddedResource Include="wMain.resx">
<DependentUpon>wMain.cs</DependentUpon> <DependentUpon>wMain.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
...@@ -291,9 +318,6 @@ ...@@ -291,9 +318,6 @@
<ItemGroup> <ItemGroup>
<None Include="Resources\数据库.png" /> <None Include="Resources\数据库.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Resources\sql.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Resources\类.png" /> <None Include="Resources\类.png" />
</ItemGroup> </ItemGroup>
...@@ -334,5 +358,17 @@ ...@@ -334,5 +358,17 @@
<ItemGroup> <ItemGroup>
<None Include="Resources\node_audit.png" /> <None Include="Resources\node_audit.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Resources\新增.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\复制.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\删 除.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\SQL.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
...@@ -130,7 +130,7 @@ namespace Tools.UI ...@@ -130,7 +130,7 @@ namespace Tools.UI
string original_dhash = ""; string original_dhash = "";
string original_phash = ""; string original_phash = "";
//图片库路径 //图片库路径
string imgPath = $@"F:\图片查询\ImageSearch-master\images"; string imgPath = $@"F:\ImageSearch\images";
//预处理缓存 //预处理缓存
DataTable dtHash = null; DataTable dtHash = null;
...@@ -319,7 +319,7 @@ namespace Tools.UI ...@@ -319,7 +319,7 @@ namespace Tools.UI
} }
/// <summary> /// <summary>
/// /// 图片查询-工具类
/// </summary> /// </summary>
public static class ImageSearchUtil public static class ImageSearchUtil
{ {
...@@ -430,8 +430,6 @@ namespace Tools.UI ...@@ -430,8 +430,6 @@ namespace Tools.UI
} }
} }
/// <summary> /// <summary>
/// 图片指纹生成 /// 图片指纹生成
/// </summary> /// </summary>
...@@ -481,7 +479,7 @@ namespace Tools.UI ...@@ -481,7 +479,7 @@ namespace Tools.UI
{ {
for (int j = 0; j < size; j++) for (int j = 0; j < size; j++)
{ {
feature += matrix[i, j] > matrix[i + 1, j] ? "1" : "0"; feature += matrix[i, j] < matrix[i + 1, j] ? "1" : "0";
} }
} }
return feature; return feature;
......
namespace Tools.UI
{
partial class wLoginPwd
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.tbPassword = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnDecrypt = new System.Windows.Forms.Button();
this.tbResult = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// tbPassword
//
this.tbPassword.Location = new System.Drawing.Point(116, 51);
this.tbPassword.Name = "tbPassword";
this.tbPassword.Size = new System.Drawing.Size(171, 21);
this.tbPassword.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(81, 54);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 1;
this.label1.Text = "密文";
//
// btnDecrypt
//
this.btnDecrypt.Location = new System.Drawing.Point(116, 78);
this.btnDecrypt.Name = "btnDecrypt";
this.btnDecrypt.Size = new System.Drawing.Size(75, 23);
this.btnDecrypt.TabIndex = 2;
this.btnDecrypt.Text = "解密";
this.btnDecrypt.UseVisualStyleBackColor = true;
this.btnDecrypt.Click += new System.EventHandler(this.btnDecrypt_Click);
//
// tbResult
//
this.tbResult.Location = new System.Drawing.Point(116, 107);
this.tbResult.Name = "tbResult";
this.tbResult.Size = new System.Drawing.Size(171, 21);
this.tbResult.TabIndex = 3;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(81, 110);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 4;
this.label2.Text = "结果";
//
// wLoginPwd
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(377, 213);
this.Controls.Add(this.label2);
this.Controls.Add(this.tbResult);
this.Controls.Add(this.btnDecrypt);
this.Controls.Add(this.label1);
this.Controls.Add(this.tbPassword);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "wLoginPwd";
this.Text = "wLoginPwd";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox tbPassword;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnDecrypt;
private System.Windows.Forms.TextBox tbResult;
private System.Windows.Forms.Label label2;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
//
using Tools.MyCommon;
using Tools.MyUtils;
namespace Tools.UI
{
public partial class wLoginPwd : wBasic
{
/// <summary>
/// 密文
/// </summary>
string Password => this.tbPassword.Text.Trim();
/// <summary>
/// 结果
/// </summary>
string Result
{
get => this.tbResult.Text.Trim();
set => this.tbResult.Text = value;
}
public wLoginPwd()
{
InitializeComponent();
}
/// <summary>
/// 按钮事件:解密
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnDecrypt_Click(object sender, EventArgs e)
{
//解密
this.Result = Utils.DecryptString(this.Password);
//获取焦点,并选中文本
this.tbResult.Focus();
this.tbResult.SelectAll();
}
}
}
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column11.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column12.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column13.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
\ No newline at end of file
...@@ -31,21 +31,24 @@ namespace Tools ...@@ -31,21 +31,24 @@ namespace Tools
this.CreateModule(typeof(UI.wAutoClass), "类生成工具"), this.CreateModule(typeof(UI.wAutoClass), "类生成工具"),
this.CreateModule(typeof(UI.wAuditDemo), "审批示例", "tr"), this.CreateModule(typeof(UI.wAuditDemo), "审批示例", "tr"),
this.CreateModule(typeof(UI.wImageSearch), "图片搜索", "tr"), this.CreateModule(typeof(UI.wImageSearch), "图片搜索", "tr"),
this.CreateModule(typeof(UI.wXmlGenerator), "XML生成器", "tr"),
this.CreateModule(typeof(UI.wModuleManager), "模块管理", "tr"),
this.CreateModule(typeof(UI.wLoginPwd), "登录密码", "tr"),
}; };
} }
/// <summary> /// <summary>
/// 生成模块信息 /// 生成模块信息
/// </summary> /// </summary>
/// <param name="frm">窗体对象</param> /// <param name="frmType">窗体对象</param>
/// <param name="text">显示名称</param> /// <param name="text">显示名称</param>
/// <param name="tip">提示信息</param> /// <param name="tip">提示信息</param>
/// <param name="imgPath">图片路径</param> /// <param name="imgPath">图片路径</param>
/// <returns></returns> /// <returns></returns>
private ModuleInfo CreateModule(Type frm, string text, string tip = "") private ModuleInfo CreateModule(Type frmType, string text, string tip = "")
{ {
return new ModuleInfo { return new ModuleInfo {
FrmView = frm, ViewFormType = frmType,
Text = text, Text = text,
ToolTipText = tip, ToolTipText = tip,
}; };
......
...@@ -42,7 +42,7 @@ namespace Tools ...@@ -42,7 +42,7 @@ namespace Tools
Text = m.Text, Text = m.Text,
ToolTipText = m.ToolTipText, ToolTipText = m.ToolTipText,
ImageIndex = 1, ImageIndex = 1,
Tag = m.FrmView, Tag = m.ViewFormType,
}); });
} }
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>
using Dapper;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace test.DBO
{
/// <summary>
/// Dapper Dbo.
/// 更换不同数据库,只需修改 NewConn <see cref="NewConn"/> 以及少量代码 <see cref="GetDataSet"/> <see cref="GetDataTable"/>
/// </summary>
public class DbDapper : IDisposable
{
public static bool DEBUG_MODE = false;
private readonly string connectionString;
private System.Data.IDbConnection conn;
/// <summary>
/// 平台用、企业相关操作禁止使用。
/// </summary>
/// <param name="dbConnectionString"></param>
public DbDapper(string dbConnectionString)
{
connectionString = dbConnectionString;
}
public IDbConnection NewConn()
{
// return new NpgsqlConnection(connectionString);
return new SqlConnection(connectionString);
}
/// <summary>
/// 在委托里执行一堆事务
/// 委托成功执行会自动提交事件,失败会自动回滚.
/// 注意:不要在这个委托里调用 带 Async的异步方法,可能会造成问题:BeginExecuteNonQuery requires an open and available Connection. The connection's current state is open
/// </summary>
/// <param name="action"></param>
public void Trans(Action<IDbConnection, IDbTransaction> action)
{
using (var conn = NewConn())
{
conn.Open();
using (var trans = conn.BeginTransaction())
{
try
{
action(conn, trans);
trans.Commit();
}
catch (Exception)
{
trans.Rollback();
throw;
}
}
conn.Close();
}
}
public T ExecuteScalar<T>(string commandText, object paras = null)
{
using (var conn = NewConn())
{
return conn.ExecuteScalar<T>(commandText, paras, commandType: CommandType.Text);
}
}
public async Task<T> ExecuteScalarAsync<T>(string commandText, object paras = null)
{
using (var conn = NewConn())
{
return await conn.ExecuteScalarAsync<T>(commandText, paras, commandType: CommandType.Text);
}
}
public async Task<T> QueryFirstAsync<T>(string commandText, object paras = null)
{
using (var conn = NewConn())
{
return await conn.QueryFirstAsync<T>(commandText, paras, commandType: CommandType.Text);
}
}
public T QueryFirst<T>(string commandText, object paras = null)
{
using (var conn = NewConn())
{
return conn.QueryFirst<T>(commandText, paras, commandType: CommandType.Text);
}
}
public T QueryFirstOrDefault<T>(string commandText, object paras = null)
{
using (var conn = NewConn())
{
return conn.QueryFirstOrDefault<T>(commandText, paras, commandType: CommandType.Text);
}
}
public async Task<T> QueryFirstOrDefaultAsync<T>(string commandText, object paras = null)
{
using (var conn = NewConn())
{
return await conn.QueryFirstOrDefaultAsync<T>(commandText, paras, commandType: CommandType.Text);
}
}
public void Execute(string commandText, object paras = null)
{
using (var conn = NewConn())
{
conn.Execute(commandText, paras, commandType: CommandType.Text);
}
}
public async Task<int> ExecuteAsync(string commandText, object paras = null)
{
using (var conn = NewConn())
{
return await conn.ExecuteAsync(commandText, paras, commandType: CommandType.Text);
}
}
public async Task ExecuteAsyncByProc(string procName, object paras = null)
{
using (var conn = NewConn())
{
await conn.ExecuteAsync(procName, paras, commandType: CommandType.StoredProcedure);
}
}
public async Task<IEnumerable<T>> QueryAsync<T>(string commandText, object paras = null, CommandType commandType = CommandType.Text)
{
using (var conn = NewConn())
{
return await conn.QueryAsync<T>(commandText, paras, commandType: commandType);
}
}
public IEnumerable<T> Query<T>(string commandText, object paras = null)
{
using (var conn = NewConn())
{
return conn.Query<T>(commandText, paras, commandType: CommandType.Text);
}
}
public T ExecuteScalarByProc<T>(string procName, object paras = null)
{
using (var conn = NewConn())
{
return conn.ExecuteScalar<T>(procName, paras, commandType: CommandType.StoredProcedure);
}
}
public Task<T> QueryFirstAsyncByProc<T>(string procName, object paras = null)
{
using (var conn = NewConn())
{
return conn.QueryFirstAsync<T>(procName, paras, commandType: CommandType.StoredProcedure);
}
}
public Task ExecuteAsync<T>(string sql, object p)
{
throw new NotImplementedException();
}
public Task<IEnumerable<T>> QueryAsyncByProc<T>(string commandText, object paras = null)
{
using (var conn = NewConn())
{
return conn.QueryAsync<T>(commandText, paras, commandType: CommandType.StoredProcedure);
}
}
#region DataTable、DataSet
public DataTable GetTable(string commandText, object paras = null)
{
using (var conn = NewConn())
{
conn.Open();
using (var reader = conn.ExecuteReader(commandText, paras))
{
var dt = new DataTable();
while (reader.Read())
{
if (dt.Columns.Count == 0)
{
for (var i = 0; i < reader.FieldCount; i++)
{
dt.Columns.Add(reader.GetName(i), reader.GetFieldType(i));
}
}
var row = dt.Rows.Add();
for (var i = 0; i < reader.FieldCount; i++)
{
row[i] = reader.GetValue(i);
}
}
return dt;
}
}
}
public DataSet GetDataSet(string sql, object paras = null, bool isSp = false)
{
using (var conn = NewConn())
{
var ds = new DataSet();
using (var cmd = new SqlCommand(sql, (SqlConnection)conn))
{
if (isSp)
cmd.CommandType = CommandType.StoredProcedure;
if (paras != null)
{
var properties = paras.GetType().GetProperties();
foreach (var property in properties)
{
cmd.Parameters.AddWithValue("@" + property.Name, property.GetValue(paras, null));
}
}
using (var da = new SqlDataAdapter(cmd))
{
da.Fill(ds);
}
}
return ds;
}
}
/// <summary>
///
/// </summary>
/// <param name="sql"></param>
/// <param name="paras"></param>
/// <param name="isSp"></param>
/// <returns></returns>
public DataTable GetDataTable(string sql, object paras = null, bool isSp = false)
{
using (var conn = NewConn())
{
var dt = new DataTable();
using (var cmd = new SqlCommand(sql, (SqlConnection)conn))
{
if (isSp)
cmd.CommandType = CommandType.StoredProcedure;
if (paras != null)
{
var properties = paras.GetType().GetProperties();
foreach (var property in properties)
{
cmd.Parameters.AddWithValue("@" + property.Name, property.GetValue(paras, null));
}
}
using (var da = new SqlDataAdapter(cmd))
{
da.Fill(dt);
}
}
return dt;
}
}
#endregion
public void Dispose()
{
if (conn != null)
{
try
{
conn.Dispose();
}
catch
{
}
conn = null;
}
}
}
}
This diff is collapsed.
This diff is collapsed.
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Data.SqlClient;
namespace test.Extension
{
public static partial class DataTableExtension
{
public static List<string> GetFields(this DataTable dataTable)
{
List<string> lstFieldName = new List<string>();
foreach (DataColumn column in dataTable.Columns)
{
lstFieldName.Add(column.ColumnName);
}
return lstFieldName;
}
public static string GetInsertCommand(this DataTable dataTable, string tableName)
{
List<string> lstFieldName = dataTable.GetFields();
StringBuilder sb = new StringBuilder();
sb.Append(" INSERT INTO ");
sb.Append(tableName);
sb.Append(" ( ");
sb.Append(lstFieldName.JoinString(","));
sb.Append(") values (");
sb.Append("@");
sb.Append(lstFieldName.JoinString(",@"));
sb.Append(")");
return sb.ToString();
}
public static string GetUpdateCommand(List<string> tabColumns, string tableName, string primaryKeyName)
{
List<string> lstFieldName = new List<string>();
tabColumns.ForEach(field =>
{
if (field != primaryKeyName) lstFieldName.Add($"{field} = @{field}");
});
StringBuilder sb = new StringBuilder();
sb.Append(" Update ");
sb.Append(tableName);
sb.Append(" Set ");
sb.Append(lstFieldName.JoinString(","));
sb.Append($" Where {primaryKeyName} = @{primaryKeyName};");
return sb.ToString();
}
public static string GetUpdateCommand(this DataTable dataTable, string tableName, string primaryKeyName)
{
List<string> lstFieldName = new List<string>();
foreach (DataColumn column in dataTable.Columns)
{
if (column.ColumnName == primaryKeyName) continue;
lstFieldName.Add($"{column.ColumnName} = @{column.ColumnName}");
}
StringBuilder sb = new StringBuilder();
sb.Append(" Update ");
sb.Append(tableName);
sb.Append(" Set ");
sb.Append(lstFieldName.JoinString(","));
sb.Append($" Where {primaryKeyName} = @{primaryKeyName};");
return sb.ToString();
}
public static KeyValuePair<string, IEnumerable<Dictionary<string, object>>> GetInsertCommandWithParam(this DataTable dataTable, string tableName)
{
return new KeyValuePair<string, IEnumerable<Dictionary<string, object>>>(dataTable.GetInsertCommand(tableName), dataTable.GetFieldValues());
}
public static IEnumerable<Dictionary<string, object>> GetFieldValues(this DataTable dataTable)
{
var lstDic = new List<Dictionary<string, object>>();
for (var i = 0; i < dataTable.Rows.Count; i++)
{
var row = dataTable.Rows[i];
var dic = new Dictionary<string, object>();
for (var j = 0; j < dataTable.Columns.Count; j++)
{
var oValue = row[j];
dic.Add(dataTable.Columns[j].ColumnName, oValue != System.DBNull.Value ? oValue : null);
}
lstDic.Add(dic);
}
return lstDic;
}
public static List<SqlParameter[]> GetSqlParameter(this DataTable dataTable)
{
var lstParam = new List<SqlParameter[]>();
for (var i = 0; i < dataTable.Rows.Count; i++)
{
var parameters = new List<SqlParameter>();
for (var j = 0; j < dataTable.Columns.Count; j++)
{
parameters.Add(new SqlParameter(dataTable.Columns[j].ColumnName, dataTable.Rows[i][j]));
}
lstParam.Add(parameters.ToArray());
}
return lstParam;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reflection;
namespace test.Extension
{
public static class ExpressionExtension
{
public struct BinaryExpressionInfo
{
public BinaryExpression Body;
public MemberExpression Left;
public Expression Right;
public string LeftName;
public object GetRightValue()
{
if (this.Right is MemberExpression)
{
return this.getMemberExpressionValue((MemberExpression)this.Right);
}
if (this.Right is ConstantExpression)
{
return this.getConstantExpressionValue((ConstantExpression)this.Right);
}
throw new Exception("未实现的Expression类型:" + this.Right.GetType().FullName);
}
private object getConstantExpressionValue(ConstantExpression r)
{
return r.Value;
}
private object getMemberExpressionValue(MemberExpression r)
{
if (r.Expression is ConstantExpression)
{
object rightValue = ((ConstantExpression)r.Expression).Value;
return ((FieldInfo)r.Member).GetValue(rightValue);
}
if (r.Expression is MemberExpression)
{
return Expression.Lambda(r, new ParameterExpression[0]).Compile().DynamicInvoke(new object[0]);
}
throw new Exception("未能处理表达式的右侧的值");
}
}
public static string GetOneName(this Expression exp)
{
return ((PropertyInfo)((MemberExpression)((LambdaExpression)exp).Body).Member).Name;
}
public static ExpressionExtension.BinaryExpressionInfo GetBinaryExpressionInfo(this Expression exp)
{
ExpressionExtension.BinaryExpressionInfo info = default(ExpressionExtension.BinaryExpressionInfo);
info.Body = (BinaryExpression)((LambdaExpression)exp).Body;
info.Left = (MemberExpression)info.Body.Left;
info.Right = info.Body.Right;
info.LeftName = info.Left.Member.Name;
return info;
}
public static string JoinString<T>(this IEnumerable<T> source, string separator)
{
return string.Join<T>(separator, source);
}
}
}
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace test.Extension
{
public static partial class DataTableExtension
{
#region 公共方法(扩展DataTable)
/// <summary>
/// DataTable转换成T
/// </summary>
/// <typeparam name="T">实体类型</typeparam>
/// <param name="table">需转换的数据table</param>
/// <returns></returns>
public static T ToModel<T>(this DataTable table) where T : new()
{
if (table == null || table.Columns.Count == 0 || table.Rows.Count == 0) return default(T);
var propertyInfos = from propertyInfo in typeof(T).GetProperties()
where table.Columns.Contains(propertyInfo.Name)
select propertyInfo;
return DataRowToModel<T>(propertyInfos, table.Rows[0]);
//T entity = new T();
//DataRow dr = table.Rows[0];
//foreach (var pi in propertyInfos)
//{
// if (!pi.CanWrite) continue;
// object value = dr[pi.Name];
// if (value != DBNull.Value)
// pi.SetValue(entity, ChangeType(dr[pi.Name], pi.PropertyType), null);
//}
//return entity;
}
/// <summary>
/// DataTable转换成List<T>
/// </summary>
/// <typeparam name="T">实体类型</typeparam>
/// <param name="table">需转换的数据table</param>
/// <returns></returns>
public static List<T> ToModelList<T>(this DataTable table) where T : new()
{
List<T> entities = new List<T>();
if (table == null || table.Columns.Count == 0 || table.Rows.Count == 0) return entities;
var propertyInfos = from propertyInfo in typeof(T).GetProperties()
where table.Columns.Contains(propertyInfo.Name)
select propertyInfo;
foreach (DataRow dr in table.Rows)
{
entities.Add(DataRowToModel<T>(propertyInfos, dr));
}
return entities;
//foreach (DataRow dr in table.Rows)
//{
// T entity = new T();
// foreach (var pi in propertyInfos)
// {
// if (!pi.CanWrite) continue;
// object value = dr[pi.Name];
// if (value != DBNull.Value)
// pi.SetValue(entity, ChangeType(dr[pi.Name], pi.PropertyType), null);
// }
// entities.Add(entity);
//}
//return entities;
}
#endregion 公共方法(扩展DataTable)
#region 私有方法(Convert.ChangeType处理Nullable<>和非Nullable<>)
private static T DataRowToModel<T>(IEnumerable<System.Reflection.PropertyInfo> propertyInfos, DataRow dataRow) where T : new()
{
T entity = new T();
foreach (var pi in propertyInfos)
{
if (!pi.CanWrite) continue;
object value = dataRow[pi.Name];
if (value != DBNull.Value || pi.PropertyType == typeof(string)) // 为null的字符串需要转化为""
pi.SetValue(entity, ChangeType(dataRow[pi.Name], pi.PropertyType), null);
}
return entity;
}
/// <summary>
/// 类型转换(包含Nullable<>和非Nullable<>转换)
/// </summary>
/// <param name="value"></param>
/// <param name="conversionType"></param>
/// <returns></returns>
private static object ChangeType(object value, Type conversionType)
{
// Note: This if block was taken from Convert.ChangeType as is, and is needed here since we're
// checking properties on conversionType below.
if (conversionType == null)
{
throw new ArgumentNullException("conversionType");
} // end if
// If it's not a nullable type, just pass through the parameters to Convert.ChangeType
if (conversionType.IsGenericType &&
conversionType.GetGenericTypeDefinition().Equals(typeof(Nullable<>)))
{
if (value == null)
{
return null;
}
// It's a nullable type, and not null, so that means it can be converted to its underlying type,
// so overwrite the passed-in conversion type with this underlying type
System.ComponentModel.NullableConverter nullableConverter = new System.ComponentModel.NullableConverter(conversionType);
conversionType = nullableConverter.UnderlyingType;
}
// Now that we've guaranteed conversionType is something Convert.ChangeType can handle (i.e. not a
// nullable type), pass the call on to Convert.ChangeType
return Convert.ChangeType(value, conversionType);
}
#endregion 私有方法(Convert.ChangeType处理Nullable<>和非Nullable<>)
}
}

namespace test
{
partial class FrmDbo
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnDapper = new System.Windows.Forms.Button();
this.btnFluent = new System.Windows.Forms.Button();
this.btnSqlHelper = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.btnClear = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnDapper
//
this.btnDapper.Location = new System.Drawing.Point(25, 23);
this.btnDapper.Name = "btnDapper";
this.btnDapper.Size = new System.Drawing.Size(75, 23);
this.btnDapper.TabIndex = 1;
this.btnDapper.Text = "RunDraaper";
this.btnDapper.UseVisualStyleBackColor = true;
this.btnDapper.Click += new System.EventHandler(this.btnDapper_Click);
//
// btnFluent
//
this.btnFluent.Location = new System.Drawing.Point(128, 23);
this.btnFluent.Name = "btnFluent";
this.btnFluent.Size = new System.Drawing.Size(75, 23);
this.btnFluent.TabIndex = 2;
this.btnFluent.Text = "RunFluent";
this.btnFluent.UseVisualStyleBackColor = true;
this.btnFluent.Click += new System.EventHandler(this.btnFluent_Click);
//
// btnSqlHelper
//
this.btnSqlHelper.Location = new System.Drawing.Point(231, 23);
this.btnSqlHelper.Name = "btnSqlHelper";
this.btnSqlHelper.Size = new System.Drawing.Size(75, 23);
this.btnSqlHelper.TabIndex = 3;
this.btnSqlHelper.Text = "RunSqlHelper";
this.btnSqlHelper.UseVisualStyleBackColor = true;
this.btnSqlHelper.Click += new System.EventHandler(this.btnSqlHelper_Click);
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Location = new System.Drawing.Point(12, 55);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(420, 241);
this.textBox1.TabIndex = 4;
//
// btnClear
//
this.btnClear.Location = new System.Drawing.Point(335, 23);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(75, 23);
this.btnClear.TabIndex = 5;
this.btnClear.Text = "清空";
this.btnClear.UseVisualStyleBackColor = true;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// FrmDbo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(444, 308);
this.Controls.Add(this.btnClear);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.btnSqlHelper);
this.Controls.Add(this.btnFluent);
this.Controls.Add(this.btnDapper);
this.Name = "FrmDbo";
this.Text = "FrmOrm";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnDapper;
private System.Windows.Forms.Button btnFluent;
private System.Windows.Forms.Button btnSqlHelper;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button btnClear;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Windows.Forms;
using test.Extension;
using test.Tester;
namespace test
{
public partial class FrmDbo : Form
{
public FrmDbo()
{
InitializeComponent();
}
private void btnQuery_Click(object sender, EventArgs e)
{
ITester tester = new TDapper();
DataTable dtBom = null;
TimeWatch.Wrap("获取Bom5000", () => { dtBom = tester.GetDataTable("Select top(5000) * From OrderStyleBOM"); });
var sql = "Update OrderStyleBOM Set SubmitDate = @SubmitDate,LastModifiedMemo = @LastModifiedMemo,Remark = @Remark Where UID = @UID";
Dictionary<string, object> data = new Dictionary<string, object>() { { "SubmitDate", DateTime.Now }, { "LastModifiedMemo", "更新测试" }, { "UID", Guid.Parse("F25701F7-D877-46CB-986D-991090168B97") }, { "Remark", null } };
tester.Execute(sql, data);
var upCommand = dtBom.GetUpdateCommand("OrderStyleBOM", "UID");
tester.Update(upCommand, dtBom);
var dtInsert = tester.GetDataTable("Select top(100) * From OrderStyleBOM order by ID");
foreach (DataRow row in dtInsert.Rows)
{
row["UID"] = Guid.NewGuid();
}
var insertCommand = dtBom.GetInsertCommand("OrderStyleBOM");
tester.Insert(insertCommand, dtInsert);
}
private void btnDapper_Click(object sender, EventArgs e)
{
ITester tester = new TDapper();
Tester(sender, tester);
}
private void btnFluent_Click(object sender, EventArgs e)
{
ITester tester = new TFluentData();
Tester(sender, tester);
}
private void btnSqlHelper_Click(object sender, EventArgs e)
{
ITester tester = new TSqlHelper();
Tester(sender, tester);
}
private void Tester(object sender, ITester tester)
{
var button = (Button)sender;
button.Enabled = false;
Test1(tester);
button.Enabled = true;
}
private void Test1(ITester tester)
{
dicTimes.Clear();
TimeWatch timeWatch = TimeWatch.Start();
var sql = "Update OrderStyleBOM Set SubmitDate = @SubmitDate,LastModifiedMemo = @LastModifiedMemo,Remark = @Remark Where UID = @UID";
Dictionary<string, object> data = new Dictionary<string, object>() { { "SubmitDate", DateTime.Now }, { "LastModifiedMemo", "更新测试" }, { "UID", Guid.Parse("F25701F7-D877-46CB-986D-991090168B97") }, { "Remark", null } };
tester.Execute(sql, data);
ShowTestTime("更新1条记录", timeWatch);
#region Select 5000
DataTable dtBom = tester.GetDataTable("Select top(5000) * From OrderStyleBOM");
ShowTestTime("查询5000条记录", timeWatch);
#endregion
var dtQuery = tester.GetDataTable("Select top(100) * From OrderStyleBOM order by ID");
#region Update 100
var upCommand = dtBom.GetUpdateCommand("OrderStyleBOM", "UID");
tester.Update(upCommand, dtQuery);
ShowTestTime("更新100条记录", timeWatch);
#endregion
#region Insert 100
foreach (DataRow row in dtQuery.Rows) row["UID"] = Guid.NewGuid(); //
tester.Insert(dtQuery.GetInsertCommand("OrderStyleBOM"), dtQuery);
ShowTestTime("插入100条记录", timeWatch);
#endregion
ShowTester(tester.GetType().Name);
}
Dictionary<string, double> dicTimes = new Dictionary<string, double>();
private void ShowTestTime(string text, TimeWatch timeWatch)
{
dicTimes.Add(text, timeWatch.TimeSpan.TotalMilliseconds);
timeWatch.ShowLog(text, true);
}
private void ShowTester(string testerName)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine($"{ testerName} 测试完成:");
foreach (var dic in dicTimes)
sb.AppendLine($"{dic.Key} 耗时:{dic.Value}");
sb.AppendLine("================================================");
textBox1.Text += sb.ToString();
}
private void btnClear_Click(object sender, EventArgs e)
{
textBox1.Text = "";
}
}
}
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace test
{
static class Program
{
/*
* 抛出异常:
托管调试助手 "ContextSwitchDeadlock"
CLR 无法从 COM 上下文 0xa62c80 转换为 COM 上下文 0xa62b10,这种状态已持续 60 秒。拥有目标上下文/单元的线程很有可能执行的是非泵式等待或者在不发送 Windows 消息的情况下处理一个运行时间非常长的操作。
这种情况通常会影响到性能,甚至可能导致应用程序不响应或者使用的内存随时间不断累积。要避免此问题,所有单线程单元(STA)线程都应使用泵式等待基元(如 CoWaitForMultipleHandles),并在运行时间很长的操作过程中定期发送消息。
在调试菜单中的异常选项,在Managed Debugging Assistants 中将ContextSwitchDeadlock后面的第一个勾给去掉就可以了。
*/
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmDbo());
}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace test.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.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;
}
}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment