From 39b372018db4bfeabcc7628b53e9156d7ff4ca3c Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期三, 08 七月 2020 15:17:35 +0800
Subject: [PATCH] 数据查询 界面设计 + excel导出帮助类
---
src/Bro.M071.DBManager/packages.config | 1
src/Bro.M071.Process/UI/M071_DataForm.resx | 120 ++++++++++
src/Bro.M071.DBManager/Bro.M071.DBManager.csproj | 8
src/Bro.M071.Process/Bro.M071.Process.csproj | 9
src/Bro.M071.Process/UI/M071_DataForm.cs | 22 +
src/Bro.M071.Process/UI/M071_DataForm.Designer.cs | 413 ++++++++++++++++++++++++++++++++++
src/Bro.M071.DBManager/ExcelExportHelper.cs | 143 +++++++++++
7 files changed, 716 insertions(+), 0 deletions(-)
diff --git a/src/Bro.M071.DBManager/Bro.M071.DBManager.csproj b/src/Bro.M071.DBManager/Bro.M071.DBManager.csproj
index 205630a..5919d1c 100644
--- a/src/Bro.M071.DBManager/Bro.M071.DBManager.csproj
+++ b/src/Bro.M071.DBManager/Bro.M071.DBManager.csproj
@@ -80,6 +80,10 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\packages\EntityFramework.6.4.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
+ <Reference Include="EPPlus, Version=5.2.0.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL">
+ <HintPath>..\..\packages\EPPlus.5.2.0\lib\net45\EPPlus.dll</HintPath>
+ </Reference>
+ <Reference Include="PresentationCore" />
<Reference Include="SQLite.CodeFirst, Version=1.5.3.29, Culture=neutral, PublicKeyToken=eb96ba0a78d831a7, processorArchitecture=MSIL">
<HintPath>..\..\packages\SQLite.CodeFirst.1.5.3.29\lib\net45\SQLite.CodeFirst.dll</HintPath>
</Reference>
@@ -99,6 +103,9 @@
<Reference Include="System.Data.SQLite.Linq, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.112.0\lib\net451\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Security" />
+ <Reference Include="System.Threading.Tasks" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@@ -107,6 +114,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="ExcelExportHelper.cs" />
<Compile Include="KeyUnitDataManager.cs" />
<Compile Include="MeasurementAndKeyDataRelationManager.cs" />
<Compile Include="ModelManager.cs" />
diff --git a/src/Bro.M071.DBManager/ExcelExportHelper.cs b/src/Bro.M071.DBManager/ExcelExportHelper.cs
new file mode 100644
index 0000000..9679f71
--- /dev/null
+++ b/src/Bro.M071.DBManager/ExcelExportHelper.cs
@@ -0,0 +1,143 @@
+锘縰sing OfficeOpenXml;
+using OfficeOpenXml.Style;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Linq;
+
+namespace Bro.Process.DBManager
+{
+ /// <summary>
+ /// Excel瀵煎嚭甯姪绫�
+ /// </summary>
+ public class ExcelExportHelper
+ {
+ public static string ExcelContentType => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+ /// <summary>
+ /// List杞珼ataTable
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="data"></param>
+ /// <returns></returns>
+ public static DataTable ListToDataTable<T>(List<T> data)
+ {
+ PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(typeof(T));
+ DataTable dataTable = new DataTable();
+ for (int i = 0; i < properties.Count; i++)
+ {
+ PropertyDescriptor property = properties[i];
+ dataTable.Columns.Add(property.Name, Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType);
+ }
+ object[] values = new object[properties.Count];
+ foreach (T item in data)
+ {
+ for (int i = 0; i < values.Length; i++)
+ {
+ values[i] = properties[i].GetValue(item);
+ }
+ dataTable.Rows.Add(values);
+ }
+ return dataTable;
+ }
+
+ /// <summary>
+ /// 瀵煎嚭Excel
+ /// </summary>
+ /// <param name="dataTable">鏁版嵁婧�</param>
+ /// <param name="heading">宸ヤ綔绨縒orksheet</param>
+ /// <param name="showSrNo">//鏄惁鏄剧ず琛岀紪鍙�</param>
+ /// <param name="columnsToTake">瑕佸鍑虹殑鍒�</param>
+ /// <returns></returns>
+ public static byte[] ExportExcel(DataTable dataTable, string heading = "", bool showSrNo = false, params string[] columnsToTake)
+ {
+ byte[] result;
+ using (ExcelPackage package = new ExcelPackage())
+ {
+ ExcelWorksheet workSheet = package.Workbook.Worksheets.Add($"{heading}Data");
+ int startRowFrom = string.IsNullOrEmpty(heading) ? 1 : 3; //寮�濮嬬殑琛�
+ //鏄惁鏄剧ず琛岀紪鍙�
+ if (showSrNo)
+ {
+ DataColumn dataColumn = dataTable.Columns.Add("#", typeof(int));
+ dataColumn.SetOrdinal(0);
+ int index = 1;
+ foreach (DataRow item in dataTable.Rows)
+ {
+ item[0] = index;
+ index++;
+ }
+ }
+ //Add Content Into the Excel File
+ workSheet.Cells["A" + startRowFrom].LoadFromDataTable(dataTable, true);
+ // autofit width of cells with small content
+ int columnIndex = 1;
+ foreach (DataColumn item in dataTable.Columns)
+ {
+ ExcelRange columnCells = workSheet.Cells[workSheet.Dimension.Start.Row, columnIndex, workSheet.Dimension.End.Row, columnIndex];
+ int maxLength = columnCells.Max(cell => cell.Value.ToString().Count());
+ if (maxLength < 150)
+ {
+ workSheet.Column(columnIndex).AutoFit();
+ }
+ columnIndex++;
+ }
+ // format header - bold, yellow on black
+ using (ExcelRange r = workSheet.Cells[startRowFrom, 1, startRowFrom, dataTable.Columns.Count])
+ {
+ r.Style.Font.Color.SetColor(System.Drawing.Color.White);
+ r.Style.Font.Bold = true;
+ r.Style.Fill.PatternType = ExcelFillStyle.Solid;
+ r.Style.Fill.BackgroundColor.SetColor(System.Drawing.ColorTranslator.FromHtml("#1fb5ad"));
+ }
+ // format cells - add borders
+ using (ExcelRange r = workSheet.Cells[startRowFrom + 1, 1, startRowFrom + dataTable.Rows.Count, dataTable.Columns.Count])
+ {
+ r.Style.Border.Top.Style = ExcelBorderStyle.Thin;
+ r.Style.Border.Bottom.Style = ExcelBorderStyle.Thin;
+ r.Style.Border.Left.Style = ExcelBorderStyle.Thin;
+ r.Style.Border.Right.Style = ExcelBorderStyle.Thin;
+ r.Style.Border.Top.Color.SetColor(System.Drawing.Color.Black);
+ r.Style.Border.Bottom.Color.SetColor(System.Drawing.Color.Black);
+ r.Style.Border.Left.Color.SetColor(System.Drawing.Color.Black);
+ r.Style.Border.Right.Color.SetColor(System.Drawing.Color.Black);
+ }
+ // removed ignored columns
+ for (int i = dataTable.Columns.Count - 1; i >= 0; i--)
+ {
+ if (i == 0 && showSrNo)
+ {
+ continue;
+ }
+ if (!columnsToTake.Contains(dataTable.Columns[i].ColumnName))
+ {
+ workSheet.DeleteColumn(i + 1);
+ }
+ }
+ if (!string.IsNullOrEmpty(heading))
+ {
+ workSheet.Cells["A1"].Value = heading;
+ workSheet.Cells["A1"].Style.Font.Size = 20;
+ workSheet.InsertColumn(1, 1);
+ workSheet.InsertRow(1, 1);
+ workSheet.Column(1).Width = 5;
+ }
+ result = package.GetAsByteArray();
+ }
+ return result;
+ }
+ /// <summary>
+ /// 瀵煎嚭Excel
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="data"></param>
+ /// <param name="heading"></param>
+ /// <param name="isShowSlNo"></param>
+ /// <param name="columnsToTake"></param>
+ /// <returns></returns>
+ public static byte[] ExportExcel<T>(List<T> data, string heading = "", bool isShowSlNo = false, params string[] columnsToTake)
+ {
+ return ExportExcel(ListToDataTable(data), heading, isShowSlNo, columnsToTake);
+ }
+ }
+}
diff --git a/src/Bro.M071.DBManager/packages.config b/src/Bro.M071.DBManager/packages.config
index 455fb3e..60bc1ae 100644
--- a/src/Bro.M071.DBManager/packages.config
+++ b/src/Bro.M071.DBManager/packages.config
@@ -1,6 +1,7 @@
锘�<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.4.0" targetFramework="net452" />
+ <package id="EPPlus" version="5.2.0" targetFramework="net452" />
<package id="SQLite.CodeFirst" version="1.5.3.29" targetFramework="net452" />
<package id="System.Data.SQLite" version="1.0.112.0" targetFramework="net452" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net452" />
diff --git a/src/Bro.M071.Process/Bro.M071.Process.csproj b/src/Bro.M071.Process/Bro.M071.Process.csproj
index 0d1e6c9..c81ab99 100644
--- a/src/Bro.M071.Process/Bro.M071.Process.csproj
+++ b/src/Bro.M071.Process/Bro.M071.Process.csproj
@@ -119,6 +119,12 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\KeyIndicator.cs" />
<Compile Include="UI\M071Node.cs" />
+ <Compile Include="UI\M071_DataForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="UI\M071_DataForm.Designer.cs">
+ <DependentUpon>M071_DataForm.cs</DependentUpon>
+ </Compile>
<Compile Include="UI\M071_MainForm.cs">
<SubType>Form</SubType>
</Compile>
@@ -140,6 +146,9 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
+ <EmbeddedResource Include="UI\M071_DataForm.resx">
+ <DependentUpon>M071_DataForm.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="UI\M071_MainForm.resx">
<DependentUpon>M071_MainForm.cs</DependentUpon>
</EmbeddedResource>
diff --git a/src/Bro.M071.Process/UI/M071_DataForm.Designer.cs b/src/Bro.M071.Process/UI/M071_DataForm.Designer.cs
new file mode 100644
index 0000000..b475e6a
--- /dev/null
+++ b/src/Bro.M071.Process/UI/M071_DataForm.Designer.cs
@@ -0,0 +1,413 @@
+锘縩amespace Bro.M071.Process.UI
+{
+ partial class M071_DataForm
+ {
+ /// <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.tabControl1 = new System.Windows.Forms.TabControl();
+ this.tabPage1 = new System.Windows.Forms.TabPage();
+ this.tabPage2 = new System.Windows.Forms.TabPage();
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.label1 = new System.Windows.Forms.Label();
+ this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.button3 = new System.Windows.Forms.Button();
+ this.button4 = new System.Windows.Forms.Button();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.dataGridView1 = new System.Windows.Forms.DataGridView();
+ this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
+ this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.panel2 = new System.Windows.Forms.Panel();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.button5 = new System.Windows.Forms.Button();
+ this.button6 = new System.Windows.Forms.Button();
+ this.button7 = new System.Windows.Forms.Button();
+ this.button8 = new System.Windows.Forms.Button();
+ this.label2 = new System.Windows.Forms.Label();
+ this.dataGridView2 = new System.Windows.Forms.DataGridView();
+ this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
+ this.tabControl1.SuspendLayout();
+ this.tabPage1.SuspendLayout();
+ this.tabPage2.SuspendLayout();
+ this.tableLayoutPanel1.SuspendLayout();
+ this.panel1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+ this.tableLayoutPanel3.SuspendLayout();
+ this.panel2.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
+ this.SuspendLayout();
+ //
+ // tabControl1
+ //
+ this.tabControl1.Controls.Add(this.tabPage1);
+ this.tabControl1.Controls.Add(this.tabPage2);
+ this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tabControl1.Location = new System.Drawing.Point(0, 0);
+ this.tabControl1.Name = "tabControl1";
+ this.tabControl1.SelectedIndex = 0;
+ this.tabControl1.Size = new System.Drawing.Size(1024, 717);
+ this.tabControl1.TabIndex = 0;
+ //
+ // tabPage1
+ //
+ this.tabPage1.Controls.Add(this.tableLayoutPanel1);
+ this.tabPage1.Location = new System.Drawing.Point(4, 22);
+ this.tabPage1.Name = "tabPage1";
+ this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage1.Size = new System.Drawing.Size(1016, 691);
+ this.tabPage1.TabIndex = 0;
+ this.tabPage1.Text = "浜у搧鐢熶骇璁板綍";
+ this.tabPage1.UseVisualStyleBackColor = true;
+ //
+ // tabPage2
+ //
+ this.tabPage2.Controls.Add(this.tableLayoutPanel3);
+ this.tabPage2.Location = new System.Drawing.Point(4, 22);
+ this.tabPage2.Name = "tabPage2";
+ this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage2.Size = new System.Drawing.Size(1016, 691);
+ this.tabPage2.TabIndex = 1;
+ this.tabPage2.Text = "娴嬮噺缁撴灉鏁版嵁";
+ this.tabPage2.UseVisualStyleBackColor = true;
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.ColumnCount = 2;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel1.Controls.Add(this.groupBox1, 1, 0);
+ this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 2);
+ this.tableLayoutPanel1.Controls.Add(this.dataGridView1, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 0);
+ this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 3;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F));
+ 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, 30F));
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(1010, 685);
+ this.tableLayoutPanel1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox1.Location = new System.Drawing.Point(760, 3);
+ this.groupBox1.Name = "groupBox1";
+ this.tableLayoutPanel1.SetRowSpan(this.groupBox1, 3);
+ this.groupBox1.Size = new System.Drawing.Size(247, 679);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "鏄庣粏";
+ //
+ // panel1
+ //
+ this.panel1.Controls.Add(this.textBox1);
+ this.panel1.Controls.Add(this.button4);
+ this.panel1.Controls.Add(this.button3);
+ this.panel1.Controls.Add(this.button2);
+ this.panel1.Controls.Add(this.button1);
+ this.panel1.Controls.Add(this.label1);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(3, 658);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(751, 24);
+ this.panel1.TabIndex = 1;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
+ this.label1.Location = new System.Drawing.Point(3, 3);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(42, 17);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "label1";
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(416, 1);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(55, 23);
+ this.button1.TabIndex = 1;
+ this.button1.Text = "绗竴椤�";
+ this.button1.UseVisualStyleBackColor = true;
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(477, 1);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(55, 23);
+ this.button2.TabIndex = 1;
+ this.button2.Text = "鍓嶄竴椤�";
+ this.button2.UseVisualStyleBackColor = true;
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(632, 1);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(55, 23);
+ this.button3.TabIndex = 1;
+ this.button3.Text = "鍚庝竴椤�";
+ this.button3.UseVisualStyleBackColor = true;
+ //
+ // button4
+ //
+ this.button4.Location = new System.Drawing.Point(693, 0);
+ this.button4.Name = "button4";
+ this.button4.Size = new System.Drawing.Size(55, 23);
+ this.button4.TabIndex = 1;
+ this.button4.Text = "鏈�鍚庨〉";
+ this.button4.UseVisualStyleBackColor = true;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(542, 2);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(80, 21);
+ this.textBox1.TabIndex = 2;
+ //
+ // dataGridView1
+ //
+ this.dataGridView1.AllowUserToAddRows = false;
+ this.dataGridView1.AllowUserToDeleteRows = false;
+ this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.MenuBar;
+ this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridView1.Location = new System.Drawing.Point(3, 73);
+ this.dataGridView1.Name = "dataGridView1";
+ this.dataGridView1.ReadOnly = true;
+ this.dataGridView1.RowTemplate.Height = 23;
+ this.dataGridView1.Size = new System.Drawing.Size(751, 579);
+ this.dataGridView1.TabIndex = 2;
+ //
+ // tableLayoutPanel2
+ //
+ this.tableLayoutPanel2.ColumnCount = 8;
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3);
+ this.tableLayoutPanel2.Name = "tableLayoutPanel2";
+ this.tableLayoutPanel2.RowCount = 2;
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel2.Size = new System.Drawing.Size(751, 64);
+ this.tableLayoutPanel2.TabIndex = 3;
+ //
+ // tableLayoutPanel3
+ //
+ this.tableLayoutPanel3.ColumnCount = 2;
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel3.Controls.Add(this.groupBox2, 1, 0);
+ this.tableLayoutPanel3.Controls.Add(this.panel2, 0, 2);
+ this.tableLayoutPanel3.Controls.Add(this.dataGridView2, 0, 1);
+ this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel4, 0, 0);
+ this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 3);
+ this.tableLayoutPanel3.Name = "tableLayoutPanel3";
+ this.tableLayoutPanel3.RowCount = 3;
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F));
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+ this.tableLayoutPanel3.Size = new System.Drawing.Size(1010, 685);
+ this.tableLayoutPanel3.TabIndex = 1;
+ //
+ // groupBox2
+ //
+ this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox2.Location = new System.Drawing.Point(760, 3);
+ this.groupBox2.Name = "groupBox2";
+ this.tableLayoutPanel3.SetRowSpan(this.groupBox2, 3);
+ this.groupBox2.Size = new System.Drawing.Size(247, 679);
+ this.groupBox2.TabIndex = 0;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "鏄庣粏";
+ //
+ // panel2
+ //
+ this.panel2.Controls.Add(this.textBox2);
+ this.panel2.Controls.Add(this.button5);
+ this.panel2.Controls.Add(this.button6);
+ this.panel2.Controls.Add(this.button7);
+ this.panel2.Controls.Add(this.button8);
+ this.panel2.Controls.Add(this.label2);
+ this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel2.Location = new System.Drawing.Point(3, 658);
+ this.panel2.Name = "panel2";
+ this.panel2.Size = new System.Drawing.Size(751, 24);
+ this.panel2.TabIndex = 1;
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(542, 2);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(80, 21);
+ this.textBox2.TabIndex = 2;
+ //
+ // button5
+ //
+ this.button5.Location = new System.Drawing.Point(693, 0);
+ this.button5.Name = "button5";
+ this.button5.Size = new System.Drawing.Size(55, 23);
+ this.button5.TabIndex = 1;
+ this.button5.Text = "鏈�鍚庨〉";
+ this.button5.UseVisualStyleBackColor = true;
+ //
+ // button6
+ //
+ this.button6.Location = new System.Drawing.Point(632, 1);
+ this.button6.Name = "button6";
+ this.button6.Size = new System.Drawing.Size(55, 23);
+ this.button6.TabIndex = 1;
+ this.button6.Text = "鍚庝竴椤�";
+ this.button6.UseVisualStyleBackColor = true;
+ //
+ // button7
+ //
+ this.button7.Location = new System.Drawing.Point(477, 1);
+ this.button7.Name = "button7";
+ this.button7.Size = new System.Drawing.Size(55, 23);
+ this.button7.TabIndex = 1;
+ this.button7.Text = "鍓嶄竴椤�";
+ this.button7.UseVisualStyleBackColor = true;
+ //
+ // button8
+ //
+ this.button8.Location = new System.Drawing.Point(416, 1);
+ this.button8.Name = "button8";
+ this.button8.Size = new System.Drawing.Size(55, 23);
+ this.button8.TabIndex = 1;
+ this.button8.Text = "绗竴椤�";
+ this.button8.UseVisualStyleBackColor = true;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
+ this.label2.Location = new System.Drawing.Point(3, 3);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(42, 17);
+ this.label2.TabIndex = 0;
+ this.label2.Text = "label2";
+ //
+ // dataGridView2
+ //
+ this.dataGridView2.AllowUserToAddRows = false;
+ this.dataGridView2.AllowUserToDeleteRows = false;
+ this.dataGridView2.BackgroundColor = System.Drawing.SystemColors.MenuBar;
+ this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridView2.Location = new System.Drawing.Point(3, 73);
+ this.dataGridView2.Name = "dataGridView2";
+ this.dataGridView2.ReadOnly = true;
+ this.dataGridView2.RowTemplate.Height = 23;
+ this.dataGridView2.Size = new System.Drawing.Size(751, 579);
+ this.dataGridView2.TabIndex = 2;
+ //
+ // tableLayoutPanel4
+ //
+ this.tableLayoutPanel4.ColumnCount = 8;
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.375F));
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.625F));
+ this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 3);
+ this.tableLayoutPanel4.Name = "tableLayoutPanel4";
+ this.tableLayoutPanel4.RowCount = 2;
+ this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel4.Size = new System.Drawing.Size(751, 64);
+ this.tableLayoutPanel4.TabIndex = 3;
+ //
+ // M071_DataForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1024, 717);
+ this.Controls.Add(this.tabControl1);
+ this.Name = "M071_DataForm";
+ this.Text = "M071_DataFrm";
+ this.tabControl1.ResumeLayout(false);
+ this.tabPage1.ResumeLayout(false);
+ this.tabPage2.ResumeLayout(false);
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.panel1.ResumeLayout(false);
+ this.panel1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+ this.tableLayoutPanel3.ResumeLayout(false);
+ this.panel2.ResumeLayout(false);
+ this.panel2.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TabControl tabControl1;
+ private System.Windows.Forms.TabPage tabPage1;
+ private System.Windows.Forms.TabPage tabPage2;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.Button button4;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.DataGridView dataGridView1;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.Panel panel2;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.Button button5;
+ private System.Windows.Forms.Button button6;
+ private System.Windows.Forms.Button button7;
+ private System.Windows.Forms.Button button8;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.DataGridView dataGridView2;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
+ }
+}
\ No newline at end of file
diff --git a/src/Bro.M071.Process/UI/M071_DataForm.cs b/src/Bro.M071.Process/UI/M071_DataForm.cs
new file mode 100644
index 0000000..af0c8eb
--- /dev/null
+++ b/src/Bro.M071.Process/UI/M071_DataForm.cs
@@ -0,0 +1,22 @@
+锘縰sing Bro.UI.Model.Winform;
+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 Bro.M071.Process.UI
+{
+ [MenuNode("M071_DataForm", "鏁版嵁鏌ヨ鐣岄潰", 1, "M071Node", true)]
+ public partial class M071_DataForm : MenuFrmBase
+ {
+ public M071_DataForm()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/src/Bro.M071.Process/UI/M071_DataForm.resx b/src/Bro.M071.Process/UI/M071_DataForm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/src/Bro.M071.Process/UI/M071_DataForm.resx
@@ -0,0 +1,120 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=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
--
Gitblit v1.8.0