jz.kai 11 miesięcy temu
rodzic
commit
7213010c60

BIN
Lib/HZH_Controls.dll


BIN
Lib/MySql.Data.dll


+ 179 - 0
WinForms/SelectWork.Designer.cs

@@ -28,14 +28,186 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.ucBtnExt15 = new HZH_Controls.Controls.UCBtnExt();
+            this.ucBtnExt1 = new HZH_Controls.Controls.UCBtnExt();
+            this.ucPagerControl21 = new HZH_Controls.Controls.UCPagerControl2();
+            this.ucDataGridView1 = new HZH_Controls.Controls.UCDataGridView();
+            this.ucTextBoxEx3 = new HZH_Controls.Controls.UCTextBoxEx();
+            this.ucBtnExt2 = new HZH_Controls.Controls.UCBtnExt();
             this.SuspendLayout();
             // 
+            // ucBtnExt15
+            // 
+            this.ucBtnExt15.BackColor = System.Drawing.Color.Transparent;
+            this.ucBtnExt15.BtnBackColor = System.Drawing.Color.Transparent;
+            this.ucBtnExt15.BtnFont = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ucBtnExt15.BtnForeColor = System.Drawing.Color.White;
+            this.ucBtnExt15.BtnText = "取消";
+            this.ucBtnExt15.ConerRadius = 5;
+            this.ucBtnExt15.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.ucBtnExt15.EnabledMouseEffect = true;
+            this.ucBtnExt15.FillColor = System.Drawing.Color.Silver;
+            this.ucBtnExt15.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
+            this.ucBtnExt15.ForeColor = System.Drawing.Color.White;
+            this.ucBtnExt15.IsRadius = true;
+            this.ucBtnExt15.IsShowRect = false;
+            this.ucBtnExt15.IsShowTips = false;
+            this.ucBtnExt15.Location = new System.Drawing.Point(609, 410);
+            this.ucBtnExt15.Margin = new System.Windows.Forms.Padding(0);
+            this.ucBtnExt15.Name = "ucBtnExt15";
+            this.ucBtnExt15.RectColor = System.Drawing.Color.Gainsboro;
+            this.ucBtnExt15.RectWidth = 1;
+            this.ucBtnExt15.Size = new System.Drawing.Size(80, 31);
+            this.ucBtnExt15.TabIndex = 16;
+            this.ucBtnExt15.TabStop = false;
+            this.ucBtnExt15.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
+            this.ucBtnExt15.TipsText = "";
+            // 
+            // ucBtnExt1
+            // 
+            this.ucBtnExt1.BackColor = System.Drawing.Color.Transparent;
+            this.ucBtnExt1.BtnBackColor = System.Drawing.Color.Transparent;
+            this.ucBtnExt1.BtnFont = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ucBtnExt1.BtnForeColor = System.Drawing.Color.White;
+            this.ucBtnExt1.BtnText = "确定";
+            this.ucBtnExt1.ConerRadius = 5;
+            this.ucBtnExt1.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.ucBtnExt1.EnabledMouseEffect = true;
+            this.ucBtnExt1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(159)))), ((int)(((byte)(255)))));
+            this.ucBtnExt1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
+            this.ucBtnExt1.ForeColor = System.Drawing.Color.White;
+            this.ucBtnExt1.IsRadius = true;
+            this.ucBtnExt1.IsShowRect = false;
+            this.ucBtnExt1.IsShowTips = false;
+            this.ucBtnExt1.Location = new System.Drawing.Point(520, 410);
+            this.ucBtnExt1.Margin = new System.Windows.Forms.Padding(0);
+            this.ucBtnExt1.Name = "ucBtnExt1";
+            this.ucBtnExt1.RectColor = System.Drawing.Color.Gainsboro;
+            this.ucBtnExt1.RectWidth = 1;
+            this.ucBtnExt1.Size = new System.Drawing.Size(80, 31);
+            this.ucBtnExt1.TabIndex = 17;
+            this.ucBtnExt1.TabStop = false;
+            this.ucBtnExt1.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
+            this.ucBtnExt1.TipsText = "";
+            // 
+            // ucPagerControl21
+            // 
+            this.ucPagerControl21.BackColor = System.Drawing.Color.White;
+            this.ucPagerControl21.DataSource = null;
+            this.ucPagerControl21.Location = new System.Drawing.Point(0, 366);
+            this.ucPagerControl21.Name = "ucPagerControl21";
+            this.ucPagerControl21.PageCount = 0;
+            this.ucPagerControl21.PageIndex = 1;
+            this.ucPagerControl21.PageModel = HZH_Controls.Controls.PageModel.PageCount;
+            this.ucPagerControl21.PageSize = 10;
+            this.ucPagerControl21.Size = new System.Drawing.Size(698, 41);
+            this.ucPagerControl21.StartIndex = 0;
+            this.ucPagerControl21.TabIndex = 18;
+            this.ucPagerControl21.ShowSourceChanged += new HZH_Controls.Controls.PageControlEventHandler(this.ucPagerControl21_ShowSourceChanged);
+            // 
+            // ucDataGridView1
+            // 
+            this.ucDataGridView1.BackColor = System.Drawing.Color.White;
+            this.ucDataGridView1.Columns = null;
+            this.ucDataGridView1.DataSource = null;
+            this.ucDataGridView1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.ucDataGridView1.HeadFont = new System.Drawing.Font("微软雅黑", 12F);
+            this.ucDataGridView1.HeadHeight = 40;
+            this.ucDataGridView1.HeadPadingLeft = 0;
+            this.ucDataGridView1.HeadTextColor = System.Drawing.Color.Black;
+            this.ucDataGridView1.IsShowCheckBox = false;
+            this.ucDataGridView1.IsShowHead = true;
+            this.ucDataGridView1.Location = new System.Drawing.Point(0, 0);
+            this.ucDataGridView1.Name = "ucDataGridView1";
+            this.ucDataGridView1.Padding = new System.Windows.Forms.Padding(0, 40, 0, 0);
+            this.ucDataGridView1.RowHeight = 40;
+            this.ucDataGridView1.RowType = typeof(HZH_Controls.Controls.UCDataGridViewRow);
+            this.ucDataGridView1.Size = new System.Drawing.Size(698, 360);
+            this.ucDataGridView1.TabIndex = 19;
+            // 
+            // ucTextBoxEx3
+            // 
+            this.ucTextBoxEx3.BackColor = System.Drawing.Color.Transparent;
+            this.ucTextBoxEx3.ConerRadius = 5;
+            this.ucTextBoxEx3.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.ucTextBoxEx3.DecLength = 2;
+            this.ucTextBoxEx3.FillColor = System.Drawing.Color.Empty;
+            this.ucTextBoxEx3.FocusBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
+            this.ucTextBoxEx3.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
+            this.ucTextBoxEx3.InputText = "手写键盘";
+            this.ucTextBoxEx3.InputType = HZH_Controls.TextInputType.NotControl;
+            this.ucTextBoxEx3.IsFocusColor = true;
+            this.ucTextBoxEx3.IsFouceShowKey = false;
+            this.ucTextBoxEx3.IsRadius = true;
+            this.ucTextBoxEx3.IsShowClearBtn = true;
+            this.ucTextBoxEx3.IsShowKeyboard = true;
+            this.ucTextBoxEx3.IsShowRect = true;
+            this.ucTextBoxEx3.IsShowSearchBtn = false;
+            this.ucTextBoxEx3.KeyBoardType = HZH_Controls.Controls.KeyBoardType.UCKeyBorderHand;
+            this.ucTextBoxEx3.Location = new System.Drawing.Point(13, 410);
+            this.ucTextBoxEx3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ucTextBoxEx3.MaxValue = new decimal(new int[] {
+            1000000,
+            0,
+            0,
+            0});
+            this.ucTextBoxEx3.MinValue = new decimal(new int[] {
+            1000000,
+            0,
+            0,
+            -2147483648});
+            this.ucTextBoxEx3.Name = "ucTextBoxEx3";
+            this.ucTextBoxEx3.Padding = new System.Windows.Forms.Padding(5);
+            this.ucTextBoxEx3.PasswordChar = '\0';
+            this.ucTextBoxEx3.PromptColor = System.Drawing.Color.Gray;
+            this.ucTextBoxEx3.PromptFont = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
+            this.ucTextBoxEx3.PromptText = "";
+            this.ucTextBoxEx3.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
+            this.ucTextBoxEx3.RectWidth = 1;
+            this.ucTextBoxEx3.RegexPattern = "";
+            this.ucTextBoxEx3.Size = new System.Drawing.Size(195, 31);
+            this.ucTextBoxEx3.TabIndex = 20;
+            this.ucTextBoxEx3.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
+            // 
+            // ucBtnExt2
+            // 
+            this.ucBtnExt2.BackColor = System.Drawing.Color.Transparent;
+            this.ucBtnExt2.BtnBackColor = System.Drawing.Color.Transparent;
+            this.ucBtnExt2.BtnFont = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ucBtnExt2.BtnForeColor = System.Drawing.Color.White;
+            this.ucBtnExt2.BtnText = "搜索";
+            this.ucBtnExt2.ConerRadius = 5;
+            this.ucBtnExt2.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.ucBtnExt2.EnabledMouseEffect = true;
+            this.ucBtnExt2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
+            this.ucBtnExt2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
+            this.ucBtnExt2.ForeColor = System.Drawing.Color.White;
+            this.ucBtnExt2.IsRadius = true;
+            this.ucBtnExt2.IsShowRect = false;
+            this.ucBtnExt2.IsShowTips = false;
+            this.ucBtnExt2.Location = new System.Drawing.Point(217, 410);
+            this.ucBtnExt2.Margin = new System.Windows.Forms.Padding(0);
+            this.ucBtnExt2.Name = "ucBtnExt2";
+            this.ucBtnExt2.RectColor = System.Drawing.Color.Gainsboro;
+            this.ucBtnExt2.RectWidth = 1;
+            this.ucBtnExt2.Size = new System.Drawing.Size(80, 31);
+            this.ucBtnExt2.TabIndex = 18;
+            this.ucBtnExt2.TabStop = false;
+            this.ucBtnExt2.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
+            this.ucBtnExt2.TipsText = "";
+            // 
             // SelectWork
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.White;
             this.ClientSize = new System.Drawing.Size(698, 450);
