admin
2020-06-13 5dde755029a86cf8e7052f4878e7c64b94715c38
'首页完善'
22个文件已修改
11个文件已添加
1713 ■■■■ 已修改文件
.vs/BKZ/v16/.suo 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/Main.Designer.cs 320 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/Main.cs 268 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/WindowsFormsApp1.csproj 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/bin/x86/Debug/WindowsFormsApp1.application 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/bin/x86/Debug/WindowsFormsApp1.exe 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/bin/x86/Debug/WindowsFormsApp1.exe.manifest 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/bin/x86/Debug/WindowsFormsApp1.pdb 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/bin/x86/Debug/app.publish/WindowsFormsApp1.exe 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/entity/FirstOrderSubInfo.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/entity/GoodsClass.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/entity/SearchInfo.cs 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/obj/x86/Debug/KS_Controls.Controls.KSHorizontalList.resources 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/obj/x86/Debug/KS_Controls.Controls.KSHorizontalListItem.resources 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.application 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.csproj.GenerateResource.cache 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.csprojAssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.exe 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.exe.manifest 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.pdb 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/utils/ApiUtil.cs 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/utils/RequestResultCallback.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/utils/ui/ColorUtil.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/utils/ui/TextBoxUtil.cs 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/utils/ui/sub/KSHorizontalList.Designer.cs 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/utils/ui/sub/KSHorizontalList.cs 262 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/utils/ui/sub/KSHorizontalList.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/utils/ui/sub/KSHorizontalListItem.cs 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/utils/ui/sub/KSHorizontalListItem.designer.cs 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WindowsFormsApp1/utils/ui/sub/KSHorizontalListItem.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/BKZ/v16/.suo
Binary files differ
WindowsFormsApp1/Main.Designer.cs
@@ -1,6 +1,8 @@
using HZH_Controls.Controls;
using KS_Controls.Controls;
using System.Drawing;
using System.Windows.Forms;
using WindowsFormsApp1.utils.ui;
namespace WindowsFormsApp1
{
@@ -34,7 +36,6 @@
        {
            this.components = new System.ComponentModel.Container();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
            this.panel1 = new System.Windows.Forms.Panel();
            this.button13 = new System.Windows.Forms.Button();
            this.button3 = new System.Windows.Forms.Button();
@@ -47,6 +48,7 @@
            this.label37 = new System.Windows.Forms.Label();
            this.tabPage2 = new System.Windows.Forms.TabPage();
            this.tabPage1 = new System.Windows.Forms.TabPage();
            this.button10 = new System.Windows.Forms.Button();
            this.button9 = new System.Windows.Forms.Button();
            this.groupBox4 = new System.Windows.Forms.GroupBox();
            this.label19 = new System.Windows.Forms.Label();
@@ -57,17 +59,17 @@
            this.checkBox2 = new System.Windows.Forms.CheckBox();
            this.checkBox1 = new System.Windows.Forms.CheckBox();
            this.checkBox4 = new System.Windows.Forms.CheckBox();
            this.radioButton9 = new System.Windows.Forms.RadioButton();
            this.radioButton2 = new System.Windows.Forms.RadioButton();
            this.radioButton8 = new System.Windows.Forms.RadioButton();
            this.radioButton7 = new System.Windows.Forms.RadioButton();
            this.radioButton3 = new System.Windows.Forms.RadioButton();
            this.radioButton1 = new System.Windows.Forms.RadioButton();
            this.checkBox7 = new System.Windows.Forms.CheckBox();
            this.groupBox3 = new System.Windows.Forms.GroupBox();
            this.radioButton2 = new System.Windows.Forms.RadioButton();
            this.radioButton3 = new System.Windows.Forms.RadioButton();
            this.radioButton9 = new System.Windows.Forms.RadioButton();
            this.label24 = new System.Windows.Forms.Label();
            this.radioButton1 = new System.Windows.Forms.RadioButton();
            this.radioButton8 = new System.Windows.Forms.RadioButton();
            this.label22 = new System.Windows.Forms.Label();
            this.label20 = new System.Windows.Forms.Label();
            this.radioButton7 = new System.Windows.Forms.RadioButton();
            this.label23 = new System.Windows.Forms.Label();
            this.label13 = new System.Windows.Forms.Label();
            this.label21 = new System.Windows.Forms.Label();
@@ -90,16 +92,16 @@
            this.textBox2 = new HZH_Controls.Controls.TextBoxEx();
            this.textBox1 = new HZH_Controls.Controls.TextBoxEx();
            this.groupBox7 = new System.Windows.Forms.GroupBox();
            this.richTextBox1 = new System.Windows.Forms.RichTextBox();
            this.pictureBox2 = new System.Windows.Forms.PictureBox();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.label9 = new System.Windows.Forms.Label();
            this.label8 = new System.Windows.Forms.Label();
            this.groupBox8 = new System.Windows.Forms.GroupBox();
            this.listView1 = new System.Windows.Forms.ListView();
            this.button11 = new System.Windows.Forms.Button();
            this.button15 = new System.Windows.Forms.Button();
            this.label39 = new System.Windows.Forms.Label();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.ucHorizontalList1 = new HZH_Controls.Controls.UCHorizontalList();
            this.ucHorizontalList1 = new KS_Controls.Controls.KSHorizontalList();
            this.ucTextBoxEx1 = new HZH_Controls.Controls.UCTextBoxEx();
            this.dataGridView1 = new System.Windows.Forms.DataGridView();
            this.序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -121,7 +123,6 @@
            this.button1 = new System.Windows.Forms.Button();
            this.tabControl1 = new System.Windows.Forms.TabControl();
            this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
            this.button10 = new System.Windows.Forms.Button();
            this.panel1.SuspendLayout();
            this.tabPage1.SuspendLayout();
            this.groupBox4.SuspendLayout();
@@ -156,6 +157,7 @@
            // button13
            // 
            this.button13.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.button13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button13.Location = new System.Drawing.Point(548, 7);
            this.button13.Name = "button13";
            this.button13.Size = new System.Drawing.Size(75, 33);
@@ -167,6 +169,7 @@
            // button3
            // 
            this.button3.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.button3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button3.Location = new System.Drawing.Point(629, 7);
            this.button3.Name = "button3";
            this.button3.Size = new System.Drawing.Size(100, 33);
@@ -178,6 +181,7 @@
            // button5
            // 
            this.button5.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.button5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button5.Location = new System.Drawing.Point(735, 7);
            this.button5.Name = "button5";
            this.button5.Size = new System.Drawing.Size(109, 33);
@@ -200,6 +204,7 @@
            // button4
            // 
            this.button4.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.button4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button4.Location = new System.Drawing.Point(947, 7);
            this.button4.Name = "button4";
            this.button4.Size = new System.Drawing.Size(104, 33);
@@ -211,6 +216,7 @@
            // button2
            // 
            this.button2.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.button2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button2.Location = new System.Drawing.Point(850, 7);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(91, 33);
@@ -222,6 +228,7 @@
            // button8
            // 
            this.button8.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.button8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button8.Location = new System.Drawing.Point(1057, 7);
            this.button8.Name = "button8";
            this.button8.Size = new System.Drawing.Size(75, 33);
@@ -244,7 +251,7 @@
            // 
            this.label37.AutoSize = true;
            this.label37.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.label37.ForeColor = System.Drawing.Color.Black;
            this.label37.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.label37.Location = new System.Drawing.Point(1138, 13);
            this.label37.Name = "label37";
            this.label37.Size = new System.Drawing.Size(37, 20);
@@ -279,13 +286,27 @@
            this.tabPage1.Text = "首单礼金";
            this.tabPage1.Click += new System.EventHandler(this.tabPage1_Click);
            // 
            // button10
            //
            this.button10.BackColor = System.Drawing.SystemColors.Window;
            this.button10.FlatAppearance.BorderSize = 0;
            this.button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.button10.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Bold);
            this.button10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button10.Location = new System.Drawing.Point(6, 15);
            this.button10.Name = "button10";
            this.button10.Size = new System.Drawing.Size(250, 40);
            this.button10.TabIndex = 45;
            this.button10.Text = "淘宝授权登录";
            this.button10.UseVisualStyleBackColor = false;
            //
            // button9
            // 
            this.button9.BackColor = System.Drawing.SystemColors.Window;
            this.button9.FlatAppearance.BorderSize = 0;
            this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.button9.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Bold);
            this.button9.ForeColor = System.Drawing.Color.Black;
            this.button9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button9.Location = new System.Drawing.Point(6, 65);
            this.button9.Name = "button9";
            this.button9.Size = new System.Drawing.Size(250, 40);
