机会商品采集功能

This commit is contained in:
wule committed 2025-12-29 19:56:10 +08:00
1 parent dae2bea6ef
commit c0b3583fef
18 files changed
+913 -157

No files matched your search

+19 -3
View File
@@ -36,6 +36,7 @@ namespace TemuKJD.ToolForms
this.btnCopy = new DevComponents.DotNetBar.PanelEx();
this.btnCopyUrl = new DevComponents.DotNetBar.PanelEx();
this.btnClose = new DevComponents.DotNetBar.PanelEx();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -58,6 +59,7 @@ namespace TemuKJD.ToolForms
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.label1);
this.splitContainer1.Panel2.Controls.Add(this.btnSave);
this.splitContainer1.Panel2.Controls.Add(this.btnCopy);
this.splitContainer1.Panel2.Controls.Add(this.btnCopyUrl);
@@ -76,6 +78,7 @@ namespace TemuKJD.ToolForms
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// btnSave
//
@@ -84,7 +87,7 @@ namespace TemuKJD.ToolForms
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(366, 4);
this.btnSave.Location = new System.Drawing.Point(180, 4);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(65, 26);
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -109,7 +112,7 @@ namespace TemuKJD.ToolForms
this.btnCopy.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCopy.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCopy.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopy.Location = new System.Drawing.Point(295, 4);
this.btnCopy.Location = new System.Drawing.Point(109, 4);
this.btnCopy.Name = "btnCopy";
this.btnCopy.Size = new System.Drawing.Size(65, 26);
this.btnCopy.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -134,7 +137,7 @@ namespace TemuKJD.ToolForms
this.btnCopyUrl.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCopyUrl.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCopyUrl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopyUrl.Location = new System.Drawing.Point(194, 4);
this.btnCopyUrl.Location = new System.Drawing.Point(8, 4);
this.btnCopyUrl.Name = "btnCopyUrl";
this.btnCopyUrl.Size = new System.Drawing.Size(94, 26);
this.btnCopyUrl.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -177,6 +180,16 @@ namespace TemuKJD.ToolForms
this.btnClose.Text = "关闭";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(265, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(188, 17);
this.label1.TabIndex = 518;
this.label1.Text = "点击图片或按空格键切换列表图片";
this.label1.Visible = false;
//
// ShowImgForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -189,10 +202,12 @@ namespace TemuKJD.ToolForms
this.ShowMaximizeBox = true;
this.Text = "图片查看";
this.TitleText = "图片查看";
this.Load += new System.EventHandler(this.ShowImgForm_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ShowImgForm_KeyDown);
this.Controls.SetChildIndex(this.splitContainer1, 0);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
@@ -208,5 +223,6 @@ namespace TemuKJD.ToolForms
private DevComponents.DotNetBar.PanelEx btnCopy;
private DevComponents.DotNetBar.PanelEx btnCopyUrl;
private DevComponents.DotNetBar.PanelEx btnSave;
private System.Windows.Forms.Label label1;
}
}
+59
View File
@@ -52,6 +52,32 @@ namespace TemuKJD.ToolForms
//case Keys.B: MessageBox.Show("您按下的是B"); break;
case Keys.Enter: break;
case Keys.Escape: this.Close(); break;
case Keys.Space:
if (imgDic != null && imgDic.Keys.Count > 0)
{
for (int i = 0; i < imgDic.Keys.ToList().Count; i++)
{
if (imgDic.Keys.ToList()[i] == currentImgUrl)
{
int index = i + 1;
if (index == imgDic.Keys.Count)
index = 0;
currentImgUrl = imgDic.Keys.ToList()[index];
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
break;
}
if (imgDic[imgDic.Keys.ToList()[i]] == currentImgUrl)
{
int index = i + 1;
if (index == imgDic.Keys.Count)
index = 0;
currentImgUrl = imgDic[imgDic.Keys.ToList()[index]];
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
break;
}
}
}
break;
}
}
@@ -110,5 +136,38 @@ namespace TemuKJD.ToolForms
}
}
}
private void pictureBox1_Click(object sender, EventArgs e)
{
if (imgDic != null && imgDic.Keys.Count > 0)
{
for (int i = 0; i < imgDic.Keys.ToList().Count; i++)
{
if (imgDic.Keys.ToList()[i] == currentImgUrl)
{
int index = i + 1;
if (index == imgDic.Keys.Count)
index = 0;
currentImgUrl = imgDic.Keys.ToList()[index];
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
break;
}
if (imgDic[imgDic.Keys.ToList()[i]] == currentImgUrl)
{
int index = i + 1;
if (index == imgDic.Keys.Count)
index = 0;
currentImgUrl = imgDic[imgDic.Keys.ToList()[index]];
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
break;
}
}
}
}
private void ShowImgForm_Load(object sender, EventArgs e)
{
label1.Visible = this.imgDic != null && this.imgDic.Keys.Count > 0;
}
}
}