+            this.Controls.Add(this.ucBtnExt2);
+            this.Controls.Add(this.ucTextBoxEx3);
+            this.Controls.Add(this.ucDataGridView1);
+            this.Controls.Add(this.ucPagerControl21);
+            this.Controls.Add(this.ucBtnExt1);
+            this.Controls.Add(this.ucBtnExt15);
             this.MaximizeBox = false;
             this.MinimizeBox = false;
             this.Name = "SelectWork";
@@ -46,5 +218,12 @@
         }
 
         #endregion
+
+        private HZH_Controls.Controls.UCBtnExt ucBtnExt15;
+        private HZH_Controls.Controls.UCBtnExt ucBtnExt1;
+        private HZH_Controls.Controls.UCPagerControl2 ucPagerControl21;
+        private HZH_Controls.Controls.UCDataGridView ucDataGridView1;
+        private HZH_Controls.Controls.UCTextBoxEx ucTextBoxEx3;
+        private HZH_Controls.Controls.UCBtnExt ucBtnExt2;
     }
 }

+ 15 - 16
WinForms/SelectWork.cs

@@ -1,4 +1,5 @@
-using System;
+using HZH_Controls.Controls;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
@@ -20,11 +21,17 @@ namespace WinForms
 
         private void BindData()
         {
+            List<DataGridViewColumnEntity> lstCulumns = new List<DataGridViewColumnEntity>();
+            lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "id_", HeadText = "编号", Width = 70, WidthType = SizeType.Absolute });
+            lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "Name", HeadText = "姓名", Width = 500, WidthType = SizeType.Absolute });
+            lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "Age", HeadText = "年龄", Width = 500, WidthType = SizeType.Absolute });
+            lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "Birthday", HeadText = "生日", Width = 500, WidthType = SizeType.Absolute, Format = (a) => { return ((DateTime)a).ToString("yyyy-MM-dd"); } });
+            lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "Sex", HeadText = "性别", Width = 50, WidthType = SizeType.Absolute, Format = (a) => { return ((int)a) == 0 ? "女" : "男"; } });
+            this.ucDataGridView1.Columns = lstCulumns;
+
             Jpsoft.BLL.Work bll = new Jpsoft.BLL.Work();
             DataSet dataSet = bll.GetAllList();
             DataTable dataTable = dataSet.Tables[0];