@@ -352,7 +373,7 @@
            this.button6.BackColor = System.Drawing.SystemColors.Window;
            this.button6.FlatAppearance.BorderSize = 0;
            this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.button6.ForeColor = System.Drawing.Color.Black;
            this.button6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button6.Location = new System.Drawing.Point(191, 19);
            this.button6.Name = "button6";
            this.button6.Size = new System.Drawing.Size(47, 35);
@@ -423,81 +444,6 @@
            this.checkBox4.Text = "不看下架商品";
            this.checkBox4.UseVisualStyleBackColor = true;
            // 
            // radioButton9
            //
            this.radioButton9.AutoSize = true;
            this.radioButton9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton9.Location = new System.Drawing.Point(76, 322);
            this.radioButton9.Name = "radioButton9";
            this.radioButton9.Size = new System.Drawing.Size(74, 21);
            this.radioButton9.TabIndex = 29;
            this.radioButton9.TabStop = true;
            this.radioButton9.Text = "有优惠券";
            this.radioButton9.UseVisualStyleBackColor = true;
            this.radioButton9.CheckedChanged += new System.EventHandler(this.radioButton9_CheckedChanged);
            //
            // radioButton2
            //
            this.radioButton2.AutoSize = true;
            this.radioButton2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton2.Location = new System.Drawing.Point(76, 349);
            this.radioButton2.Name = "radioButton2";
            this.radioButton2.Size = new System.Drawing.Size(50, 21);
            this.radioButton2.TabIndex = 29;
            this.radioButton2.TabStop = true;
            this.radioButton2.Text = "天猫";
            this.radioButton2.UseVisualStyleBackColor = true;
            //
            // radioButton8
            //
            this.radioButton8.AutoSize = true;
            this.radioButton8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton8.Location = new System.Drawing.Point(165, 322);
            this.radioButton8.Name = "radioButton8";
            this.radioButton8.Size = new System.Drawing.Size(74, 21);
            this.radioButton8.TabIndex = 30;
            this.radioButton8.TabStop = true;
            this.radioButton8.Text = "无优惠券";
            this.radioButton8.UseVisualStyleBackColor = true;
            this.radioButton8.CheckedChanged += new System.EventHandler(this.radioButton8_CheckedChanged);
            //
            // radioButton7
            //
            this.radioButton7.AutoSize = true;
            this.radioButton7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton7.Location = new System.Drawing.Point(14, 322);
            this.radioButton7.Name = "radioButton7";
            this.radioButton7.Size = new System.Drawing.Size(50, 21);
            this.radioButton7.TabIndex = 28;
            this.radioButton7.TabStop = true;
            this.radioButton7.Text = "全部";
            this.radioButton7.UseVisualStyleBackColor = true;
            this.radioButton7.CheckedChanged += new System.EventHandler(this.radioButton7_CheckedChanged);
            //
            // radioButton3
            //
            this.radioButton3.AutoSize = true;
            this.radioButton3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton3.Location = new System.Drawing.Point(165, 349);
            this.radioButton3.Name = "radioButton3";
            this.radioButton3.Size = new System.Drawing.Size(50, 21);
            this.radioButton3.TabIndex = 30;
            this.radioButton3.TabStop = true;
            this.radioButton3.Text = "淘宝";
            this.radioButton3.UseVisualStyleBackColor = true;
            //
            // radioButton1
            //
            this.radioButton1.AutoSize = true;
            this.radioButton1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton1.Location = new System.Drawing.Point(14, 349);
            this.radioButton1.Name = "radioButton1";
            this.radioButton1.Size = new System.Drawing.Size(50, 21);
            this.radioButton1.TabIndex = 28;
            this.radioButton1.TabStop = true;
            this.radioButton1.Text = "全部";
            this.radioButton1.UseVisualStyleBackColor = true;
            //
            // checkBox7
            // 
            this.checkBox7.AutoSize = true;
@@ -553,6 +499,43 @@
            this.groupBox3.Text = "筛选设置";
            this.groupBox3.Enter += new System.EventHandler(this.groupBox3_Enter);
            // 
            // radioButton2
            //
            this.radioButton2.AutoSize = true;
            this.radioButton2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton2.Location = new System.Drawing.Point(76, 349);
            this.radioButton2.Name = "radioButton2";
            this.radioButton2.Size = new System.Drawing.Size(50, 21);
            this.radioButton2.TabIndex = 29;
            this.radioButton2.TabStop = true;
            this.radioButton2.Text = "天猫";
            this.radioButton2.UseVisualStyleBackColor = true;
            //
            // radioButton3
            //
            this.radioButton3.AutoSize = true;
            this.radioButton3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton3.Location = new System.Drawing.Point(165, 349);
            this.radioButton3.Name = "radioButton3";
            this.radioButton3.Size = new System.Drawing.Size(50, 21);
            this.radioButton3.TabIndex = 30;
            this.radioButton3.TabStop = true;
            this.radioButton3.Text = "淘宝";
            this.radioButton3.UseVisualStyleBackColor = true;
            //
            // radioButton9
            //
            this.radioButton9.AutoSize = true;
            this.radioButton9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton9.Location = new System.Drawing.Point(76, 322);
            this.radioButton9.Name = "radioButton9";
            this.radioButton9.Size = new System.Drawing.Size(74, 21);
            this.radioButton9.TabIndex = 29;
            this.radioButton9.TabStop = true;
            this.radioButton9.Text = "有优惠券";
            this.radioButton9.UseVisualStyleBackColor = true;
            this.radioButton9.CheckedChanged += new System.EventHandler(this.radioButton9_CheckedChanged);
            //
            // label24
            // 
            this.label24.AutoSize = true;
@@ -564,6 +547,31 @@
            this.label24.TabIndex = 51;
            this.label24.Text = "佣金比(%):";
            this.label24.Click += new System.EventHandler(this.label24_Click);
            //
            // radioButton1
            //
            this.radioButton1.AutoSize = true;
            this.radioButton1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton1.Location = new System.Drawing.Point(14, 349);
            this.radioButton1.Name = "radioButton1";
            this.radioButton1.Size = new System.Drawing.Size(50, 21);
            this.radioButton1.TabIndex = 28;
            this.radioButton1.TabStop = true;
            this.radioButton1.Text = "全部";
            this.radioButton1.UseVisualStyleBackColor = true;
            //
            // radioButton8
            //
            this.radioButton8.AutoSize = true;
            this.radioButton8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton8.Location = new System.Drawing.Point(165, 322);
            this.radioButton8.Name = "radioButton8";
            this.radioButton8.Size = new System.Drawing.Size(74, 21);
            this.radioButton8.TabIndex = 30;
            this.radioButton8.TabStop = true;
            this.radioButton8.Text = "无优惠券";
            this.radioButton8.UseVisualStyleBackColor = true;
            this.radioButton8.CheckedChanged += new System.EventHandler(this.radioButton8_CheckedChanged);
            // 
            // label22
            // 
@@ -586,6 +594,19 @@
            this.label20.Size = new System.Drawing.Size(65, 20);
            this.label20.TabIndex = 51;
            this.label20.Text = "月销量:";
            //
            // radioButton7
            //
            this.radioButton7.AutoSize = true;
            this.radioButton7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioButton7.Location = new System.Drawing.Point(14, 322);
            this.radioButton7.Name = "radioButton7";
            this.radioButton7.Size = new System.Drawing.Size(50, 21);
            this.radioButton7.TabIndex = 28;
            this.radioButton7.TabStop = true;
            this.radioButton7.Text = "全部";
            this.radioButton7.UseVisualStyleBackColor = true;
            this.radioButton7.CheckedChanged += new System.EventHandler(this.radioButton7_CheckedChanged);
            // 
            // label23
            // 
@@ -1015,10 +1036,9 @@
            // 
            // groupBox7
            // 
            this.groupBox7.Controls.Add(this.richTextBox1);
            this.groupBox7.Controls.Add(this.pictureBox2);
            this.groupBox7.Controls.Add(this.pictureBox1);
            this.groupBox7.Controls.Add(this.label9);
            this.groupBox7.Controls.Add(this.label8);
            this.groupBox7.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Bold);
            this.groupBox7.Location = new System.Drawing.Point(907, 533);
            this.groupBox7.Name = "groupBox7";
