Commit 640d9c28 authored by tr's avatar tr

1、系统检查功能配置窗口(初版)

parent bbfd052c
No preview for this file type
No preview for this file type
...@@ -18,4 +18,10 @@ ...@@ -18,4 +18,10 @@
<UserId>sa</UserId> <UserId>sa</UserId>
<Pwd>sa</Pwd> <Pwd>sa</Pwd>
</links> </links>
<links>
<Link>192.168.1.204</Link>
<DbName>FTT</DbName>
<UserId>sa</UserId>
<Pwd>sa</Pwd>
</links>
</DocumentElement> </DocumentElement>
\ No newline at end of file
...@@ -90,6 +90,9 @@ namespace Tools.MyUtils ...@@ -90,6 +90,9 @@ namespace Tools.MyUtils
} }
return s; return s;
} }
#region 数据库链接处理
/// <summary> /// <summary>
/// 生成数据库链接字符串 /// 生成数据库链接字符串
/// </summary> /// </summary>
...@@ -137,6 +140,75 @@ namespace Tools.MyUtils ...@@ -137,6 +140,75 @@ namespace Tools.MyUtils
return m; return m;
} }
#endregion
#region DataTable増行扩展
/// <summary>
/// 【自定义扩展】获取一个新行
/// </summary>
/// <param name="dt"></param>
/// <returns></returns>
public static DataRow GetNewRow(this DataTable dt)
{
var result = dt.NewRow();
//非空列默认赋值为0
foreach (DataColumn c in dt.Columns)
{
if (c.AllowDBNull || c.AutoIncrement)
continue;
//非空列处理:主键列根据列类型生成;非主键列统一用0初始化
result[c.ColumnName] = dt.PrimaryKey.Contains(c) ? GetDefaultPrimaryKey(c) : "0";
result.EndEdit();
}
//当有筛选条件时,默认赋值筛选字段
if (dt.DefaultView.RowFilter != null)
{
string filter = dt.DefaultView.RowFilter;
//按and和or拆分子字符串,并移除空串项(这个处理规则相对简单;其他复杂规则后续遇到时添加)
string[] sArray = filter.Split(new string[] { "and", "or", "AND", "OR", "And", "Or" }, StringSplitOptions.RemoveEmptyEntries);
foreach (string s in sArray)
{
string[] pair = s.Split('=');
string col = pair[0].Trim();
string val = pair[1].Trim();
if (dt.Columns.Contains(col))
{
result[col] = val.Trim('\'');
result.EndEdit();
}
}
}
return result;
}
/// <summary>
/// 【私有】获取默认主键值(防止创建新行时,主键为空报错)
/// </summary>
/// <param name="c"></param>
/// <returns></returns>
private static string GetDefaultPrimaryKey(DataColumn c)
{
var result = "";
var typeName = c.DataType.Name.ToLower();
if (typeName.Equals("int32") || typeName.Equals("int64"))
{
var obj = c.Table.Compute($"Max({c.ColumnName})", "1=1");
int.TryParse(obj?.ToString(), out int max);
result = (max + 1).ToString();
}
else if (typeName.Equals("guid"))
{
result = Guid.NewGuid().ToString();
}
else
{
result = $"{c.ColumnName}_{c.Table.Rows.Count}";
}
return result;
}
#endregion
#region 生成Model #region 生成Model
......
...@@ -100,6 +100,16 @@ namespace Tools.Properties { ...@@ -100,6 +100,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>
......
...@@ -130,6 +130,9 @@ ...@@ -130,6 +130,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>
......
...@@ -107,6 +107,12 @@ ...@@ -107,6 +107,12 @@
</Compile> </Compile>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\wSysChecker.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\wSysChecker.Designer.cs">
<DependentUpon>wSysChecker.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>
...@@ -142,6 +148,9 @@ ...@@ -142,6 +148,9 @@
<EmbeddedResource Include="UI\wDBTools.resx"> <EmbeddedResource Include="UI\wDBTools.resx">
<DependentUpon>wDBTools.cs</DependentUpon> <DependentUpon>wDBTools.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UI\wSysChecker.resx">
<DependentUpon>wSysChecker.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="wMain.resx"> <EmbeddedResource Include="wMain.resx">
<DependentUpon>wMain.cs</DependentUpon> <DependentUpon>wMain.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -214,5 +223,8 @@ ...@@ -214,5 +223,8 @@
<ItemGroup> <ItemGroup>
<None Include="Resources\设置.png" /> <None Include="Resources\设置.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Resources\保存.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
namespace Tools.UI
{
partial class wSysChecker
{
/// <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.components = new System.ComponentModel.Container();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvConfig = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.cms1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.tsmiAddRow = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiDelRow = new System.Windows.Forms.ToolStripMenuItem();
this.panel1 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.dgvConfigDetail = new System.Windows.Forms.DataGridView();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column8 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.panel2 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.dgvMessage = new System.Windows.Forms.DataGridView();
this.panel3 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
this.cmbFilter = new System.Windows.Forms.ComboBox();
this.btnIgnore = new System.Windows.Forms.Button();
this.btnHandled = new System.Windows.Forms.Button();
this.btnTodo = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.tsbSave = new System.Windows.Forms.ToolStripButton();
this.tsbRefresh = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.tsbDB = new System.Windows.Forms.ToolStripButton();
this.tstbLinkString = new System.Windows.Forms.ToolStripTextBox();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.tsbHelp = new System.Windows.Forms.ToolStripButton();
this.Column9 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvConfig)).BeginInit();
this.cms1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvConfigDetail)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvMessage)).BeginInit();
this.panel3.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.BackColor = System.Drawing.Color.ForestGreen;
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 25);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.Control;
this.splitContainer1.Panel1.Controls.Add(this.splitContainer2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.BackColor = System.Drawing.SystemColors.Control;
this.splitContainer1.Panel2.Controls.Add(this.dgvMessage);
this.splitContainer1.Panel2.Controls.Add(this.panel3);
this.splitContainer1.Size = new System.Drawing.Size(1029, 551);
this.splitContainer1.SplitterDistance = 463;
this.splitContainer1.SplitterWidth = 6;
this.splitContainer1.TabIndex = 0;
//
// splitContainer2
//
this.splitContainer2.BackColor = System.Drawing.Color.ForestGreen;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.BackColor = System.Drawing.SystemColors.Control;
this.splitContainer2.Panel1.Controls.Add(this.dgvConfig);
this.splitContainer2.Panel1.Controls.Add(this.panel1);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.BackColor = System.Drawing.SystemColors.Control;
this.splitContainer2.Panel2.Controls.Add(this.dgvConfigDetail);
this.splitContainer2.Panel2.Controls.Add(this.panel2);
this.splitContainer2.Size = new System.Drawing.Size(463, 551);
this.splitContainer2.SplitterDistance = 255;
this.splitContainer2.SplitterWidth = 8;
this.splitContainer2.TabIndex = 0;
//
// dgvConfig
//
this.dgvConfig.BackgroundColor = System.Drawing.SystemColors.Window;
this.dgvConfig.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvConfig.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column3,
this.Column4});
this.dgvConfig.ContextMenuStrip = this.cms1;
this.dgvConfig.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvConfig.Location = new System.Drawing.Point(0, 35);
this.dgvConfig.Name = "dgvConfig";
this.dgvConfig.RowTemplate.Height = 23;
this.dgvConfig.Size = new System.Drawing.Size(463, 220);
this.dgvConfig.TabIndex = 1;
//
// Column1
//
this.Column1.DataPropertyName = "ProcName";
this.Column1.HeaderText = "存储过程";
this.Column1.Name = "Column1";
//
// Column2
//
this.Column2.DataPropertyName = "Remark";
this.Column2.HeaderText = "描述信息";
this.Column2.Name = "Column2";
//
// Column3
//
this.Column3.DataPropertyName = "ModuleID";
this.Column3.HeaderText = "模块ID";
this.Column3.Name = "Column3";
//
// Column4
//
this.Column4.DataPropertyName = "IsEnabled";
this.Column4.HeaderText = "启用";
this.Column4.Name = "Column4";
this.Column4.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// cms1
//
this.cms1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmiAddRow,
this.tsmiDelRow});
this.cms1.Name = "cms1";
this.cms1.Size = new System.Drawing.Size(101, 48);
//
// tsmiAddRow
//
this.tsmiAddRow.Name = "tsmiAddRow";
this.tsmiAddRow.Size = new System.Drawing.Size(100, 22);
this.tsmiAddRow.Text = "増行";
//
// tsmiDelRow
//
this.tsmiDelRow.Name = "tsmiDelRow";
this.tsmiDelRow.Size = new System.Drawing.Size(100, 22);
this.tsmiDelRow.Text = "删行";
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(463, 35);
this.panel1.TabIndex = 0;
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Left;
this.label1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(113, 33);
this.label1.TabIndex = 0;
this.label1.Text = " 配置信息-主表";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// dgvConfigDetail
//
this.dgvConfigDetail.BackgroundColor = System.Drawing.SystemColors.Window;
this.dgvConfigDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvConfigDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column5,
this.Column6,
this.Column7,
this.Column8});
this.dgvConfigDetail.ContextMenuStrip = this.cms1;
this.dgvConfigDetail.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvConfigDetail.Location = new System.Drawing.Point(0, 35);
this.dgvConfigDetail.Name = "dgvConfigDetail";
this.dgvConfigDetail.RowTemplate.Height = 23;
this.dgvConfigDetail.Size = new System.Drawing.Size(463, 253);
this.dgvConfigDetail.TabIndex = 1;
//
// Column5
//
this.Column5.DataPropertyName = "ProcName";
this.Column5.HeaderText = "存储过程";
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
//
// Column6
//
this.Column6.DataPropertyName = "SerialNo";
this.Column6.HeaderText = "序号";
this.Column6.Name = "Column6";
//
// Column7
//
this.Column7.DataPropertyName = "Remark";
this.Column7.HeaderText = "说明";
this.Column7.Name = "Column7";
//
// Column8
//
this.Column8.DataPropertyName = "IsEnabled";
this.Column8.HeaderText = "启用";
this.Column8.Name = "Column8";
this.Column8.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.Column8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// panel2
//
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.label2);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(463, 35);
this.panel2.TabIndex = 0;
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Left;
this.label2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(0, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(113, 33);
this.label2.TabIndex = 0;
this.label2.Text = " 配置信息-明细";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// dgvMessage
//
this.dgvMessage.BackgroundColor = System.Drawing.SystemColors.Window;
this.dgvMessage.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvMessage.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column9,
this.Column10,
this.Column11,
this.Column12,
this.Column13,
this.Column14});
this.dgvMessage.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvMessage.Location = new System.Drawing.Point(0, 35);
this.dgvMessage.Name = "dgvMessage";
this.dgvMessage.RowTemplate.Height = 23;
this.dgvMessage.Size = new System.Drawing.Size(560, 516);
this.dgvMessage.TabIndex = 1;
//
// panel3
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.label4);
this.panel3.Controls.Add(this.cmbFilter);
this.panel3.Controls.Add(this.btnIgnore);
this.panel3.Controls.Add(this.btnHandled);
this.panel3.Controls.Add(this.btnTodo);
this.panel3.Controls.Add(this.label3);
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
this.panel3.Location = new System.Drawing.Point(0, 0);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(560, 35);
this.panel3.TabIndex = 0;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(232, 11);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(41, 12);
this.label4.TabIndex = 5;
this.label4.Text = "筛选:";
//
// cmbFilter
//
this.cmbFilter.DisplayMember = "0";
this.cmbFilter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbFilter.FormattingEnabled = true;
this.cmbFilter.Items.AddRange(new object[] {
"未处理",
"已处理",
"忽略",
"全部"});
this.cmbFilter.Location = new System.Drawing.Point(274, 8);
this.cmbFilter.Name = "cmbFilter";
this.cmbFilter.Size = new System.Drawing.Size(74, 20);
this.cmbFilter.TabIndex = 4;
//
// btnIgnore
//
this.btnIgnore.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnIgnore.Location = new System.Drawing.Point(376, 6);
this.btnIgnore.Name = "btnIgnore";
this.btnIgnore.Size = new System.Drawing.Size(54, 23);
this.btnIgnore.TabIndex = 3;
this.btnIgnore.Text = "忽 略";
this.btnIgnore.UseVisualStyleBackColor = true;
//
// btnHandled
//
this.btnHandled.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnHandled.Location = new System.Drawing.Point(490, 6);
this.btnHandled.Name = "btnHandled";
this.btnHandled.Size = new System.Drawing.Size(54, 23);
this.btnHandled.TabIndex = 2;
this.btnHandled.Text = "已处理";
this.btnHandled.UseVisualStyleBackColor = true;
//
// btnTodo
//
this.btnTodo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnTodo.Location = new System.Drawing.Point(433, 6);
this.btnTodo.Name = "btnTodo";
this.btnTodo.Size = new System.Drawing.Size(54, 23);
this.btnTodo.TabIndex = 1;
this.btnTodo.Text = "未处理";
this.btnTodo.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.Dock = System.Windows.Forms.DockStyle.Left;
this.label3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(0, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(100, 33);
this.label3.TabIndex = 0;
this.label3.Text = " 错误消息";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbSave,
this.tsbRefresh,
this.toolStripSeparator2,
this.tsbDB,
this.tstbLinkString,
this.toolStripSeparator1,
this.tsbHelp});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(1029, 25);
this.toolStrip1.TabIndex = 1;
this.toolStrip1.Text = "toolStrip1";
//
// tsbSave
//
this.tsbSave.Image = global::Tools.Properties.Resources.保存;
this.tsbSave.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbSave.Name = "tsbSave";
this.tsbSave.Size = new System.Drawing.Size(52, 22);
this.tsbSave.Text = "保存";
//
// tsbRefresh
//
this.tsbRefresh.Image = global::Tools.Properties.Resources.更新;
this.tsbRefresh.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbRefresh.Name = "tsbRefresh";
this.tsbRefresh.Size = new System.Drawing.Size(52, 22);
this.tsbRefresh.Text = "刷新";
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
//
// tsbDB
//
this.tsbDB.Image = global::Tools.Properties.Resources.数据库;
this.tsbDB.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbDB.Name = "tsbDB";
this.tsbDB.Size = new System.Drawing.Size(64, 22);
this.tsbDB.Text = "数据库";
//
// tstbLinkString
//
this.tstbLinkString.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.tstbLinkString.ForeColor = System.Drawing.Color.Green;
this.tstbLinkString.Name = "tstbLinkString";
this.tstbLinkString.ReadOnly = true;
this.tstbLinkString.Size = new System.Drawing.Size(150, 25);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// tsbHelp
//
this.tsbHelp.Image = global::Tools.Properties.Resources.使用说明;
this.tsbHelp.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbHelp.Name = "tsbHelp";
this.tsbHelp.Size = new System.Drawing.Size(76, 22);
this.tsbHelp.Text = "使用说明";
//
// Column9
//
this.Column9.DataPropertyName = "IsSelect";
this.Column9.HeaderText = "选择";
this.Column9.Name = "Column9";
this.Column9.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.Column9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.Column9.Width = 60;
//
// Column10
//
this.Column10.DataPropertyName = "KeyID";
this.Column10.HeaderText = "主键值";
this.Column10.Name = "Column10";
//
// Column11
//
this.Column11.DataPropertyName = "DocCode";
this.Column11.HeaderText = "单据编号";
this.Column11.Name = "Column11";
//
// Column12
//
this.Column12.DataPropertyName = "Flag";
this.Column12.HeaderText = "处理标志";
this.Column12.Name = "Column12";
//
// Column13
//
this.Column13.DataPropertyName = "Remark";
this.Column13.HeaderText = "错误描述";
this.Column13.Name = "Column13";
//
// Column14
//
this.Column14.DataPropertyName = "InspectDate";
this.Column14.HeaderText = "筛查时间";
this.Column14.Name = "Column14";
//
// wSysChecker
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1029, 576);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.toolStrip1);
this.Name = "wSysChecker";
this.Text = "系统检查配置与查看";
this.Load += new System.EventHandler(this.wSysChecker_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvConfig)).EndInit();
this.cms1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvConfigDetail)).EndInit();
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvMessage)).EndInit();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton tsbSave;
private System.Windows.Forms.ToolStripButton tsbRefresh;
private System.Windows.Forms.ToolStripButton tsbHelp;
private System.Windows.Forms.DataGridView dgvConfig;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.DataGridView dgvConfigDetail;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.DataGridView dgvMessage;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnIgnore;
private System.Windows.Forms.Button btnHandled;
private System.Windows.Forms.Button btnTodo;
private System.Windows.Forms.ComboBox cmbFilter;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewCheckBoxColumn Column4;
private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
private System.Windows.Forms.DataGridViewCheckBoxColumn Column8;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ContextMenuStrip cms1;
private System.Windows.Forms.ToolStripMenuItem tsmiAddRow;
private System.Windows.Forms.ToolStripMenuItem tsmiDelRow;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripButton tsbDB;
private System.Windows.Forms.ToolStripTextBox tstbLinkString;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.DataGridViewCheckBoxColumn Column9;
private System.Windows.Forms.DataGridViewTextBoxColumn Column10;
private System.Windows.Forms.DataGridViewTextBoxColumn Column11;
private System.Windows.Forms.DataGridViewTextBoxColumn Column12;
private System.Windows.Forms.DataGridViewTextBoxColumn Column13;
private System.Windows.Forms.DataGridViewTextBoxColumn Column14;
}
}
\ 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.MyData;
using Tools.MyUtils;
namespace Tools.UI
{
public partial class wSysChecker : wBasic
{
SmpDB _db = new SmpDB();
DataSet _ds = null;
DataTable _dtMessage = null;
string _link = "";
bool _IsFirstLoad = true;
List<TQuery> tableList = null;
/// <summary>
/// 检查配置-主表
/// </summary>
private string T_Config => "Sys_CheckerConfig";
/// <summary>
/// 检查配置-明细
/// </summary>
private string T_ConfigDetail => "Sys_CheckerConfigDetail";
/// <summary>
/// 错误消息
/// </summary>
private string T_Message => "Sys_CheckerMessage";
/// <summary>
/// 上下文菜单-源控件名称
/// </summary>
private string SrcCtrlName => this.cms1.SourceControl.Name;
public wSysChecker()
{
InitializeComponent();
}
private void wSysChecker_Load(object sender, EventArgs e)
{
this.InitData();
this.InitUI();
this._IsFirstLoad = false;
}
private void InitData()
{
//第一次不加载
if (this._IsFirstLoad)
return;
//获取数据
if (string.IsNullOrEmpty(this._link))
{
Utils.Tip("请先选择目标数据库!");
return;
}
try
{
tableList = new List<TQuery> {
new TQuery(this.T_Config, $"select * from {this.T_Config}") ,
new TQuery(this.T_ConfigDetail, $"select * from {this.T_ConfigDetail}") ,
};
this._ds = this._db.GetData(this._link, tableList, true);
this._dtMessage = this._db.GetDataTable(this._link, $"select * from {this.T_Message}", this.T_Message);
}
catch (Exception ex)
{
Utils.Tip($"获取数据出错:\r\n{ex.Message}");
return;
}
//设置数据源
this.dgvConfig.DataSource = this._ds.Tables[this.T_Config];
this.dgvConfigDetail.DataSource = this._ds.Tables[this.T_ConfigDetail];
//错误消息
this._dtMessage.Columns.Add("IsSelect", typeof(bool));
this.cmbFilter.SelectedIndex = 0; //筛选默认为:未处理
this._dtMessage.DefaultView.RowFilter = $"Flag = '{this.cmbFilter.Text}'";
this.dgvMessage.DataSource = this._dtMessage;
}
private void InitUI()
{
//初始化数据表格
this.InitGridView(this.dgvConfig);
this.InitGridView(this.dgvConfigDetail);
this.InitGridView(this.dgvMessage);
//工具栏-事件
this.tsbSave.Click += TsbSave_Click;
this.tsbRefresh.Click += TsbRefresh_Click;
this.tsbDB.Click += TsbDB_Click;
this.tsbHelp.Click += TsbHelp_Click;
//数据表格-事件
this.dgvConfig.RowEnter += DgvConfig_RowEnter;
//上下文菜单-事件
this.tsmiAddRow.Click += TsmiAddRow_Click;
this.tsmiDelRow.Click += TsmiDelRow_Click;
//错误消息-相关事件
this.cmbFilter.SelectedIndexChanged += CmbFilter_SelectedIndexChanged;
this.btnIgnore.Click += BtnIgnore_Click;
this.btnTodo.Click += BtnTodo_Click;
this.btnHandled.Click += BtnHandled_Click;
}
#region 工具栏-事件
private void TsbSave_Click(object sender, EventArgs e)
{
if (!this.CheckDataSource())
return;
//结束编辑
this.dgvConfig.CommitEdit(DataGridViewDataErrorContexts.Display);
this.dgvConfigDetail.CommitEdit(DataGridViewDataErrorContexts.Display);
this.DataSetEndEdit(this._ds);
//保存配置信息
if (this._ds.HasChanges())
{
this._db.SaveData(this._link, this._ds, this.tableList);
}
Utils.Tip("保存成功!");
}
private void TsbRefresh_Click(object sender, EventArgs e)
{
this.InitData();
}
private void TsbDB_Click(object sender, EventArgs e)
{
//数据库
var frm = new wDbSetting();
if (frm.ShowDialog() == DialogResult.OK)
{
this.SetDbLink(frm.LinkModel);
this.TsbRefresh_Click(null, null);
}
}
private void TsbHelp_Click(object sender, EventArgs e)
{
//帮助信息:最后处理
}
#endregion
#region 数据表格-事件
private void DgvConfig_RowEnter(object sender, DataGridViewCellEventArgs e)
{
//行改变时,刷新子表筛选条件
if (e.RowIndex > -1)
{
var procName = this._ds.Tables[this.T_Config].DefaultView[e.RowIndex]["ProcName"];
this._ds.Tables[this.T_ConfigDetail].DefaultView.RowFilter = $"ProcName = '{procName}'";
}
}
#endregion
#region 上下文菜单-事件
private void TsmiAddRow_Click(object sender, EventArgs e)
{
if (!this.CheckDataSource())
return;
//
if (this.SrcCtrlName == this.dgvConfig.Name)
{
this.AddRow(this.T_Config);
}
else if (this.SrcCtrlName == this.dgvConfigDetail.Name)
{
this.AddRow(this.T_ConfigDetail);
}
}
private void TsmiDelRow_Click(object sender, EventArgs e)
{
if (!this.CheckDataSource())
return;
//
if (this.SrcCtrlName == this.dgvConfig.Name)
{
this.DelCurrentRow(this.T_Config, this.dgvConfig);
}
else if (this.SrcCtrlName == this.dgvConfigDetail.Name)
{
this.DelCurrentRow(this.T_ConfigDetail, this.dgvConfigDetail);
}
}
/// <summary>
/// 増行
/// </summary>
/// <param name="tableName"></param>
private void AddRow(string tableName)
{
if (!this._ds.Tables.Contains(tableName))
return;
//
var dt = this._ds.Tables[tableName];
dt.Rows.Add(dt.GetNewRow());
}
/// <summary>
/// 删行
/// </summary>
/// <param name="tableName"></param>
/// <param name="rowIndex"></param>
private void DelCurrentRow(string tableName, DataGridView dgv)
{
if (!this._ds.Tables.Contains(tableName) || dgv.CurrentRow == null)
return;
//
var dt = this._ds.Tables[tableName];
var rowIndex = dgv.CurrentRow.Index;
if (rowIndex >= 0 && rowIndex < dt.DefaultView.Count)
{
dt.DefaultView[rowIndex].Delete();
}
}
#endregion
#region 错误消息-相关事件
private void CmbFilter_SelectedIndexChanged(object sender, EventArgs e)
{
if (!this.CheckDataSource())
return;
var text = this.cmbFilter.Text;
string filter = "";
if (!string.IsNullOrEmpty(text) && text != "全部")
{
filter = $"Flag = '{text}'";
}
this._dtMessage.DefaultView.RowFilter = filter;
}
private void BtnIgnore_Click(object sender, EventArgs e)
{
this.SetFlag("忽略");
}
private void BtnTodo_Click(object sender, EventArgs e)
{
this.SetFlag("未处理");
}
private void BtnHandled_Click(object sender, EventArgs e)
{
this.SetFlag("已处理");
}
/// <summary>
/// 设置处理标记
/// </summary>
/// <param name="flag"></param>
private void SetFlag(string flag)
{
int effect = 0;
foreach (DataRowView r in this._dtMessage.DefaultView)
{
if (Convert.ToBoolean(r["IsSelect"]))
{
effect++;
r["Flag"] = flag;
r.EndEdit();
}
}
//保存结果
this.SaveMessage();
Utils.Tip($"已将勾选的{effect}行数据,标记为{flag}!");
}
/// <summary>
/// 保存错误消息
/// </summary>
private void SaveMessage()
{
this._db.SaveDataTable(this._link, this._dtMessage);
}
#endregion
/// <summary>
/// 设置数据库链接
/// </summary>
/// <param name="m"></param>
private void SetDbLink(DbItemModel m)
{
this._link = m.LinkString;
this.tstbLinkString.Text = m.ToString();
}
/// <summary>
/// 初始化数据表格
/// </summary>
/// <param name="dgv"></param>
private void InitGridView(DataGridView dgv)
{
dgv.AllowUserToAddRows = false;
dgv.AutoGenerateColumns = false;
dgv.RowHeadersVisible = false;
dgv.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
}
/// <summary>
/// 检查数据源
/// </summary>
/// <returns></returns>
private bool CheckDataSource()
{
var result = true;
if (this._ds == null || this._dtMessage == null)
{
Utils.Tip("数据源为空,请刷新试试!");
result = false;
}
return result;
}
/// <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();
}
}
}
}
}
}
<?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="cms1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>127, 17</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>
<metadata name="Column14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<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="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>
<metadata name="Column14.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
...@@ -21,6 +21,7 @@ namespace Tools ...@@ -21,6 +21,7 @@ namespace Tools
case "PatchPack": result = new Ftt.PatchPack.FrmMain(); break; case "PatchPack": result = new Ftt.PatchPack.FrmMain(); break;
case "DbDevelopTool": result = new UI.wDBTools(); break; case "DbDevelopTool": result = new UI.wDBTools(); break;
case "DbAnlysis": result = new UI.wDbAnlysis(); break; case "DbAnlysis": result = new UI.wDbAnlysis(); break;
case "CheckConfig": result = new UI.wSysChecker(); break;
default: break; default: break;
} }
......
...@@ -34,13 +34,14 @@ ...@@ -34,13 +34,14 @@
this.btnDbDevelopTool = new System.Windows.Forms.Button(); this.btnDbDevelopTool = new System.Windows.Forms.Button();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.btnDbAnlysis = new System.Windows.Forms.Button(); this.btnDbAnlysis = new System.Windows.Forms.Button();
this.btnCheckConfig = new System.Windows.Forms.Button();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnUpdateExecuter // btnUpdateExecuter
// //
this.btnUpdateExecuter.BackColor = System.Drawing.SystemColors.Control; this.btnUpdateExecuter.BackColor = System.Drawing.SystemColors.Control;
this.btnUpdateExecuter.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnUpdateExecuter.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnUpdateExecuter.Location = new System.Drawing.Point(58, 25); this.btnUpdateExecuter.Location = new System.Drawing.Point(58, 12);
this.btnUpdateExecuter.Name = "btnUpdateExecuter"; this.btnUpdateExecuter.Name = "btnUpdateExecuter";
this.btnUpdateExecuter.Size = new System.Drawing.Size(135, 25); this.btnUpdateExecuter.Size = new System.Drawing.Size(135, 25);
this.btnUpdateExecuter.TabIndex = 0; this.btnUpdateExecuter.TabIndex = 0;
...@@ -51,7 +52,7 @@ ...@@ -51,7 +52,7 @@
// //
this.btnPatchPack.BackColor = System.Drawing.SystemColors.Control; this.btnPatchPack.BackColor = System.Drawing.SystemColors.Control;
this.btnPatchPack.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnPatchPack.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnPatchPack.Location = new System.Drawing.Point(58, 64); this.btnPatchPack.Location = new System.Drawing.Point(58, 51);
this.btnPatchPack.Name = "btnPatchPack"; this.btnPatchPack.Name = "btnPatchPack";
this.btnPatchPack.Size = new System.Drawing.Size(135, 25); this.btnPatchPack.Size = new System.Drawing.Size(135, 25);
this.btnPatchPack.TabIndex = 1; this.btnPatchPack.TabIndex = 1;
...@@ -62,7 +63,7 @@ ...@@ -62,7 +63,7 @@
// //
this.btnDbDevelopTool.BackColor = System.Drawing.SystemColors.Control; this.btnDbDevelopTool.BackColor = System.Drawing.SystemColors.Control;
this.btnDbDevelopTool.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnDbDevelopTool.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnDbDevelopTool.Location = new System.Drawing.Point(58, 103); this.btnDbDevelopTool.Location = new System.Drawing.Point(58, 90);
this.btnDbDevelopTool.Name = "btnDbDevelopTool"; this.btnDbDevelopTool.Name = "btnDbDevelopTool";
this.btnDbDevelopTool.Size = new System.Drawing.Size(135, 25); this.btnDbDevelopTool.Size = new System.Drawing.Size(135, 25);
this.btnDbDevelopTool.TabIndex = 2; this.btnDbDevelopTool.TabIndex = 2;
...@@ -73,19 +74,31 @@ ...@@ -73,19 +74,31 @@
// //
this.btnDbAnlysis.BackColor = System.Drawing.SystemColors.Control; this.btnDbAnlysis.BackColor = System.Drawing.SystemColors.Control;
this.btnDbAnlysis.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnDbAnlysis.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnDbAnlysis.Location = new System.Drawing.Point(58, 142); this.btnDbAnlysis.Location = new System.Drawing.Point(58, 129);
this.btnDbAnlysis.Name = "btnDbAnlysis"; this.btnDbAnlysis.Name = "btnDbAnlysis";
this.btnDbAnlysis.Size = new System.Drawing.Size(135, 25); this.btnDbAnlysis.Size = new System.Drawing.Size(135, 25);
this.btnDbAnlysis.TabIndex = 3; this.btnDbAnlysis.TabIndex = 3;
this.btnDbAnlysis.Text = "简易SQL效率分析"; this.btnDbAnlysis.Text = "简易SQL效率分析";
this.btnDbAnlysis.UseVisualStyleBackColor = false; this.btnDbAnlysis.UseVisualStyleBackColor = false;
// //
// btnCheckConfig
//
this.btnCheckConfig.BackColor = System.Drawing.SystemColors.Control;
this.btnCheckConfig.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCheckConfig.Location = new System.Drawing.Point(58, 168);
this.btnCheckConfig.Name = "btnCheckConfig";
this.btnCheckConfig.Size = new System.Drawing.Size(135, 25);
this.btnCheckConfig.TabIndex = 4;
this.btnCheckConfig.Text = "系统检查配置工具";
this.btnCheckConfig.UseVisualStyleBackColor = false;
//
// wMain // wMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window; this.BackColor = System.Drawing.SystemColors.Window;
this.ClientSize = new System.Drawing.Size(257, 198); this.ClientSize = new System.Drawing.Size(251, 272);
this.Controls.Add(this.btnCheckConfig);
this.Controls.Add(this.btnDbAnlysis); this.Controls.Add(this.btnDbAnlysis);
this.Controls.Add(this.btnDbDevelopTool); this.Controls.Add(this.btnDbDevelopTool);
this.Controls.Add(this.btnPatchPack); this.Controls.Add(this.btnPatchPack);
...@@ -104,5 +117,6 @@ ...@@ -104,5 +117,6 @@
private System.Windows.Forms.Button btnDbDevelopTool; private System.Windows.Forms.Button btnDbDevelopTool;
private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.Button btnDbAnlysis; private System.Windows.Forms.Button btnDbAnlysis;
private System.Windows.Forms.Button btnCheckConfig;
} }
} }
\ No newline at end of file
...@@ -29,6 +29,7 @@ namespace Tools ...@@ -29,6 +29,7 @@ namespace Tools
this.btnPatchPack.Click += Button_Click; this.btnPatchPack.Click += Button_Click;
this.btnDbDevelopTool.Click += Button_Click; this.btnDbDevelopTool.Click += Button_Click;
this.btnDbAnlysis.Click += Button_Click; this.btnDbAnlysis.Click += Button_Click;
this.btnCheckConfig.Click += Button_Click;
} }
private void Button_Click(object sender, EventArgs e) private void Button_Click(object sender, EventArgs e)
......
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