-            //ucDataGridView1.DataSource = dataSet.Tables[0];
-            //ucPagerControl21.DataSource = dataTable.AsEnumerable().ToList();
             List<object> lstSource = new List<object>();
             foreach (DataRow dataRow in dataTable.Rows)
             {
@@ -32,23 +39,15 @@ namespace WinForms
                 model.id_ = dataRow["id_"].ToString();
                 lstSource.Add(model);
             }
-            //this.ucDataGridView1.DataSource = lstSource;
             //this.ucPagerControl21.DataSource = lstSource;
+            //this.ucDataGridView1.DataSource = this.ucPagerControl21.GetCurrentSource();
+            this.ucPagerControl21.PageCount = 110;
+            this.ucPagerControl21.PageIndex = 5;
         }
 
-        private void btnSearch_BtnClick(object sender, EventArgs e)
-        {
-
-        }
-
-        private void btnSubmit_BtnClick(object sender, EventArgs e)
-        {
-
-        }
-
-        private void btnCancel_BtnClick(object sender, EventArgs e)
+        private void ucPagerControl21_ShowSourceChanged(object currentSource)
         {
-            this.Close();
+            //BindData();
         }
     }
 }

+ 3 - 0
WinForms/WinForms.csproj

@@ -35,6 +35,9 @@
     <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="HZH_Controls">
+      <HintPath>..\Lib\HZH_Controls.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Data" />
     <Reference Include="System.Deployment" />