@@ -1027,48 +1047,41 @@
            this.groupBox7.TabStop = false;
            this.groupBox7.Text = "商品预览";
            // 
            // richTextBox1
            //
            this.richTextBox1.BackColor = System.Drawing.SystemColors.Menu;
            this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.richTextBox1.Enabled = false;
            this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.richTextBox1.Location = new System.Drawing.Point(10, 24);
            this.richTextBox1.Name = "richTextBox1";
            this.richTextBox1.ReadOnly = true;
            this.richTextBox1.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.None;
            this.richTextBox1.Size = new System.Drawing.Size(235, 41);
            this.richTextBox1.TabIndex = 5;
            this.richTextBox1.Text = "";
            //
            // pictureBox2
            // 
            this.pictureBox2.Location = new System.Drawing.Point(134, 71);
            this.pictureBox2.Location = new System.Drawing.Point(132, 71);
            this.pictureBox2.Name = "pictureBox2";
            this.pictureBox2.Size = new System.Drawing.Size(110, 110);
            this.pictureBox2.TabIndex = 44;
            this.pictureBox2.Size = new System.Drawing.Size(113, 110);
            this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            this.pictureBox2.TabIndex = 46;
            this.pictureBox2.TabStop = false;
            // 
            // pictureBox1
            // 
            this.pictureBox1.Location = new System.Drawing.Point(15, 71);
            this.pictureBox1.Location = new System.Drawing.Point(10, 71);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(110, 110);
            this.pictureBox1.TabIndex = 44;
            this.pictureBox1.Size = new System.Drawing.Size(113, 110);
            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            this.pictureBox1.TabIndex = 45;
            this.pictureBox1.TabStop = false;
            //
            // label9
            //
            this.label9.AutoSize = true;
            this.label9.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.label9.ForeColor = System.Drawing.Color.Black;
            this.label9.Location = new System.Drawing.Point(11, 45);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(230, 20);
            this.label9.TabIndex = 3;
            this.label9.Text = "商品标题商品标题商品标题商品标…";
            this.label9.Click += new System.EventHandler(this.label11_Click);
            //
            // label8
            //
            this.label8.AutoSize = true;
            this.label8.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.label8.ForeColor = System.Drawing.Color.Black;
            this.label8.Location = new System.Drawing.Point(11, 22);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(233, 20);
            this.label8.TabIndex = 3;
            this.label8.Text = "商品标题商品标题商品标题商品标题";
            this.label8.Click += new System.EventHandler(this.label11_Click);
            // 
            // groupBox8
            // 
            this.groupBox8.Controls.Add(this.listView1);
            this.groupBox8.Controls.Add(this.button11);
            this.groupBox8.Controls.Add(this.button15);
            this.groupBox8.Controls.Add(this.label39);
@@ -1079,6 +1092,17 @@
            this.groupBox8.TabIndex = 41;
            this.groupBox8.TabStop = false;
            this.groupBox8.Text = "操作日志";
            //
            // listView1
            //
            this.listView1.BackColor = System.Drawing.SystemColors.Menu;
            this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.listView1.HideSelection = false;
            this.listView1.Location = new System.Drawing.Point(7, 22);
            this.listView1.Name = "listView1";
            this.listView1.Size = new System.Drawing.Size(626, 159);
            this.listView1.TabIndex = 4;
            this.listView1.UseCompatibleStateImageBehavior = false;
            // 
            // button11
            // 
@@ -1139,11 +1163,11 @@
            this.ucHorizontalList1.DataSource = null;
            this.ucHorizontalList1.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.ucHorizontalList1.IsAutoSelectFirst = true;
            this.ucHorizontalList1.Location = new System.Drawing.Point(21, 242);
            this.ucHorizontalList1.Location = new System.Drawing.Point(15, 54);
            this.ucHorizontalList1.Name = "ucHorizontalList1";
            this.ucHorizontalList1.SelectedColor = System.Drawing.Color.Blue;
            this.ucHorizontalList1.SelectedItem = null;
            this.ucHorizontalList1.Size = new System.Drawing.Size(879, 57);
            this.ucHorizontalList1.Size = new System.Drawing.Size(879, 25);
            this.ucHorizontalList1.TabIndex = 46;
            this.ucHorizontalList1.TabStop = false;
            // 
@@ -1194,14 +1218,6 @@
            this.dataGridView1.AllowUserToResizeRows = false;
            this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
            this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
            dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10F);
            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
            this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
            this.dataGridView1.ColumnHeadersHeight = 28;
            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
            this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -1216,11 +1232,11 @@
            this.操作1,
            this.操作2});
            this.dataGridView1.GridColor = System.Drawing.SystemColors.ButtonFace;
            this.dataGridView1.Location = new System.Drawing.Point(15, 76);
            this.dataGridView1.Location = new System.Drawing.Point(15, 82);
            this.dataGridView1.Name = "dataGridView1";
            this.dataGridView1.RowHeadersVisible = false;
            dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle2;
            dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle1;
            this.dataGridView1.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.dataGridView1.RowTemplate.Height = 23;
            this.dataGridView1.Size = new System.Drawing.Size(879, 412);
@@ -1297,7 +1313,7 @@
            this.button14.FlatAppearance.BorderSize = 0;
            this.button14.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.button14.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.button14.ForeColor = System.Drawing.Color.Black;
            this.button14.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button14.Location = new System.Drawing.Point(819, 494);
            this.button14.Name = "button14";
            this.button14.Size = new System.Drawing.Size(75, 28);
@@ -1334,7 +1350,7 @@
            this.button7.BackColor = System.Drawing.SystemColors.Window;
            this.button7.FlatAppearance.BorderSize = 0;
            this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.button7.ForeColor = System.Drawing.Color.Black;
            this.button7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button7.Location = new System.Drawing.Point(241, 15);
            this.button7.Name = "button7";
            this.button7.Size = new System.Drawing.Size(47, 35);
@@ -1347,7 +1363,7 @@
            // 
            this.label36.AutoSize = true;
            this.label36.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.label36.ForeColor = System.Drawing.Color.Black;
            this.label36.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.label36.Location = new System.Drawing.Point(72, 498);
            this.label36.Name = "label36";
            this.label36.Size = new System.Drawing.Size(51, 20);
@@ -1359,7 +1375,7 @@
            // 
            this.label35.AutoSize = true;
            this.label35.Font = new System.Drawing.Font("微软雅黑", 10F);
            this.label35.ForeColor = System.Drawing.Color.Black;
            this.label35.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.label35.Location = new System.Drawing.Point(11, 498);
            this.label35.Name = "label35";
            this.label35.Size = new System.Drawing.Size(51, 20);
@@ -1373,13 +1389,14 @@
            this.button1.FlatAppearance.BorderSize = 0;
            this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.button1.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Bold);
            this.button1.ForeColor = System.Drawing.Color.Black;
            this.button1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(130)))), ((int)(((byte)(240)))));
            this.button1.Location = new System.Drawing.Point(97, 619);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(159, 40);
            this.button1.TabIndex = 1;
            this.button1.Text = "确认筛选";
            this.button1.UseVisualStyleBackColor = false;
            this.button1.Click += new System.EventHandler(this.button1_Click_1);
            // 
            // tabControl1
            // 
@@ -1389,20 +1406,6 @@
            this.tabControl1.SelectedIndex = 0;
            this.tabControl1.Size = new System.Drawing.Size(1180, 756);
            this.tabControl1.TabIndex = 6;
            //
            // button10
            //
            this.button10.BackColor = System.Drawing.SystemColors.Window;
            this.button10.FlatAppearance.BorderSize = 0;
            this.button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.button10.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Bold);
            this.button10.ForeColor = System.Drawing.Color.Black;
            this.button10.Location = new System.Drawing.Point(6, 15);
            this.button10.Name = "button10";
            this.button10.Size = new System.Drawing.Size(250, 40);
            this.button10.TabIndex = 45;
            this.button10.Text = "淘宝授权登录";
            this.button10.UseVisualStyleBackColor = false;
            // 
            // Main
            // 
@@ -1431,7 +1434,6 @@
            this.groupBox3.ResumeLayout(false);
            this.groupBox3.PerformLayout();
            this.groupBox7.ResumeLayout(false);
            this.groupBox7.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.groupBox8.ResumeLayout(false);
