Commit 53de98e3 authored by tr's avatar tr

1、数据库开发工具(功能:创建数据库表和生成模型类)

parent 6e4a4d9e
...@@ -5,3 +5,5 @@ ...@@ -5,3 +5,5 @@
/FunnyPick/.vs/FunnyPick/v16/Server/sqlite3 /FunnyPick/.vs/FunnyPick/v16/Server/sqlite3
/FunnyPick/.vs/FunnyPick/v16/.suo /FunnyPick/.vs/FunnyPick/v16/.suo
/FunnyPick/.vs/FunnyPick/DesignTimeBuild/.dtbcache /FunnyPick/.vs/FunnyPick/DesignTimeBuild/.dtbcache
obj
bin
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
\ No newline at end of file
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="AppSetting" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="AppSetting">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" />
<xs:element name="Value" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//AppSetting" />
<xs:field xpath="Name" />
</xs:unique>
</xs:element>
</xs:schema>
<AppSetting>
<Name>LinkString</Name>
<Value>Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=Temp;Data Source=.</Value>
</AppSetting>
<AppSetting>
<Name>ExportPath</Name>
<Value />
</AppSetting>
</NewDataSet>
\ No newline at end of file
...@@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 ...@@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 16
VisualStudioVersion = 16.0.29411.108 VisualStudioVersion = 16.0.29411.108
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FunnyPick", "FunnyPick\FunnyPick.csproj", "{74FE44AE-D01E-41FC-9DD1-65A5DA2CFC7B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunnyPick", "FunnyPick\FunnyPick.csproj", "{74FE44AE-D01E-41FC-9DD1-65A5DA2CFC7B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tools", "..\Tools\Tools.csproj", "{C5AB3CE9-C46A-467D-96E4-D80DD3BBB239}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
...@@ -15,6 +17,10 @@ Global ...@@ -15,6 +17,10 @@ Global
{74FE44AE-D01E-41FC-9DD1-65A5DA2CFC7B}.Debug|Any CPU.Build.0 = Debug|Any CPU {74FE44AE-D01E-41FC-9DD1-65A5DA2CFC7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74FE44AE-D01E-41FC-9DD1-65A5DA2CFC7B}.Release|Any CPU.ActiveCfg = Release|Any CPU {74FE44AE-D01E-41FC-9DD1-65A5DA2CFC7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74FE44AE-D01E-41FC-9DD1-65A5DA2CFC7B}.Release|Any CPU.Build.0 = Release|Any CPU {74FE44AE-D01E-41FC-9DD1-65A5DA2CFC7B}.Release|Any CPU.Build.0 = Release|Any CPU
{C5AB3CE9-C46A-467D-96E4-D80DD3BBB239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5AB3CE9-C46A-467D-96E4-D80DD3BBB239}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5AB3CE9-C46A-467D-96E4-D80DD3BBB239}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5AB3CE9-C46A-467D-96E4-D80DD3BBB239}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of
this License; and
You must cause any modified files to carry prominent notices stating that You
changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
6. Trademarks.
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "{}" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.
\ No newline at end of file
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.6.1" />
</startup>
</configuration>
\ No newline at end of file
namespace Tools.MyCommon
{
partial class wBasic
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(wBasic));
this.SuspendLayout();
//
// wBasic
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(278, 174);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "wBasic";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "基础窗口";
this.ResumeLayout(false);
}
#endregion
}
}
\ 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;
namespace Tools.MyCommon
{
/// <summary>
/// 基础窗口:包括Icon和FormStartPosition.CenterScreen
/// </summary>
public partial class wBasic : Form
{
public wBasic()
{
InitializeComponent();
}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//
using NPOI.XWPF.UserModel;
using System.Data;
using System.IO;
namespace Tools.MyUtils
{
public class NPOIWordHelper
{
/// <summary>
/// 导出Word
/// </summary>
/// <param name="tableName"></param>
/// <param name="tableDescription"></param>
/// <param name="dt"></param>
public void Export(string tableName, string tableDescription, DataTable dt, string exportFileName)
{
XWPFDocument doc = new XWPFDocument();
//段落1:表名
XWPFParagraph paragraph = doc.CreateParagraph();
//paragraph.Alignment = ParagraphAlignment.CENTER;
XWPFRun run = paragraph.CreateRun();
run.IsBold = true;
run.FontSize = 12;
run.SetText($"表名:{tableName}");
run.SetColor("#082E54");
run.SetFontFamily("微软雅黑", FontCharRange.None);
//段落2:表名描述
XWPFParagraph paragraph1 = doc.CreateParagraph();
XWPFRun run1 = paragraph1.CreateRun();
run1.FontSize = 10;
run1.SetText($"描述:{tableDescription}");
run1.SetColor("#808A87");
run1.SetFontFamily("微软雅黑", FontCharRange.None);
//表格:列信息
XWPFTable table = doc.CreateTable(dt.DefaultView.Count + 1, dt.Columns.Count);
for (int i = 0; i < table.Rows.Count; i++)
{
var cells = table.Rows[i].GetTableCells();
for (int n = 0; n < cells.Count; n++)
{
//首行渲染为标题,后续填充值
var text = i.Equals(0) ? dt.Columns[n].Caption : dt.DefaultView[i - 1][n].ToString();
cells[n].SetText(text);
cells[n].SetColor("#FFFFCD");
}
}
try
{
//保存文件
using (var fs = new FileStream(exportFileName, FileMode.OpenOrCreate, FileAccess.ReadWrite))
{
doc.Write(fs);
}
}
catch (Exception ex)
{
Utils.Tip("保存出错:\r\n" + ex.Message);
return;
}
finally
{
Utils.Tip("Word导出成功!");
//System.Diagnostics.Process.Start(exportFileName);
}
}
}
}
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//
using System.Windows.Forms;
namespace Tools.MyUtils
{
public static class Utils
{
#region 常用路径
/// <summary>
/// 桌面路径
/// </summary>
public static string DesktopPath => Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
/// <summary>
/// 启动路径
/// </summary>
public static string StartupPath => Application.StartupPath;
/// <summary>
/// 配置文件目录
/// </summary>
public static string ConfigPath => $@"{Application.StartupPath}\config";
/// <summary>
/// 日志目录
/// </summary>
public static string LogPath => $@"{Application.StartupPath}\log";
/// <summary>
/// 暂存目录
/// </summary>
public static string SavePath => $@"{Application.StartupPath}\save";
/// <summary>
/// 临时文件目录
/// </summary>
public static string TempPath => $@"{Application.StartupPath}\temp";
#endregion
/// <summary>
/// 提示框
/// </summary>
/// <param name="msg"></param>
public static void Tip(string msg, int width=0, int height=0)
{
new wMsgBox().Show(msg, width, height);
}
/// <summary>
/// 生成定长序号
/// </summary>
/// <param name="seed">序号</param>
/// <param name="len">长度</param>
/// <returns></returns>
public static string GenSerialNo(int seed, int len = 2)
{
string s = seed.ToString();
if (s.Length < len)
{
s = $"0000{seed}";
s = s.Substring(s.Length - len);
}
return s;
}
/// <summary>
/// 生成数据库链接字符串
/// </summary>
/// <param name="link"></param>
/// <param name="dbName"></param>
/// <param name="userId"></param>
/// <param name="pwd"></param>
/// <returns></returns>
public static string GetLinkString(string link, string dbName, string userId, string pwd)
{
return $"Password={pwd};Persist Security Info=True;User ID={userId};Initial Catalog={dbName};Data Source={link}";
}
/// <summary>
/// 生成数据库链接字符串
/// </summary>
/// <param name="m"></param>
/// <returns></returns>
public static string GetLinkString(DbItemModel m)
{
return GetLinkString(m.Link, m.DbName, m.UserId, m.Pwd);
}
/// <summary>
/// 链接转为模型对象
/// </summary>
/// <param name="linkString"></param>
/// <returns></returns>
public static DbItemModel GetDbItemModel(string linkString)
{
DbItemModel m = new DbItemModel();
var pairs = linkString.Trim().Split(';');
foreach (var p in pairs)
{
var k = p.Trim().Split('=');
if (k.Length < 2)
continue;
if (k[0].Trim().ToLower().Equals("password"))
m.Pwd = k[1];
else if (k[0].Trim().ToLower().Equals("user id"))
m.UserId = k[1];
else if (k[0].Trim().ToLower().Equals("initial catalog"))
m.DbName = k[1];
else if (k[0].Trim().ToLower().Equals("data source"))
m.Link = k[1];
}
return m;
}
#region 生成Model
public static string GenModelHead(string tableName, string tableDescription)
{
var leftBrace = "{";
return $"using System;\r\n\r\nnamespace Tools.Models\r\n{leftBrace}\r\n /// <summary>\r\n ///{tableDescription}\r\n /// </summary>\r\n public class {tableName}\r\n {leftBrace}";
}
public static string GenModelBody(DataTable dt)
{
var leftBrace = "{";
var rightBrace = "}";
var infoList = new List<string>();
foreach (DataRowView r in dt.DefaultView)
{
infoList.Add($" /// <summary>\r\n ///{r["Description"]}\r\n /// </summary>\r\n public {Utils.GetColumnType(r["ColumnType"].ToString())} {r["FieldName"]} {leftBrace} get; set; {rightBrace}");
}
return string.Join("\r\n", infoList);
}
public static string GenModelTail()
{
return " }\r\n}";
}
/// <summary>
/// 获取列类型
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
private static string GetColumnType(string str)
{
str = str.ToUpper();
string result = "string";
if (str.StartsWith("VARCHAR") || str.StartsWith("NVARCHAR"))
{
result = "string";
}
else if (str.StartsWith("DECIMAL"))
{
result = "decimal";
}
else if (str.Equals("INT")) //INT、BIGINT
{
result = "int";
}
else if (str.Equals("BIT"))
{
result = "bool";
}
else if (str.Equals("IMAGE"))
{
result = "byte[]";
}
else if (str.Equals("FLOAT"))
{
result = "float";
}
else if (str.Equals("DATETIME"))
{
result = "DateTime";
}
else if (str.Equals("UNIQUEIDENTIFIER"))
{
result = "Guid";
}
return result;
}
#endregion
#region 生成SQL
public static string GenSqlHead(string tableName)
{
return $"IF NOT EXISTS(SELECT 1 FROM sys.tables WHERE name = '{tableName}')\r\nBEGIN\r\nCREATE TABLE {tableName}\r\n(";
}
public static string GenSqlBody(DataTable dt,string tableName, string tableDescription, out List<string> descriptionList)
{
//描述信息
descriptionList = new List<string>();
descriptionList.Add($"EXEC [dbo].[sp_tools_AddTableDescription] '{tableName}','{tableDescription}'");
//列信息生成
var columnInfoList = new List<string>();
foreach (DataRowView r in dt.DefaultView)
{
var columninfo = string.Empty;
//列名与类型
var FieldName = r["FieldName"].ToString();
var ColumnType = r["ColumnType"].ToString();
columninfo = $"{FieldName} {ColumnType}";
//是否为空
var IsNotNull = r["IsNotNull"] == DBNull.Value ? false : (bool)r["IsNotNull"];
columninfo += IsNotNull ? " NOT NULL" : " NULL";
//是否主键
var IsPrimaryKey = r["IsPrimaryKey"] == DBNull.Value ? false : (bool)r["IsPrimaryKey"];
columninfo += IsPrimaryKey ? " PRIMARY KEY" : "";
//是否自增
var IsAutoIncrement = r["IsAutoIncrement"] == DBNull.Value ? false : (bool)r["IsAutoIncrement"];
columninfo += IsAutoIncrement && (ColumnType.Equals("INT") || ColumnType.Equals("BIGINT")) ? " IDENTITY(1,1)" : "";
//默认值
var DefaultValue = r["DefaultValue"].ToString();
columninfo += string.IsNullOrEmpty(DefaultValue) ? "" : $" DEFAULT({DefaultValue})";
columnInfoList.Add(columninfo);
//创建描述
var Description = r["Description"].ToString();
descriptionList.Add($"EXEC [dbo].[sp_tools_AddTableClumnDescription] '{tableName}','{FieldName}','{Description}'");
}
return string.Join(",\r\n", columnInfoList);
}
public static string GenSqlTail()
{
return $");\r\nEND;";
}
#endregion
}
}
namespace Tools.MyUtils
{
partial class wDbSetting
{
/// <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.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.tbLink = new System.Windows.Forms.TextBox();
this.tbDbName = new System.Windows.Forms.TextBox();
this.tbUserId = new System.Windows.Forms.TextBox();
this.tbPwd = new System.Windows.Forms.TextBox();
this.btnSave = new System.Windows.Forms.Button();
this.lnkHistory = new System.Windows.Forms.LinkLabel();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(28, 27);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 0;
this.label1.Text = "链 接:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(28, 53);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 1;
this.label2.Text = "数据库:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(28, 79);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 12);
this.label3.TabIndex = 2;
this.label3.Text = "账 号:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(28, 105);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(53, 12);
this.label4.TabIndex = 3;
this.label4.Text = "密 码:";
//
// tbLink
//
this.tbLink.Location = new System.Drawing.Point(87, 24);
this.tbLink.Name = "tbLink";
this.tbLink.Size = new System.Drawing.Size(168, 21);
this.tbLink.TabIndex = 4;
//
// tbDbName
//
this.tbDbName.Location = new System.Drawing.Point(87, 50);
this.tbDbName.Name = "tbDbName";
this.tbDbName.Size = new System.Drawing.Size(168, 21);
this.tbDbName.TabIndex = 5;
//
// tbUserId
//
this.tbUserId.Location = new System.Drawing.Point(87, 76);
this.tbUserId.Name = "tbUserId";
this.tbUserId.Size = new System.Drawing.Size(168, 21);
this.tbUserId.TabIndex = 6;
//
// tbPwd
//
this.tbPwd.Location = new System.Drawing.Point(87, 102);
this.tbPwd.Name = "tbPwd";
this.tbPwd.PasswordChar = '*';
this.tbPwd.Size = new System.Drawing.Size(168, 21);
this.tbPwd.TabIndex = 7;
//
// btnSave
//
this.btnSave.Location = new System.Drawing.Point(115, 137);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(75, 23);
this.btnSave.TabIndex = 8;
this.btnSave.Text = "保存设置";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// lnkHistory
//
this.lnkHistory.AutoSize = true;
this.lnkHistory.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lnkHistory.LinkColor = System.Drawing.Color.DodgerBlue;
this.lnkHistory.Location = new System.Drawing.Point(28, 142);
this.lnkHistory.Name = "lnkHistory";
this.lnkHistory.Size = new System.Drawing.Size(53, 12);
this.lnkHistory.TabIndex = 9;
this.lnkHistory.TabStop = true;
this.lnkHistory.Text = "历史记录";
this.lnkHistory.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkHistory_LinkClicked);
//
// wDbSetting
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(288, 172);
this.Controls.Add(this.lnkHistory);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.tbPwd);
this.Controls.Add(this.tbUserId);
this.Controls.Add(this.tbDbName);
this.Controls.Add(this.tbLink);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "wDbSetting";
this.Text = "数据库设置";
this.Load += new System.EventHandler(this.wDbSetting_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox tbLink;
private System.Windows.Forms.TextBox tbDbName;
private System.Windows.Forms.TextBox tbUserId;
private System.Windows.Forms.TextBox tbPwd;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.LinkLabel lnkHistory;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
//
using Tools.MyCommon;
using Tools.MyData;
namespace Tools.MyUtils
{
public partial class wDbSetting : wBasic
{
/// <summary>
/// 数据库链接字符串
/// </summary>
public DbItemModel LinkModel { get; private set; }
SmpDB _db = new SmpDB();
DataTable _dt = null;
string link_cfg = $@"{Utils.ConfigPath}\links.xml";
string Link => this.tbLink.Text.Trim();
string DbName => this.tbDbName.Text.Trim();
string UserId => this.tbUserId.Text.Trim();
string Pwd => this.tbPwd.Text.Trim();
public wDbSetting()
{
InitializeComponent();
this.MinimizeBox = false;
this.MaximizeBox = false;
this.DialogResult = DialogResult.None;
}
private void wDbSetting_Load(object sender, EventArgs e)
{
//定义表结构
this._dt = new DataTable("links")
{
Columns = {
{ "Link" , typeof(string) },
{ "DbName" , typeof(string) },
{ "UserId" , typeof(string) },
{ "Pwd" , typeof(string) },
},
};
//如果存在则读取
if (File.Exists(link_cfg))
{
this._dt.ReadXml(link_cfg);
}
}
/// <summary>
/// 保存设置
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnSave_Click(object sender, EventArgs e)
{
//检查链接
this.LinkModel = new DbItemModel { Link = this.Link, DbName = this.DbName, UserId = this.UserId, Pwd = this.Pwd };
if (!this._db.ConnectionTest(this.LinkModel.LinkString))
{
Utils.Tip("数据库链接无效请检查!");
return;
}
//保存历史
var drArray = this._dt.Select($"Link='{this.Link}' and DbName='{this.DbName}' and UserId='{this.UserId}' and Pwd='{this.Pwd}'");
if (drArray.Length == 0)
{
this._dt.Rows.Add(new object[] { this.Link, this.DbName, this.UserId, this.Pwd });
}
this._dt.WriteXml(link_cfg);
//关闭窗口
this.DialogResult = DialogResult.OK;
this.Close();
}
/// <summary>
/// 历史记录
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void lnkHistory_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
var menu = new ContextMenu();
var items = this._dt.Rows.OfType<DataRow>()
.Select(r =>
new DbItemModel
{
Link = r["Link"].ToString(),
DbName = r["DbName"].ToString(),
UserId = r["UserId"].ToString(),
Pwd = r["Pwd"].ToString()
});
;
menu.MenuItems.AddRange(items.Select(m => new MenuItem(m.ToString(), Item_Click) { Tag = m }).ToArray());
menu.Show(this.lnkHistory, new Point(0, this.lnkHistory.Height));
}
/// <summary>
/// 历史记录项点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Item_Click(object sender, EventArgs e)
{
var m = (sender as MenuItem).Tag as DbItemModel;
this.tbLink.Text = m.Link;
this.tbDbName.Text = m.DbName;
this.tbUserId.Text = m.UserId;
this.tbPwd.Text = m.Pwd;
}
}
public class DbItemModel
{
public string Link { get; set; }
public string DbName { get; set; }
public string UserId { get; set; }
public string Pwd { get; set; }
public string LinkString => Utils.GetLinkString(this);
public override string ToString()
{
return $"{this.DbName}({this.Link})";
}
}
}
<?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
namespace Tools.MyUtils
{
partial class wMsgBox
{
/// <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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnDefault = new System.Windows.Forms.Button();
this.tbMessage = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.btnDefault, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.tbMessage, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 4;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 2F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 2F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(240, 128);
this.tableLayoutPanel1.TabIndex = 0;
//
// btnDefault
//
this.btnDefault.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnDefault.Location = new System.Drawing.Point(73, 95);
this.btnDefault.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnDefault.Name = "btnDefault";
this.btnDefault.Size = new System.Drawing.Size(94, 27);
this.btnDefault.TabIndex = 1;
this.btnDefault.Text = "确 定";
this.btnDefault.UseVisualStyleBackColor = true;
//
// tbMessage
//
this.tableLayoutPanel1.SetColumnSpan(this.tbMessage, 3);
this.tbMessage.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbMessage.Location = new System.Drawing.Point(3, 3);
this.tbMessage.Multiline = true;
this.tbMessage.Name = "tbMessage";
this.tbMessage.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.tbMessage.Size = new System.Drawing.Size(234, 83);
this.tbMessage.TabIndex = 2;
//
// wMsgBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(240, 128);
this.Controls.Add(this.tableLayoutPanel1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "wMsgBox";
this.Text = "提示";
this.Load += new System.EventHandler(this.wMsgBox_Load);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Button btnDefault;
private System.Windows.Forms.TextBox tbMessage;
}
}
\ 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;
namespace Tools.MyUtils
{
public partial class wMsgBox : wBasic
{
public wMsgBox()
{
InitializeComponent();
//窗体初始化
this.ShowInTaskbar = false;
//this.MaximizeBox = false;
this.MinimizeBox = false;
this.DialogResult = DialogResult.None;
}
private void wMsgBox_Load(object sender, EventArgs e)
{
this.btnDefault.Click += BtnDefault_Click;
}
private void BtnDefault_Click(object sender, EventArgs e)
{
this.Close();
}
/// <summary>
/// 显示消息窗口(最小256*167)
/// </summary>
/// <param name="msg"></param>
public void Show(string msg, int width = 256, int height = 167)
{
if (width > 256)
this.Width = width;
if (height > 167)
this.Height = height;
this.tbMessage.Text = msg;
this.ShowDialog();
}
}
}
<?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 Tools
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new UI.wDBTools());
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("FTT-Tools")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FTT-Tools")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("c5ab3ce9-c46a-467d-96e4-d80dd3bbb239")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Tools.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.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("Tools.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap excel {
get {
object obj = ResourceManager.GetObject("excel", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap sql {
get {
object obj = ResourceManager.GetObject("sql", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap word {
get {
object obj = ResourceManager.GetObject("word", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 使用说明 {
get {
object obj = ResourceManager.GetObject("使用说明", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 实体类 {
get {
object obj = ResourceManager.GetObject("实体类", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 导出 {
get {
object obj = ResourceManager.GetObject("导出", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 恢复 {
get {
object obj = ResourceManager.GetObject("恢复", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 数据库 {
get {
object obj = ResourceManager.GetObject("数据库", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 暂存 {
get {
object obj = ResourceManager.GetObject("暂存", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 更新 {
get {
object obj = ResourceManager.GetObject("更新", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 查询 {
get {
object obj = ResourceManager.GetObject("查询", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 类 {
get {
object obj = ResourceManager.GetObject("类", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="excel" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\excel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sql" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\sql.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="word" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\word.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">
<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">
<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">
<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">
<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">
<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">
<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">
<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">
<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">
<value>..\Resources\类.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Tools.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.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;
}
}
}
}
<?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>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C5AB3CE9-C46A-467D-96E4-D80DD3BBB239}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Tools</RootNamespace>
<AssemblyName>Tools</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\AppHome\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.6.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\packages\Portable.BouncyCastle.1.8.6\lib\net40\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.2.0.246, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="NPOI, Version=2.5.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.1\lib\net45\NPOI.dll</HintPath>
</Reference>
<Reference Include="NPOI.OOXML, Version=2.5.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.1\lib\net45\NPOI.OOXML.dll</HintPath>
</Reference>
<Reference Include="NPOI.OpenXml4Net, Version=2.5.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.1\lib\net45\NPOI.OpenXml4Net.dll</HintPath>
</Reference>
<Reference Include="NPOI.OpenXmlFormats, Version=2.5.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.1\lib\net45\NPOI.OpenXmlFormats.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MyCommon\wBasic.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MyCommon\wBasic.Designer.cs">
<DependentUpon>wBasic.cs</DependentUpon>
</Compile>
<Compile Include="MyData\SmpDB.cs" />
<Compile Include="MyUtils\wDbSetting.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MyUtils\wDbSetting.Designer.cs">
<DependentUpon>wDbSetting.cs</DependentUpon>
</Compile>
<Compile Include="MyUtils\NPOIExcelHelper.cs" />
<Compile Include="MyUtils\NPOIWordHelper.cs" />
<Compile Include="MyUtils\Utils.cs" />
<Compile Include="MyUtils\wMsgBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MyUtils\wMsgBox.Designer.cs">
<DependentUpon>wMsgBox.cs</DependentUpon>
</Compile>
<Compile Include="UI\wDBTools.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\wDBTools.Designer.cs">
<DependentUpon>wDBTools.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="MyCommon\wBasic.resx">
<DependentUpon>wBasic.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MyUtils\wDbSetting.resx">
<DependentUpon>wDbSetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MyUtils\wMsgBox.resx">
<DependentUpon>wMsgBox.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>
<EmbeddedResource Include="UI\wDBTools.resx">
<DependentUpon>wDBTools.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.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>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\更新.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\导出.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\实体类.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\excel.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\word.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\查询.png" />
</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>
<ItemGroup>
<None Include="Resources\类.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\使用说明.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>
\ No newline at end of file
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="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="Column1.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="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="Column7.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="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>127, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>56</value>
</metadata>
</root>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NPOI" version="2.5.1" targetFramework="net461" />
<package id="Portable.BouncyCastle" version="1.8.6" targetFramework="net461" />
<package id="SharpZipLib" version="1.2.0" targetFramework="net461" />
</packages>
\ No newline at end of file
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