优化代码

This commit is contained in:
wule_5900x committed 2026-01-27 00:48:43 +08:00
1 parent ddc5f6490f
commit 625f4d9420
4 files changed
+44 -43

No files matched your search

+28 -28
View File
@@ -30,11 +30,11 @@ namespace TemuKJD.ToolForms
private void InitializeComponent()
{
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();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
@@ -107,7 +107,7 @@ namespace TemuKJD.ToolForms
this.tabControl1.Multiline = true;
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1404, 470);
this.tabControl1.Size = new System.Drawing.Size(1404, 471);
this.tabControl1.TabIndex = 0;
//
// tabPage1
@@ -117,7 +117,7 @@ namespace TemuKJD.ToolForms
this.tabPage1.Location = new System.Drawing.Point(4, 28);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1396, 438);
this.tabPage1.Size = new System.Drawing.Size(1396, 439);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = " 商品页面 ";
this.tabPage1.UseVisualStyleBackColor = true;
@@ -136,7 +136,7 @@ namespace TemuKJD.ToolForms
this.splitContainer2.Panel1.Controls.Add(this.btnNext);
this.splitContainer2.Panel1.Controls.Add(this.btnPrev);
this.splitContainer2.Panel1.Controls.Add(this.txtAddress);
this.splitContainer2.Size = new System.Drawing.Size(1388, 430);
this.splitContainer2.Size = new System.Drawing.Size(1388, 431);
this.splitContainer2.SplitterDistance = 26;
this.splitContainer2.TabIndex = 6;
//
@@ -178,7 +178,7 @@ namespace TemuKJD.ToolForms
this.tabPage2.Location = new System.Drawing.Point(4, 28);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(1896, 437);
this.tabPage2.Size = new System.Drawing.Size(1396, 439);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = " 商品列表 ";
this.tabPage2.UseVisualStyleBackColor = true;
@@ -187,7 +187,7 @@ namespace TemuKJD.ToolForms
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(923, 196);
this.pbLoading.Location = new System.Drawing.Point(673, 197);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -199,20 +199,20 @@ namespace TemuKJD.ToolForms
//
this.dgvProduct.AllowUserToAddRows = false;
this.dgvProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
this.dgvProduct.AutoRowNumber = true;
this.dgvProduct.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colCheck,
@@ -231,7 +231,7 @@ namespace TemuKJD.ToolForms
this.dgvProduct.Name = "dgvProduct";
this.dgvProduct.ReadOnly = true;
this.dgvProduct.RowTemplate.Height = 23;
this.dgvProduct.Size = new System.Drawing.Size(1890, 431);
this.dgvProduct.Size = new System.Drawing.Size(1390, 433);
this.dgvProduct.TabIndex = 7;
this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick);
//
@@ -271,8 +271,8 @@ namespace TemuKJD.ToolForms
//
// colGoodsName
//
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle8;
this.colGoodsName.FillWeight = 120F;
this.colGoodsName.HeaderText = "商品名称";
this.colGoodsName.Name = "colGoodsName";
@@ -300,8 +300,8 @@ namespace TemuKJD.ToolForms
//
// colPrice
//
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colPrice.DefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colPrice.DefaultCellStyle = dataGridViewCellStyle9;
this.colPrice.FillWeight = 70F;
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
@@ -316,8 +316,8 @@ namespace TemuKJD.ToolForms
//
// colMsg
//
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colMsg.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colMsg.DefaultCellStyle = dataGridViewCellStyle10;
this.colMsg.FillWeight = 200F;
this.colMsg.HeaderText = "操作结果";
this.colMsg.Name = "colMsg";
@@ -364,7 +364,7 @@ namespace TemuKJD.ToolForms
this.splitContainer1.Panel2.Controls.Add(this.btnImportCookie);
this.splitContainer1.Panel2.Controls.Add(this.label2);
this.splitContainer1.Size = new System.Drawing.Size(1404, 561);
this.splitContainer1.SplitterDistance = 470;
this.splitContainer1.SplitterDistance = 471;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//