@@ -1511,10 +1513,6 @@
        private System.Windows.Forms.Label label36;
        private System.Windows.Forms.Label label35;
        private System.Windows.Forms.Button button15;
        private System.Windows.Forms.PictureBox pictureBox2;
        private System.Windows.Forms.PictureBox pictureBox1;
        private System.Windows.Forms.Label label9;
        private System.Windows.Forms.Label label8;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Button button5;
        private System.Windows.Forms.Label label19;
@@ -1534,8 +1532,12 @@
        private DataGridViewLinkColumn 操作1;
        private DataGridViewLinkColumn 操作2;
        private HZH_Controls.Controls.UCTextBoxEx ucTextBoxEx1;
        private HZH_Controls.Controls.UCHorizontalList ucHorizontalList1;
        private KSHorizontalList ucHorizontalList1;
        private Button button10;
        private PictureBox pictureBox2;
        private PictureBox pictureBox1;
        private ListView listView1;
        private RichTextBox richTextBox1;
    }
}
WindowsFormsApp1/Main.cs
@@ -1,5 +1,8 @@
using HZH_Controls.Controls;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -10,6 +13,7 @@
using System.Threading.Tasks;
using System.Windows.Forms;
using WindowsFormsApp1.entity;
using WindowsFormsApp1.utils;
using WindowsFormsApp1.utils.ui;
namespace WindowsFormsApp1
@@ -22,9 +26,53 @@
            InitSkin();
            InitDataGridView();
            InitData();
            SetClassData();
            initTextBox();
            //
            FirstOrderSubInfo goods = new FirstOrderSubInfo();
            goods.Title = "拉面说豚骨番茄肥牛3袋半干鲜面速食方便面火锅面非油炸泡面便面火锅面非油炸泡面便面火锅面非油炸泡面";
            List<String> imgList = new List<String>();
            imgList.Add("https://img.alicdn.com/imgextra/i1/725677994/O1CN013XSsBA28vIkpIkQwp_!!725677994.jpg_430x430q90.jpg");
            imgList.Add("https://img.alicdn.com/imgextra/i4/725677994/O1CN01iTYmFx28vIjvvoUOn_!!725677994.jpg_430x430q90.jpg");
            goods.ImgList = imgList;
            SetGoodsDetail(goods);
        }
        //初始化皮肤颜色
        private void InitSkin()
        {
            //this.textBox
        }
        private void InitData()
        {
            this.ucHorizontalList1.SelectedItemEvent += new System.EventHandler(this.click_Class);
            List<FirstOrderSubInfo> infoList = new List<FirstOrderSubInfo>();
            for (int i = 0; i < 20; i++)
            {
                FirstOrderSubInfo info = new FirstOrderSubInfo();
                info.ActualPrice = "12.00";
                info.Commission = "1.02";
                info.CommissionRate = "20%";
                info.CouponPrice = "15.00";
                info.GoodsId = "123456";
                info.ImgList = new List<string>();
                info.ImgList.Add("http://");
                info.LijinAmount = "20.21";
                info.Title = "测试";
                info.ZkPrice = "21.02";
                infoList.Add(info);
            }
            SetGoodsData(true, infoList);
        }
        private void setTextBoxPrompt(TextBoxEx ex,String text) {
            ex.PromptFont = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
@@ -44,28 +92,122 @@
            setTextBoxPrompt(this.textBox10, "最大值");
            setTextBoxPrompt(this.textBox11, "最小值");
            setTextBoxPrompt(this.textBox12, "最大值");
        }
        private void SetTableData(List<FirstOrderSunInfo> infoList) {
        /**
         *
         *
         * 商品开始
         *
         *
         *
         */
        delegate void SetGoodsAndClassDataDelegate(JObject obj);
        void setGoodsAndClassData(JObject obj) {
            List<GoodsClass> goodsClassList = new List<GoodsClass>();
            List<FirstOrderSubInfo> goodsList = new List<FirstOrderSubInfo>();
            if (obj["code"].ToString() == "0")
            {
                //解析分类
                var array = JArray.Parse(obj["data"]["goodsClass"].ToString());
                goodsClassList = array.ToObject<List<GoodsClass>>();
                //解析数据
                array = JArray.Parse(obj["data"]["goods"].ToString());
                goodsList = array.ToObject<List<FirstOrderSubInfo>>();
            }
            SetClassData(goodsClassList);
            SetGoodsData(false, goodsList);
        }
        private void searchSuccess(String result)
        {
            JObject obj = JObject.Parse(result);
            this.BeginInvoke(new SetGoodsAndClassDataDelegate(setGoodsAndClassData), obj);
        }
        private void search(int page, SearchInfo info)
        {
            OnSuccess onSuccess = searchSuccess;
            ApiUtil.searchGoods("", info, page, onSuccess);
        }
        int page = 1;
        //设置列表的数据
        private void SetGoodsData(bool  hasMore, List<FirstOrderSubInfo> infoList) {
            this.dataGridView1.Rows.Clear();
        
            foreach (FirstOrderSunInfo info in infoList) {
            foreach (FirstOrderSubInfo info in infoList) {
                int index = this.dataGridView1.Rows.Add();
                this.dataGridView1.Rows[index].Cells[0].Value = "1";
                this.dataGridView1.Rows[index].Cells[1].Value = info.title;
                this.dataGridView1.Rows[index].Cells[2].Value = info.zkPrice;
                this.dataGridView1.Rows[index].Cells[3].Value = info.couponPrice;
                this.dataGridView1.Rows[index].Cells[4].Value = info.lijinAmount;
                this.dataGridView1.Rows[index].Cells[5].Value = info.actualPrice;
                this.dataGridView1.Rows[index].Cells[6].Value = info.commission;
                this.dataGridView1.Rows[index].Cells[7].Value = info.commissionRate;
                this.dataGridView1.Rows[index].Cells[1].Value = info.Title;
                this.dataGridView1.Rows[index].Cells[2].Value = info.ZkPrice;
                this.dataGridView1.Rows[index].Cells[3].Value = info.CouponPrice;
                this.dataGridView1.Rows[index].Cells[4].Value = info.LijinAmount;
                this.dataGridView1.Rows[index].Cells[5].Value = info.ActualPrice;
                this.dataGridView1.Rows[index].Cells[6].Value = info.Commission;
                this.dataGridView1.Rows[index].Cells[7].Value = info.CommissionRate;
                this.dataGridView1.Rows[index].Cells[8].Value = "加入引单库";
                this.dataGridView1.Rows[index].Cells[9].Value = "加入实拍库";
            }
           //  DataGridViewHelper helper = new DataGridViewHelper(this.dataGridView1);
           //  helper.Headers.Add(new DataGridViewHelper.TopHeader(8, 2, "操作"));
            if (hasMore)
            {
                this.label36.ForeColor = ColorUtil.GetThemeColor();
            }
            else {
                this.label36.ForeColor = ColorUtil.GetDefaultColor();
            }
            if (page <= 1)
            {
                this.label35.ForeColor = ColorUtil.GetDefaultColor();
            }
            else {
                this.label35.ForeColor = ColorUtil.GetThemeColor();
            }
        }
        //设置商品详情
        private void SetGoodsDetail(FirstOrderSubInfo info) {
            //设置标题
            this.richTextBox1.Text = info.Title;
            TextBoxUtil.SetLineSpace(this.richTextBox1,300);
            if (info.ImgList != null)
            {
                if (info.ImgList.Count > 0)
                {
                    this.pictureBox1.Visible =true;
                    ImageUtil.DisplayImage(this.pictureBox1, info.ImgList[0]);
                }
                else
                {
                    this.pictureBox1.Visible = false;
                }
                if (info.ImgList.Count > 1)
                {
                    this.pictureBox2.Visible = true;
                    ImageUtil.DisplayImage(this.pictureBox2, info.ImgList[1]);
                }
                else
                {
                    this.pictureBox2.Visible = false;
                }
            }
            else {
                this.pictureBox1.Visible = false;
                this.pictureBox2.Visible = false;
            }
        }
        private void InitDataGridView() {
@@ -81,42 +223,78 @@
            this.dataGridView1.Columns[9].Width = 75;
        }
        //初始化皮肤颜色
        private void InitSkin()
        {
            //this.textBox
        }
        private void InitData() {
            List<FirstOrderSunInfo> infoList = new List<FirstOrderSunInfo>();
            for (int i = 0; i < 20; i++)
            {
                FirstOrderSunInfo info = new FirstOrderSunInfo();
                info.actualPrice = "12.00";
                info.commission = "1.02";
                info.commissionRate = "20%";
                info.couponPrice = "15.00";
                info.goodsId = "123456";
                info.imgList = new List<string>();
                info.imgList.Add("http://");
                info.lijinAmount = "20.21";
                info.title = "测试";
                info.zkPrice = "21.02";
                infoList.Add(info);
            }
            SetTableData(infoList);
        }
        private void SetClassData() {
        private void SetClassData(List<GoodsClass> goodsClassList) {
            List<KeyValuePair<string, string>> lstHL = new List<KeyValuePair<string, string>>();
            for (int i = 0; i < 30; i++)
            int p = 0;
            int i = 0;
            foreach (GoodsClass goodsClass in goodsClassList)
            {
                lstHL.Add(new KeyValuePair<string, string>(i.ToString(), "选项" + i));
                lstHL.Add(new KeyValuePair<string, string>(goodsClass.Id+"", goodsClass.Name));
                if (goodsClass.Selected)
                    p = i;
                i++;
            }
            this.ucHorizontalList1.DataSource = lstHL;
            this.ucHorizontalList1.SetSelect(lstHL[p].Key);
        }
        private void click_Class(object sender, EventArgs e) {
            Console.WriteLine("分类点击");
        }
        private SearchInfo getSearchFilter()
        {
            SearchInfo info = new SearchInfo();
            info.MinCouponPrice = this.textBox1.Text;
            info.MaxCouponPrice = this.textBox2.Text;
            info.MinLiJin = this.textBox3.Text;
            info.MaxLiJin = this.textBox4.Text;
            info.MinActualPrice = this.textBox5.Text;
            info.MaxActualPrice = this.textBox6.Text;
            info.MinSalesNum = this.textBox7.Text;
            info.MinSalesNum = this.textBox8.Text;
            info.MinCommission = this.textBox9.Text;
            info.MaxCommission = this.textBox10.Text;
            info.MinCommissionRate = this.textBox11.Text;
            info.MaxCommissionRate = this.textBox12.Text;
            return info;
        }
        //筛选
        private void button1_Click_1(object sender, EventArgs e)
        {
            SearchInfo searchInfo = getSearchFilter();
            search(page, searchInfo);
            Console.WriteLine(JsonConvert.SerializeObject(searchInfo));
        }
        //搜索
        private void button5_Click_2(object sender, EventArgs e)
        {
            SearchInfo searchInfo = getSearchFilter();
            searchInfo.Key = this.ucTextBoxEx1.InputText;
            search(page, searchInfo);
        }
        /**
         *
         *
         * 商品结束
         *
         *
         */
@@ -230,10 +408,6 @@
        }
        private void button5_Click_2(object sender, EventArgs e)
        {
        }
        private void label3_Click(object sender, EventArgs e)
        {
@@ -293,5 +467,7 @@
            else
                return false;
        }
    }
}
WindowsFormsApp1/WindowsFormsApp1.csproj
@@ -152,7 +152,9 @@
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="entity\FirstOrderSunInfo.cs" />
    <Compile Include="entity\FirstOrderSubInfo.cs" />
    <Compile Include="entity\GoodsClass.cs" />
    <Compile Include="entity\SearchInfo.cs" />
    <Compile Include="System\Windows\Threading.cs" />
    <Compile Include="TBLogin.cs">
      <SubType>Form</SubType>
@@ -235,10 +237,24 @@
    <Compile Include="utils\SQLiteDataBaseUtil.cs" />
    <Compile Include="utils\tb\TBLoginRequestHandler.cs" />
    <Compile Include="utils\ui\ButtonFactory.cs" />
    <Compile Include="utils\ui\ColorUtil.cs" />
    <Compile Include="utils\ui\DataGridViewHelper.cs" />
    <Compile Include="utils\ui\ImageUtil.cs" />
    <Compile Include="utils\ui\LabelFactory.cs" />
    <Compile Include="utils\ui\sub\KSHorizontalList.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Include="utils\ui\sub\KSHorizontalList.Designer.cs">
      <DependentUpon>KSHorizontalList.cs</DependentUpon>
    </Compile>
    <Compile Include="utils\ui\sub\KSHorizontalListItem.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Include="utils\ui\sub\KSHorizontalListItem.designer.cs">
      <DependentUpon>KSHorizontalListItem.cs</DependentUpon>
    </Compile>
    <Compile Include="utils\ui\TextBoxFactory.cs" />
    <Compile Include="utils\ui\TextBoxUtil.cs" />
    <EmbeddedResource Include="TBLogin.resx">
      <DependentUpon>TBLogin.cs</DependentUpon>
      <SubType>Designer</SubType>
@@ -294,6 +310,12 @@
    <EmbeddedResource Include="Test.resx">
      <DependentUpon>Test.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="utils\ui\sub\KSHorizontalList.resx">
      <DependentUpon>KSHorizontalList.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="utils\ui\sub\KSHorizontalListItem.resx">
      <DependentUpon>KSHorizontalListItem.cs</DependentUpon>
    </EmbeddedResource>
    <None Include="packages.config" />
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
@@ -321,9 +343,7 @@
      <Install>false</Install>
    </BootstrapperPackage>
  </ItemGroup>
  <ItemGroup>
    <Folder Include="utils\ui\sub\" />
  </ItemGroup>
  <ItemGroup />
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
WindowsFormsApp1/bin/x86/Debug/WindowsFormsApp1.application
@@ -14,7 +14,7 @@
          <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
        </dsig:Transforms>
        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
        <dsig:DigestValue>XagfsvBVPypSlfH/O/ZfJHUccUXSh2AQ33OUesDy4tA=</dsig:DigestValue>
        <dsig:DigestValue>TSbpvoYcC/8zXsJTmcMEKeER23UyQY6fIPdHTCJnUYw=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
WindowsFormsApp1/bin/x86/Debug/WindowsFormsApp1.exe
Binary files differ
WindowsFormsApp1/bin/x86/Debug/WindowsFormsApp1.exe.manifest
@@ -126,14 +126,14 @@
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WindowsFormsApp1.exe" size="165392">
    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WindowsFormsApp1.exe" size="180752">
      <assemblyIdentity name="WindowsFormsApp1" version="1.0.0.0" language="neutral" processorArchitecture="x86" />
      <hash>
        <dsig:Transforms>
          <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
        </dsig:Transforms>
        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
        <dsig:DigestValue>P+ZhV4a+LJdvjOjE46UdV+xeX5QS/vUy6L6DDS0rrW4=</dsig:DigestValue>
        <dsig:DigestValue>6kfGI2JYlpmLKaGbLikLU5KSZiCcfaz4eLTRscZ6Uqg=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
WindowsFormsApp1/bin/x86/Debug/WindowsFormsApp1.pdb
Binary files differ
WindowsFormsApp1/bin/x86/Debug/app.publish/WindowsFormsApp1.exe
Binary files differ
WindowsFormsApp1/entity/FirstOrderSubInfo.cs
@@ -8,64 +8,76 @@
{
    class FirstOrderSubInfo
    {
        private String title;
        private String zkPrice;
        private String couponPrice;
        private String lijinAmount;
        private String goodsId;
        private String actualPrice;
        private String commission;
        private String commissionRate;
        private List<String> imgList;
        private Boolean mark;
        //标题
        public String title
        public String Title
        {
            get { return title; }
            set { title = value; }
        }
        public String zkPrice
        public String ZkPrice
        {
            get { return zkPrice; }
            set { zkPrice = value; }
        }
        public String couponPrice
        public String CouponPrice
        {
            get { return couponPrice; }
            set { couponPrice = value; }
        }
        public String lijinAmount
        public String LijinAmount
        {
            get { return lijinAmount; }
            set { lijinAmount = value; }
        }
        public String goodsId
        public String GoodsId
        {
            get { return goodsId; }
            set { goodsId = value; }
        }
        public String actualPrice
        public String ActualPrice
        {
            get { return actualPrice; }
            set { actualPrice = value; }
        }
        public String commission
        public String Commission
        {
            get { return commission; }
            set { commission = value; }
        }
        public String commissionRate
        public String CommissionRate
        {
            get { return commissionRate; }
            set { commissionRate = value; }
        }
        public List<String> imgList
        public List<String> ImgList
        {
            get { return imgList; }
            set { imgList = value; }
        }
        public Boolean mark
        public Boolean Mark
        {
            get { return mark; }
            set { mark = value; }
WindowsFormsApp1/entity/GoodsClass.cs
New file
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WindowsFormsApp1.entity
{
    class GoodsClass
    {
        private int id;
        private String name;
        private bool selected;
        public int Id {
            get { return id; }
            set { id = value; }
        }
        public String Name {
            get { return name; }
            set { name = value; }
        }
        public bool Selected {
            get { return selected; }
            set { selected = value; }
        }
    }
}
WindowsFormsApp1/entity/SearchInfo.cs
@@ -17,96 +17,111 @@
        public static int SHOP_TYPE_TM = 1;
        public static int SHOP_TYPE_TAOBAO = 2;
        //关键字
        public String key
        private String key; //关键字
        private int couponType;//券类型
        private int shopType;//店铺类型
        private String minCouponPrice;//券后价
        private String maxCouponPrice;
        private String minLiJin; //礼金
        private String maxLiJin;
        private String minActualPrice;//到手价
        private String maxActualPrice;
        private String minSalesNum; //月销
        private String maxSalesNum;
        private String minCommission; //佣金
        private String maxCommission;
        private String minCommissionRate; //佣金比例
        private String maxCommissionRate;
        public String Key
        {
            get { return key; }
            set { key = value; }
        }
        public int couponType {
        public int CouponType {
            get { return couponType; }
            set { couponType = value; }
        }
        public int shopType
        public int ShopType
        {
            get { return shopType; }
            set { shopType = value; }
        }
        //券后价
        public String minCouponPrice {
        public String MinCouponPrice {
            get { return minCouponPrice; }
            set { minCouponPrice = value; }
        }
        public String maxCouponPrice
        public String MaxCouponPrice
        {
            get { return maxCouponPrice; }
            set { maxCouponPrice = value; }
        }
        //礼金
        public String minLiJin
        public String MinLiJin
        {
            get { return minLiJin; }
            set { minLiJin = value; }
        }
        public String maxLiJin
        public String MaxLiJin
        {
            get { return maxLiJin; }
            set { maxLiJin = value; }
        }
        //到手价
        public String minActualPrice
        public String MinActualPrice
        {
            get { return minActualPrice; }
            set { minActualPrice = value; }
        }
        public String maxActualPrice
        public String MaxActualPrice
        {
            get { return maxActualPrice; }
            set { maxActualPrice = value; }
        }
        //月销
        public String minSalesNum
        public String MinSalesNum
        {
            get { return minSalesNum; }
            set { minSalesNum = value; }
        }
        public String maxSalesNum
        public String MaxSalesNum
        {
            get { return maxSalesNum; }
            set { maxSalesNum = value; }
        }
        //佣金
        public String minCommission
        public String MinCommission
        {
            get { return minCommission; }
            set { minCommission = value; }
        }
        public String maxCommission
        public String MaxCommission
        {
            get { return maxCommission; }
            set { maxCommission = value; }
        }
        //佣金比例
        public String minCommissionRate
        public String MinCommissionRate
        {
            get { return minCommissionRate; }
            set { minCommissionRate = value; }
        }
        public String maxCommissionRate
        public String MaxCommissionRate
        {
            get { return maxCommissionRate; }
            set { maxCommissionRate = value; }
WindowsFormsApp1/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
Binary files differ
WindowsFormsApp1/obj/x86/Debug/KS_Controls.Controls.KSHorizontalList.resources
Binary files differ
WindowsFormsApp1/obj/x86/Debug/KS_Controls.Controls.KSHorizontalListItem.resources
Binary files differ
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.application
@@ -14,7 +14,7 @@
          <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
        </dsig:Transforms>
        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
        <dsig:DigestValue>XagfsvBVPypSlfH/O/ZfJHUccUXSh2AQ33OUesDy4tA=</dsig:DigestValue>
        <dsig:DigestValue>TSbpvoYcC/8zXsJTmcMEKeER23UyQY6fIPdHTCJnUYw=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
aec954d62a52c4ba9e448751b676fb72afd9f8d4
30aa022245a0df841a2df31b8daafe37daf59f48
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.csproj.FileListAbsolute.txt
@@ -118,3 +118,5 @@
C:\Users\Administrator\source\repos\BKZ\WindowsFormsApp1\obj\x86\Debug\WindowsFormsApp1.Form9.resources
C:\Users\Administrator\source\repos\BKZ\WindowsFormsApp1\obj\x86\Debug\WindowsFormsApp1.Main.resources
C:\Users\Administrator\source\repos\BKZ\WindowsFormsApp1\obj\x86\Debug\WindowsFormsApp1.Form1.resources
C:\Users\Administrator\source\repos\BKZ\WindowsFormsApp1\obj\x86\Debug\KS_Controls.Controls.KSHorizontalList.resources
C:\Users\Administrator\source\repos\BKZ\WindowsFormsApp1\obj\x86\Debug\KS_Controls.Controls.KSHorizontalListItem.resources
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.csproj.GenerateResource.cache
Binary files differ
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.csprojAssemblyReference.cache
Binary files differ
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.exe
Binary files differ
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.exe.manifest
@@ -126,14 +126,14 @@
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WindowsFormsApp1.exe" size="165392">
    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WindowsFormsApp1.exe" size="180752">
      <assemblyIdentity name="WindowsFormsApp1" version="1.0.0.0" language="neutral" processorArchitecture="x86" />
      <hash>
        <dsig:Transforms>
          <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
        </dsig:Transforms>
        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
        <dsig:DigestValue>P+ZhV4a+LJdvjOjE46UdV+xeX5QS/vUy6L6DDS0rrW4=</dsig:DigestValue>
        <dsig:DigestValue>6kfGI2JYlpmLKaGbLikLU5KSZiCcfaz4eLTRscZ6Uqg=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
WindowsFormsApp1/obj/x86/Debug/WindowsFormsApp1.pdb
Binary files differ
WindowsFormsApp1/utils/ApiUtil.cs
@@ -13,17 +13,27 @@
namespace WindowsFormsApp1.utils
{
    delegate void OnSuccess(String result);
    class RequestParams {
      public   String url;
        public Dictionary<String, String> paramsMap;
        public Dictionary<String, String> headers;
        public OnRequestResultListener listener;
        public OnSuccess success;
        public RequestParams(String url, Dictionary<String, String> paramsMap, Dictionary<String, String> headers, OnRequestResultListener listener) {
            this.url = url;
            this.paramsMap = paramsMap;
            this.headers = headers;
            this.listener = listener;
        }
        public RequestParams(String url, Dictionary<String, String> paramsMap, Dictionary<String, String> headers, OnSuccess listener)
        {
            this.url = url;
            this.paramsMap = paramsMap;
            this.headers = headers;
            this.success = listener;
        }
    }
@@ -41,7 +51,10 @@
                if (param.listener != null)
                    param.listener.onStart();
                string result = HttpUtil.HttpPost(param.url, param.paramsMap, param.headers);
                param.listener.onSuccess(200, result);
                if (param.listener!=null)
                    param.listener.onSuccess(200, result);
                if (param.success != null)
                    param.success(result);
            }
            catch (Exception e)
            {
@@ -98,15 +111,13 @@
        //搜索商品
        public static List<FirstOrderSubInfo> searchGoods(String token, SearchInfo searchInfo,int page, OnRequestResultListener listener) {
        public static void searchGoods(String token, SearchInfo searchInfo,int page, OnSuccess listener) {
            Dictionary<String, String> headers = new Dictionary<String, String>();
            headers.Add("token", token);
            Dictionary<String, String> paramsMap = new Dictionary<String, String>();
            paramsMap.Add("searchInfo", JsonConvert.SerializeObject(searchInfo));
            startRequest(new RequestParams(BASE_URL + "parse/uploadCookies", paramsMap, headers, listener));
            return null;
            paramsMap.Add("page",page+"");
            startRequest(new RequestParams(BASE_URL + "sdlj/goods/searchGoods", paramsMap, headers, listener));
        }
    }
}
WindowsFormsApp1/utils/RequestResultCallback.cs
@@ -27,5 +27,8 @@
        {
           
        }
        delegate void OnSuccess(String result);
    }
}
WindowsFormsApp1/utils/ui/ColorUtil.cs
New file
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WindowsFormsApp1.utils.ui
{
    class ColorUtil
    {
        public static Color GetThemeColor() {
            return Color.FromArgb(12,130,240);
        }
        public static Color GetDefaultColor()
        {
            return System.Drawing.SystemColors.Menu;
        }
    }
}
WindowsFormsApp1/utils/ui/TextBoxUtil.cs
New file
@@ -0,0 +1,75 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp1.utils.ui
{
    class TextBoxUtil
    {
        public const int WM_USER = 0x0400;
        public const int EM_GETPARAFORMAT = WM_USER + 61;
        public const int EM_SETPARAFORMAT = WM_USER + 71;
        public const long MAX_TAB_STOPS = 32;
        public const uint PFM_LINESPACING = 0x00000100;
        //定义结构体,为什么这么定义,我也不知道
        [StructLayout(LayoutKind.Sequential)]
        private struct PARAFORMAT2
        {
            public int cbSize;
            public uint dwMask;
            public short wNumbering;
            public short wReserved;
            public int dxStartIndent;
            public int dxRightIndent;
            public int dxOffset;
            public short wAlignment;
            public short cTabCount;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
            public int[] rgxTabs;
            public int dySpaceBefore;
            public int dySpaceAfter;
            public int dyLineSpacing;
            public short sStyle;
            public byte bLineSpacingRule;
            public byte bOutlineLevel;
            public short wShadingWeight;
            public short wShadingStyle;
            public short wNumberingStart;
            public short wNumberingStyle;
            public short wNumberingTab;
            public short wBorderSpace;
            public short wBorderWidth;
            public short wBorders;
        }
        //定义函数
        [DllImport("user32", CharSet = CharSet.Auto)]
        private static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref PARAFORMAT2 IParam);
        //调用方法如下
        public static void SetLineSpace(RichTextBox richTextBox, int lineSpace)
        {
            PARAFORMAT2 pFormat = new PARAFORMAT2();
            pFormat.cbSize = Marshal.SizeOf(pFormat);
            pFormat.bLineSpacingRule = 4;
            pFormat.dyLineSpacing = lineSpace;
            pFormat.dwMask = PFM_LINESPACING;
            SendMessage(new HandleRef(richTextBox, richTextBox.Handle),
                               EM_SETPARAFORMAT, 4, ref pFormat);
        }
    }
}
WindowsFormsApp1/utils/ui/sub/KSHorizontalList.Designer.cs
New file
@@ -0,0 +1,130 @@
// ***********************************************************************
// Assembly         : HZH_Controls
// Created          : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCHorizontalList.Designer.cs">
//     Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
namespace KS_Controls.Controls
{
    /// <summary>
    /// Class UCHorizontalList.
    /// Implements the <see cref="System.Windows.Forms.UserControl" />
    /// </summary>
    /// <seealso cref="System.Windows.Forms.UserControl" />
    partial class KSHorizontalList
    {
        /// <summary>
        /// 必需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region 组件设计器生成的代码
        /// <summary>
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            this.panMain = new System.Windows.Forms.Panel();
            this.panList = new System.Windows.Forms.Panel();
            this.panRight = new System.Windows.Forms.Panel();
            this.panLeft = new System.Windows.Forms.Panel();
            this.panMain.SuspendLayout();
            this.SuspendLayout();
            //
            // panMain
            //
            this.panMain.Controls.Add(this.panList);
            this.panMain.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panMain.Location = new System.Drawing.Point(23, 0);
            this.panMain.Name = "panMain";
            this.panMain.Size = new System.Drawing.Size(468, 25);
            this.panMain.TabIndex = 3;
            //
            // panList
            //
            this.panList.Anchor = System.Windows.Forms.AnchorStyles.Left;
            this.panList.BackColor = System.Drawing.Color.Transparent;
            this.panList.Location = new System.Drawing.Point(0, 0);
            this.panList.Name = "panList";
            this.panList.Size = new System.Drawing.Size(401, 25);
            this.panList.TabIndex = 0;
            //
            // panRight
            //
            this.panRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.panRight.Dock = System.Windows.Forms.DockStyle.Right;
            this.panRight.Location = new System.Drawing.Point(491, 0);
            this.panRight.Name = "panRight";
            this.panRight.Size = new System.Drawing.Size(23, 25);
            this.panRight.TabIndex = 2;
            this.panRight.Visible = false;
            this.panRight.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panRight_MouseDown);
            //
            // panLeft
            //
            this.panLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.panLeft.Dock = System.Windows.Forms.DockStyle.Left;
            this.panLeft.Location = new System.Drawing.Point(0, 0);
            this.panLeft.Name = "panLeft";
            this.panLeft.Size = new System.Drawing.Size(23, 25);
            this.panLeft.TabIndex = 1;
            this.panLeft.Visible = false;
            this.panLeft.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panLeft_MouseDown);
            //
            // KSHorizontalList
            //
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
            this.Controls.Add(this.panMain);
            this.Controls.Add(this.panRight);
            this.Controls.Add(this.panLeft);
            this.Name = "KSHorizontalList";
            this.Size = new System.Drawing.Size(514, 25);
            this.panMain.ResumeLayout(false);
            this.ResumeLayout(false);
        }
        #endregion
        /// <summary>
        /// The pan left
        /// </summary>
        private System.Windows.Forms.Panel panLeft;
        /// <summary>
        /// The pan right
        /// </summary>
        private System.Windows.Forms.Panel panRight;
        /// <summary>
        /// The pan main
        /// </summary>
        private System.Windows.Forms.Panel panMain;
        /// <summary>
        /// The pan list
        /// </summary>
        private System.Windows.Forms.Panel panList;
    }
}
WindowsFormsApp1/utils/ui/sub/KSHorizontalList.cs
New file
@@ -0,0 +1,262 @@
// ***********************************************************************
// Assembly         : HZH_Controls
// Created          : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCHorizontalList.cs">
//     Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HZH_Controls;
namespace KS_Controls.Controls
{
    /// <summary>
    /// Class UCHorizontalList.
    /// Implements the <see cref="System.Windows.Forms.UserControl" />
    /// </summary>
    /// <seealso cref="System.Windows.Forms.UserControl" />
    public partial class KSHorizontalList : UserControl
    {
        /// <summary>
        /// Gets or sets the selected item.
        /// </summary>
        /// <value>The selected item.</value>
        public KSHorizontalListItem SelectedItem { get; set; }
        /// <summary>
        /// Occurs when [selected item event].
        /// </summary>
        public event EventHandler SelectedItemEvent;
        /// <summary>
        /// The m start item index
        /// </summary>
        private int m_startItemIndex = 0;
        /// <summary>
        /// The is automatic select first
        /// </summary>
        private bool isAutoSelectFirst = true;
        /// <summary>
        /// Gets or sets a value indicating whether this instance is automatic select first.
        /// </summary>
        /// <value><c>true</c> if this instance is automatic select first; otherwise, <c>false</c>.</value>
        public bool IsAutoSelectFirst
        {
            get { return isAutoSelectFirst; }
            set { isAutoSelectFirst = value; }
        }
        /// <summary>
        /// The data source
        /// </summary>
        private List<KeyValuePair<string, string>> dataSource = null;
        /// <summary>
        /// Gets or sets the data source.
        /// </summary>
        /// <value>The data source.</value>
        public List<KeyValuePair<string, string>> DataSource
        {
            get { return dataSource; }
            set
            {
                dataSource = value;
                ReloadSource();
            }
        }
        private Color selectedColor = Color.FromArgb(255, 77, 59);
        [Description("选中颜色"), Category("自定义")]
        public Color SelectedColor
        {
            get { return selectedColor; }
            set { selectedColor = value; }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UCHorizontalList" /> class.
        /// </summary>
        public KSHorizontalList()
        {
            InitializeComponent();
        }
        /// <summary>
        /// Reloads the source.
        /// </summary>
        public void ReloadSource()
        {
            try
            {
                ControlHelper.FreezeControl(this, true);
                this.panList.SuspendLayout();
                this.panList.Controls.Clear();
                this.panList.Width = this.panMain.Width;
                if (DataSource != null)
                {
                    foreach (var item in DataSource)
                    {
                        KSHorizontalListItem uc = new KSHorizontalListItem();
                        uc.SelectedColor = selectedColor;
                        uc.DataSource = item;
                        uc.SelectedItem += uc_SelectItem;
                        this.panList.Controls.Add(uc);
                    }
                }
                this.panList.ResumeLayout(true);
                if (this.panList.Controls.Count > 0)
                    this.panList.Width = panMain.Width + this.panList.Controls[0].Location.X * -1;
                this.panList.Location = new Point(0, 0);
                m_startItemIndex = 0;
                if (this.panList.Width > panMain.Width)
                    panRight.Visible = true;
                else
                    panRight.Visible = false;
                panLeft.Visible = false;
                panList.SendToBack();
                panRight.SendToBack();
                if (isAutoSelectFirst && DataSource != null && DataSource.Count > 0)
                {
                    SelectItem((KSHorizontalListItem)this.panList.Controls[0]);
                }
            }
            finally
            {
                ControlHelper.FreezeControl(this, false);
            }
        }
        /// <summary>
        /// Handles the SelectItem event of the uc control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
        void uc_SelectItem(object sender, EventArgs e)
        {
            SelectItem(sender as KSHorizontalListItem);
        }
        /// <summary>
        /// Selects the item.
        /// </summary>
        /// <param name="item">The item.</param>
        private void SelectItem(KSHorizontalListItem item)
        {
            if (SelectedItem != null && !SelectedItem.IsDisposed)
                SelectedItem.SetSelect(false);
            SelectedItem = item;
            SelectedItem.SetSelect(true);
            if (SelectedItemEvent != null)
                SelectedItemEvent(item, null);
        }
        /// <summary>
        /// Handles the MouseDown event of the panLeft control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
        private void panLeft_MouseDown(object sender, MouseEventArgs e)
        {
            if (this.panList.Location.X >= 0)
            {
                this.panList.Location = new Point(0, 0);
                return;
            }
            for (int i = m_startItemIndex; i >= 0; i--)
            {
                if (this.panList.Controls[i].Location.X < this.panList.Controls[m_startItemIndex].Location.X - panMain.Width)
                {
                    m_startItemIndex = i + 1;
                    break; ;
                }
                if (i == 0)
                {
                    m_startItemIndex = 0;
                }
            }
            ResetListLocation();
            panRight.Visible = true;
            if (this.panList.Location.X >= 0)
            {
                panLeft.Visible = false;
            }
            else
            {
                panLeft.Visible = true;
            }
            panList.SendToBack();
            panRight.SendToBack();
        }
        /// <summary>
        /// Handles the MouseDown event of the panRight control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
        private void panRight_MouseDown(object sender, MouseEventArgs e)
        {
            if (this.panList.Location.X + this.panList.Width <= this.panMain.Width)
                return;
            if (this.panList.Controls.Count <= 0)
                return;
            for (int i = m_startItemIndex; i < this.panList.Controls.Count; i++)
            {
                if (this.panList.Location.X + this.panList.Controls[i].Location.X + this.panList.Controls[i].Width > panMain.Width)
                {
                    m_startItemIndex = i;
                    break;
                }
            }
            ResetListLocation();
            panLeft.Visible = true;
            if (panList.Width + panList.Location.X <= panMain.Width)
                panRight.Visible = false;
            else
                panRight.Visible = true;
            panList.SendToBack();
            panRight.SendToBack();
        }
        /// <summary>
        /// Resets the list location.
        /// </summary>
        private void ResetListLocation()
        {
            if (this.panList.Controls.Count > 0)
            {
                this.panList.Location = new Point(this.panList.Controls[m_startItemIndex].Location.X * -1, 0);
            }
        }
        /// <summary>
        /// Sets the select.
        /// </summary>
        /// <param name="strKey">The string key.</param>
        public void SetSelect(string strKey)
        {
            foreach (KSHorizontalListItem item in this.panList.Controls)
            {
                if (item.DataSource.Key == strKey)
                {
                    SelectItem(item);
                    return;
                }
            }
        }
    }
}
WindowsFormsApp1/utils/ui/sub/KSHorizontalList.resx
New file
@@ -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>
WindowsFormsApp1/utils/ui/sub/KSHorizontalListItem.cs
New file
@@ -0,0 +1,113 @@
// ***********************************************************************
// Assembly         : HZH_Controls
// Created          : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCHorizontalListItem.cs">
//     Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HZH_Controls;
namespace KS_Controls.Controls
{
    /// <summary>
    /// Class UCHorizontalListItem.
    /// Implements the <see cref="System.Windows.Forms.UserControl" />
    /// </summary>
    /// <seealso cref="System.Windows.Forms.UserControl" />
    [ToolboxItem(false)]
    public partial class KSHorizontalListItem : UserControl
    {
        /// <summary>
        /// Occurs when [selected item].
        /// </summary>
        public event EventHandler SelectedItem;
        /// <summary>
        /// The data source
        /// </summary>
        private KeyValuePair<string, string> _DataSource = new KeyValuePair<string, string>();
        /// <summary>
        /// Gets or sets the data source.
        /// </summary>
        /// <value>The data source.</value>
        public KeyValuePair<string, string> DataSource
        {
            get { return _DataSource; }
            set
            {
                _DataSource = value;
                var g = lblTitle.CreateGraphics();
                int intWidth = ControlHelper.GetStringWidth(value.Value, g, lblTitle.Font);
                g.Dispose();
                //if (intWidth < 50)
                //    intWidth = 50;
                this.Width = intWidth + 8;
                lblTitle.Text = value.Value;
                SetSelect(false);
            }
        }
        private Color selectedColor = Color.FromArgb(255, 77, 59);
        public Color SelectedColor
        {
            get { return selectedColor; }
            set { selectedColor = value; }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UCHorizontalListItem" /> class.
        /// </summary>
        public KSHorizontalListItem()
        {
            InitializeComponent();
            this.Dock = DockStyle.Right;
            this.MouseDown += Item_MouseDown;
            this.lblTitle.MouseDown += Item_MouseDown;
        }
        /// <summary>
        /// Handles the MouseDown event of the Item control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
        void Item_MouseDown(object sender, MouseEventArgs e)
        {
            if (SelectedItem != null)
                SelectedItem(this, e);
        }
        /// <summary>
        /// Sets the select.
        /// </summary>
        /// <param name="bln">if set to <c>true</c> [BLN].</param>
        public void SetSelect(bool bln)
        {
            if (bln)
            {
                lblTitle.ForeColor = selectedColor;
                this.lblTitle.Padding = new Padding(0, 0, 0, 0);
            }
            else
            {
                lblTitle.ForeColor = Color.FromArgb(64, 64, 64);
                this.lblTitle.Padding = new Padding(0, 0, 0, 0);
            }
        }
    }
}
WindowsFormsApp1/utils/ui/sub/KSHorizontalListItem.designer.cs
New file
@@ -0,0 +1,88 @@
// ***********************************************************************
// Assembly         : HZH_Controls
// Created          : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCHorizontalListItem.Designer.cs">
//     Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
namespace KS_Controls.Controls
{
    /// <summary>
    /// Class UCHorizontalListItem.
    /// Implements the <see cref="System.Windows.Forms.UserControl" />
    /// </summary>
    /// <seealso cref="System.Windows.Forms.UserControl" />
    partial class KSHorizontalListItem
    {
        /// <summary>
        /// 必需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region 组件设计器生成的代码
        /// <summary>
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            this.lblTitle = new System.Windows.Forms.Label();
            this.SuspendLayout();
            //
            // lblTitle
            //
            this.lblTitle.Dock = System.Windows.Forms.DockStyle.Fill;
            this.lblTitle.Font = new System.Drawing.Font("微软雅黑", 9F);
            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            this.lblTitle.Location = new System.Drawing.Point(1, 0);
            this.lblTitle.Name = "lblTitle";
            this.lblTitle.Padding = new System.Windows.Forms.Padding(0, 0, 0, 0);
            this.lblTitle.Size = new System.Drawing.Size(118, 25);
            this.lblTitle.TabIndex = 1;
            this.lblTitle.Text = "项目名称";
            this.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            //
            // UCHorizontalListItem
            //
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
            this.Controls.Add(this.lblTitle);
            this.Name = "UCHorizontalListItem";
            this.Padding = new System.Windows.Forms.Padding(1, 0, 1, 0);
            this.Size = new System.Drawing.Size(120, 25);
            this.ResumeLayout(false);
        }
        #endregion
        /// <summary>
        /// The uc split line h1
        /// </summary>
        /// <summary>
        /// The label title
        /// </summary>
        private System.Windows.Forms.Label lblTitle;
    }
}
WindowsFormsApp1/utils/ui/sub/KSHorizontalListItem.resx
New file
@@ -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>