diff --git a/TEMUKJD/Helper/CustomDownloadHandler.cs b/TEMUKJD/Helper/CustomDownloadHandler.cs index 5ca68cc..7529050 100644 --- a/TEMUKJD/Helper/CustomDownloadHandler.cs +++ b/TEMUKJD/Helper/CustomDownloadHandler.cs @@ -12,15 +12,16 @@ namespace TemuKJD.Helper { public class CustomDownloadHandler : DownloadHandler { - private string downloadPath; + private string downloadPath; public Action DownloadCompleteEvent; + public Action DownloadStartEvent; public CustomDownloadHandler(string path = null) { // 设置默认下载路径为用户的下载文件夹 downloadPath = path ?? Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), - "Downloads"); + "Downloads\\DoubaoImage"); // 确保下载目录存在 if (!Directory.Exists(downloadPath)) @@ -47,8 +48,10 @@ namespace TemuKJD.Helper var filePath = Path.Combine(downloadPath, downloadFileName); using (callback) { - callback.Continue(filePath, showDialog: true); + // 是否显示下载文件夹 + callback.Continue(filePath, showDialog: false); } + DownloadStartEvent?.Invoke(chromiumWebBrowser, downloadItem); } return true; } diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.Designer.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.Designer.cs index 704feef..d022a93 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.Designer.cs @@ -387,10 +387,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms // this.ucSplitPage1.CurrentPage = 1; this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; + this.ucSplitPage1.IsShowPageSize = false; this.ucSplitPage1.Location = new System.Drawing.Point(916, 0); this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); this.ucSplitPage1.Name = "ucSplitPage1"; this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.ucSplitPage1.PageSize = 50; this.ucSplitPage1.Size = new System.Drawing.Size(362, 25); this.ucSplitPage1.TabIndex = 6; this.ucSplitPage1.TotalPage = 1; @@ -426,7 +428,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms // dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.col_product_name.DefaultCellStyle = dataGridViewCellStyle3; - this.col_product_name.FillWeight = 200F; + this.col_product_name.FillWeight = 180F; this.col_product_name.HeaderText = "标题"; this.col_product_name.Name = "col_product_name"; this.col_product_name.ReadOnly = true; @@ -450,12 +452,14 @@ namespace TemuKJD.KJDForms.ProductSelectForms // // col_spu_id // + this.col_spu_id.FillWeight = 90F; this.col_spu_id.HeaderText = "SPU Id"; this.col_spu_id.Name = "col_spu_id"; this.col_spu_id.ReadOnly = true; // // col_skc_id // + this.col_skc_id.FillWeight = 90F; this.col_skc_id.HeaderText = "SKC Id"; this.col_skc_id.Name = "col_skc_id"; this.col_skc_id.ReadOnly = true; diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs index 4997a5d..ca269c7 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs @@ -1176,8 +1176,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms // 标题完全打乱 if (chkReFissionAllProdName.Checked) { - List centerNameLst = centerName - .Split(new string[] { ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList(); + List centerNameLst = centerName.Trim(',', ',', ' ') + .Split(new string[] { ",", "," }, StringSplitOptions.RemoveEmptyEntries) + .Select(s => s.Trim(' ')).ToList(); string newCenterName = ""; while (centerNameLst.Count > 0) diff --git a/TEMUKJD/ToolForms/DouBaoImgCefForm.cs b/TEMUKJD/ToolForms/DouBaoImgCefForm.cs index 70e0244..f18f3be 100644 --- a/TEMUKJD/ToolForms/DouBaoImgCefForm.cs +++ b/TEMUKJD/ToolForms/DouBaoImgCefForm.cs @@ -89,16 +89,18 @@ namespace TemuKJD.ToolForms ",\"specId\":" + sku.productSkuSpecList[0].specId + ",\"specName\":\"" + sku.productSkuSpecList[0].specName + "\"}"; skuImgItem.pbSkuOriginalImg.Name = sku.productSkuId.ToString(); - skuImgItem.label1.Text = sku.productSkuSpecList[0].specName; - skuImgItem.panelEx1.Tag = skuImgItem; - skuImgItem.panelEx1.Click += pnlGetOriginalImg_Click; - skuImgItem.panelEx2.Tag = skuImgItem; - skuImgItem.panelEx2.Click += pnlUploadImg_Click; - skuImgItem.Dock = DockStyle.Top; + skuImgItem.chkSpecName.Text = sku.productSkuSpecList[0].specName; + skuImgItem.chkSpecName.Tag = skuImgItem; + skuImgItem.chkSpecName.CheckedChanged += ChkSpecName_CheckedChanged; + skuImgItem.btnGetOriginalImg.Tag = skuImgItem; + skuImgItem.btnGetOriginalImg.Click += btnGetOriginalImg_Click; + skuImgItem.btnUploadImg.Tag = skuImgItem; + skuImgItem.btnUploadImg.Click += btnUploadImg_Click; + skuImgItem.pbSkuOriginalImg.Tag = skuImgItem; skuImgItem.pbSkuOriginalImg.Click += pbSkuOriginalImg_Click; skuImgItem.pbSkuImg.Tag = skuImgItem; - //skuImgItem.pbSkuImg.Click += pbSkuOriginalImg_Click; skuImgItem.pbSkuImg.Click += PbSkuImg_Click; + skuImgItem.Dock = DockStyle.Top; ucImgChangeList.Add(skuImgItem); this.splitContainer3.Panel2.Controls.Add(skuImgItem); } @@ -148,13 +150,41 @@ namespace TemuKJD.ToolForms } + private void ChkSpecName_CheckedChanged(object sender, EventArgs e) + { + var chk = sender as UserComponent.UcCheckBox; + if (chk == null) + return; + var skuImgItem = chk.Tag as UcSkuImgItem; + if (skuImgItem == null) + return; + + if (skuImgItem.chkSpecName.Checked) + SetCurrentSkuImgItem(skuImgItem); + } + private void DownloadHandler_DownloadComplete(object browser, DownloadItem downloadItem) { //BaseMsgForm.ShowInfo(downloadItem.FullPath + "下载完成"); Invoke(new Action(() => { + if(currentSkuImgItem == null) + { + BaseMsgForm.ShowInfo("当前未选择sku,点击选择sku再下载,图片将直接上传到服务端!"); + this.lblMsg.Text = downloadItem.FullPath + "下载完成"; + } + else + { + if (UpdateSkuImg(currentSkuImgItem, downloadItem.FullPath)) + { + this.lblMsg.Text = downloadItem.FullPath + "下载并上传服务端完成"; + } + else + { + this.lblMsg.Text = downloadItem.FullPath + "下载完成"; + } + } this.pnlMsg.Visible = true; - this.lblMsg.Text = downloadItem.FullPath + "下载完成"; })); Task.Run(() => { @@ -202,6 +232,8 @@ namespace TemuKJD.ToolForms private void pbSkuOriginalImg_Click(object sender, EventArgs e) { var pb = sender as PictureBox; + if (pb == null) + return; if (!string.IsNullOrEmpty(pb.ImageLocation)) { @@ -213,6 +245,12 @@ namespace TemuKJD.ToolForms ShowImgForm imgFrom = new ShowImgForm(pb.Image); imgFrom.ShowDialog(); } + + var skuImgItem = pb.Tag as UcSkuImgItem; + if (skuImgItem == null) + return; + + //SetCurrentSkuImgItem(skuImgItem); } private void PbSkuImg_Click(object sender, EventArgs e) @@ -224,6 +262,8 @@ namespace TemuKJD.ToolForms if (skuImgItem == null) return; + //SetCurrentSkuImgItem(skuImgItem); + DouBaoImgListForm imgLstForm = new DouBaoImgListForm(skuImgItem.LstSkuImgInfo); imgLstForm.ShowDialog(); var imgInfo = skuImgItem.LstSkuImgInfo.FirstOrDefault(); @@ -240,7 +280,7 @@ namespace TemuKJD.ToolForms } } - private void pnlUploadImg_Click(object sender, EventArgs e) + private void btnGetOriginalImg_Click(object sender, EventArgs e) { var pnl = sender as DevComponents.DotNetBar.PanelEx; if (pnl == null) @@ -249,104 +289,7 @@ namespace TemuKJD.ToolForms if (skuImgItem == null) return; - OpenFileDialog openFileDialog = new OpenFileDialog(); - openFileDialog.Multiselect = false; - // 设置过滤条件,只显示文本文件 - openFileDialog.Filter = "图片文件 (*.jpeg;*.jpg;*.png)|*.jpeg;*.jpg;*.png|All files (*.*)|*.*"; - // 显示对话框并获取结果 - if (openFileDialog.ShowDialog() == DialogResult.OK) - { - try - { - string filePath = openFileDialog.FileName; - Image image = Image.FromFile(filePath); - ImageBuild ib = null; - using (MemoryStream memoryStream = new MemoryStream()) - { - image.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Jpeg); - byte[] imageBytes = memoryStream.ToArray(); - ib = new ImageBuild(imageBytes); - } - var newImgBytes = ib.BuildNewSize(800, 800, 85); - Bitmap bitmap = null; - using (MemoryStream ms = new MemoryStream(newImgBytes)) - { - //skuImgItem.pictureBox2.Image = Image.FromStream(ms); - // 将image转成bitmap以后使用才能释放生成MemoryStream,否则保存Image对象到文件会产生GDI+中发生一般性错误 - bitmap = new Bitmap(Image.FromStream(ms)); - // 打码,打上马赛克 - var x = txtXPos.Text.ParseToInt(); - var y = txtYPos.Text.ParseToInt(); - var cx = txtXSize.Text.ParseToInt(); - var cy = txtYSize.Text.ParseToInt(); - //bitmap = ApplyMosaicEffect(bitmap, new Rectangle(665, 740, 125, 50), 25); - bitmap = ApplyMosaicEffect(bitmap, new Rectangle(x, y, cx, cy), 60); - //skuImgItem.pictureBox2.Image = bitmap; - } - - string imgBase64 = ""; - using (MemoryStream memoryStream = new MemoryStream()) - { - bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Jpeg); - byte[] imageBytes = memoryStream.ToArray(); - imgBase64 = Convert.ToBase64String(imageBytes); - } - string img_md5 = BaseClass.GetMd5(imgBase64); - - var url = BaseClass.BuildObjString("product/add_sku_image"); - var data = UserLogin.GetSignaturex(); - data += "&img_base64=" + imgBase64; - data += "&img_md5=" + img_md5; - data += "&product_id=" + skuImgItem.ProdId; - data += "&spec_id=" + skuImgItem.SpecId; - data += "&spec_name=" + skuImgItem.SpecName; - data += "&original_img_url=" + skuImgItem.SpecImgUrl; - data += "&original_img_url_md5=" + BaseClass.GetMd5(skuImgItem.SpecImgUrl); - - var html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - { - BaseMsgForm.ShowError("SKU图片编辑失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg")); - } - else - { - skuImgItem.LstSkuImgInfo.Insert(0, new AiSkuImgInfo() - { - id = BaseRegex.GetIntJson(ref html, "sku_img_id"), - add_time = DateTime.Now, - mdy_time = DateTime.Now, - img_base64 = imgBase64, - img_base64_db_id = BaseRegex.GetIntJson(ref html, "sku_img_Base64_id"), - img_md5 = img_md5, - img_url = "", - original_img_url = skuImgItem.SpecImgUrl, - product_id = skuImgItem.ProdId.ParseToString(), - spec_id = skuImgItem.SpecId.ParseToString(), - spec_name = skuImgItem.SpecName, - }); - skuImgItem.pbSkuImg.Image = bitmap; - } - } - catch (Exception ex) - { - BaseMsgForm.ShowError("打开自定义图片失败 " + ex.Message); - return; - } - } - } - - private void pnlGetOriginalImg_Click(object sender, EventArgs e) - { - var pnl = sender as DevComponents.DotNetBar.PanelEx; - if (pnl == null) - return; - var skuImgItem = pnl.Tag as UcSkuImgItem; - if (skuImgItem == null) - return; + SetCurrentSkuImgItem(skuImgItem); var pb = skuImgItem.pbSkuOriginalImg; if (pb.Image == null) @@ -370,6 +313,133 @@ namespace TemuKJD.ToolForms } } + private void btnUploadImg_Click(object sender, EventArgs e) + { + var pnl = sender as DevComponents.DotNetBar.PanelEx; + if (pnl == null) + return; + var skuImgItem = pnl.Tag as UcSkuImgItem; + if (skuImgItem == null) + return; + + SetCurrentSkuImgItem(skuImgItem); + + OpenFileDialog openFileDialog = new OpenFileDialog(); + openFileDialog.Multiselect = false; + // 设置过滤条件,只显示文本文件 + openFileDialog.Filter = "图片文件 (*.jpeg;*.jpg;*.png)|*.jpeg;*.jpg;*.png|All files (*.*)|*.*"; + // 显示对话框并获取结果 + if (openFileDialog.ShowDialog() == DialogResult.OK) + { + string filePath = openFileDialog.FileName; + UpdateSkuImg(skuImgItem, filePath); + } + } + + bool UpdateSkuImg(UcSkuImgItem skuImgItem, string filePath) + { + try + { + Image image = Image.FromFile(filePath); + ImageBuild ib = null; + using (MemoryStream memoryStream = new MemoryStream()) + { + image.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Jpeg); + byte[] imageBytes = memoryStream.ToArray(); + ib = new ImageBuild(imageBytes); + } + var newImgBytes = ib.BuildNewSize(800, 800, 85); + Bitmap bitmap = null; + using (MemoryStream ms = new MemoryStream(newImgBytes)) + { + //skuImgItem.pictureBox2.Image = Image.FromStream(ms); + // 将image转成bitmap以后使用才能释放生成MemoryStream,否则保存Image对象到文件会产生GDI+中发生一般性错误 + bitmap = new Bitmap(Image.FromStream(ms)); + // 打码,打上马赛克 + var x = txtXPos.Text.ParseToInt(); + var y = txtYPos.Text.ParseToInt(); + var cx = txtXSize.Text.ParseToInt(); + var cy = txtYSize.Text.ParseToInt(); + //bitmap = ApplyMosaicEffect(bitmap, new Rectangle(665, 740, 125, 50), 25); + bitmap = ApplyMosaicEffect(bitmap, new Rectangle(x, y, cx, cy), 60); + //skuImgItem.pictureBox2.Image = bitmap; + } + + string imgBase64 = ""; + using (MemoryStream memoryStream = new MemoryStream()) + { + bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Jpeg); + byte[] imageBytes = memoryStream.ToArray(); + imgBase64 = Convert.ToBase64String(imageBytes); + } + string img_md5 = BaseClass.GetMd5(imgBase64); + + var url = BaseClass.BuildObjString("product/add_sku_image"); + var data = UserLogin.GetSignaturex(); + data += "&img_base64=" + imgBase64; + data += "&img_md5=" + img_md5; + data += "&product_id=" + skuImgItem.ProdId; + data += "&spec_id=" + skuImgItem.SpecId; + data += "&spec_name=" + skuImgItem.SpecName; + data += "&original_img_url=" + skuImgItem.SpecImgUrl; + data += "&original_img_url_md5=" + BaseClass.GetMd5(skuImgItem.SpecImgUrl); + + var html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + BaseMsgForm.ShowError("sku图片上传服务端失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg")); + return false; + } + else + { + skuImgItem.LstSkuImgInfo.Insert(0, new AiSkuImgInfo() + { + id = BaseRegex.GetIntJson(ref html, "sku_img_id"), + add_time = DateTime.Now, + mdy_time = DateTime.Now, + img_base64 = imgBase64, + img_base64_db_id = BaseRegex.GetIntJson(ref html, "sku_img_Base64_id"), + img_md5 = img_md5, + img_url = "", + original_img_url = skuImgItem.SpecImgUrl, + product_id = skuImgItem.ProdId.ParseToString(), + spec_id = skuImgItem.SpecId.ParseToString(), + spec_name = skuImgItem.SpecName, + }); + skuImgItem.pbSkuImg.Image = bitmap; + } + return true; + } + catch (Exception ex) + { + BaseMsgForm.ShowError("sku图片上传服务端失败!" + ex.Message); + return false; + } + } + + private UcSkuImgItem currentSkuImgItem = null; + void SetCurrentSkuImgItem(UcSkuImgItem skuImgItem) + { + if (skuImgItem != null) + { + currentSkuImgItem = skuImgItem; + foreach (var item in splitContainer3.Panel2.Controls) + { + var imgItem = item as UcSkuImgItem; + if (imgItem != null && imgItem != skuImgItem) + { + imgItem.BackColor = Color.LightSteelBlue; + imgItem.chkSpecName.Checked = false; + } + } + skuImgItem.BackColor = Color.DodgerBlue; + } + } + private void CefWebBrowser_AddressChanged(object sender, CefSharp.AddressChangedEventArgs e) { if (this.Created) @@ -390,8 +460,6 @@ namespace TemuKJD.ToolForms this.cefWebBrowser.Load(txtUrl.Text.Trim()); } - - /// /// 给图片打上马赛克 /// diff --git a/TEMUKJD/ToolForms/DouBaoImgListForm.cs b/TEMUKJD/ToolForms/DouBaoImgListForm.cs index 41f58b3..e7f8418 100644 --- a/TEMUKJD/ToolForms/DouBaoImgListForm.cs +++ b/TEMUKJD/ToolForms/DouBaoImgListForm.cs @@ -46,6 +46,7 @@ namespace TemuKJD.ToolForms imgListItem.btnDel.Tag = skuImg; imgListItem.Anchor = AnchorStyles.None; imgListItem.btnDel.Click += BtnDel_Click; + imgListItem.lblUseCount.Text = "共使用 " + skuImg.use_count + " 次"; this.flowLayoutPanel1.Controls.Add(imgListItem); } } diff --git a/TEMUKJD/ToolForms/UcSkuImgItem.Designer.cs b/TEMUKJD/ToolForms/UcSkuImgItem.Designer.cs index 466ef94..37a2ece 100644 --- a/TEMUKJD/ToolForms/UcSkuImgItem.Designer.cs +++ b/TEMUKJD/ToolForms/UcSkuImgItem.Designer.cs @@ -29,16 +29,17 @@ namespace TemuKJD.ToolForms /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.pbSkuOriginalImg = new System.Windows.Forms.PictureBox(); - this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.btnGetOriginalImg = new DevComponents.DotNetBar.PanelEx(); this.splitContainer3 = new System.Windows.Forms.SplitContainer(); this.pnlMore = new DevComponents.DotNetBar.PanelEx(); this.pbSkuImg = new System.Windows.Forms.PictureBox(); - this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); + this.btnUploadImg = new DevComponents.DotNetBar.PanelEx(); this.splitContainer4 = new System.Windows.Forms.SplitContainer(); - this.label1 = new System.Windows.Forms.Label(); + this.chkSpecName = new TemuKJD.UserComponent.UcCheckBox(this.components); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -76,8 +77,8 @@ namespace TemuKJD.ToolForms // this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); this.splitContainer1.Panel2.Padding = new System.Windows.Forms.Padding(0, 2, 2, 2); - this.splitContainer1.Size = new System.Drawing.Size(206, 127); - this.splitContainer1.SplitterDistance = 102; + this.splitContainer1.Size = new System.Drawing.Size(204, 125); + this.splitContainer1.SplitterDistance = 101; this.splitContainer1.SplitterWidth = 2; this.splitContainer1.TabIndex = 0; // @@ -96,9 +97,9 @@ namespace TemuKJD.ToolForms // // splitContainer2.Panel2 // - this.splitContainer2.Panel2.Controls.Add(this.panelEx1); - this.splitContainer2.Size = new System.Drawing.Size(100, 123); - this.splitContainer2.SplitterDistance = 96; + this.splitContainer2.Panel2.Controls.Add(this.btnGetOriginalImg); + this.splitContainer2.Size = new System.Drawing.Size(99, 121); + this.splitContainer2.SplitterDistance = 94; this.splitContainer2.SplitterWidth = 2; this.splitContainer2.TabIndex = 0; // @@ -108,34 +109,34 @@ namespace TemuKJD.ToolForms this.pbSkuOriginalImg.Image = global::TemuKJD.Properties.Resources.nopic; this.pbSkuOriginalImg.Location = new System.Drawing.Point(0, 0); this.pbSkuOriginalImg.Name = "pbSkuOriginalImg"; - this.pbSkuOriginalImg.Size = new System.Drawing.Size(100, 96); + this.pbSkuOriginalImg.Size = new System.Drawing.Size(99, 94); this.pbSkuOriginalImg.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pbSkuOriginalImg.TabIndex = 0; this.pbSkuOriginalImg.TabStop = false; // - // panelEx1 + // btnGetOriginalImg // - this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.panelEx1.Cursor = System.Windows.Forms.Cursors.Hand; - this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelEx1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.panelEx1.Location = new System.Drawing.Point(0, 0); - this.panelEx1.Name = "panelEx1"; - this.panelEx1.Size = new System.Drawing.Size(100, 25); - this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.panelEx1.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.panelEx1.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.panelEx1.Style.ForeColor.Color = System.Drawing.Color.White; - this.panelEx1.Style.GradientAngle = 90; - this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.panelEx1.TabIndex = 521; - this.panelEx1.Text = "下载原图"; + this.btnGetOriginalImg.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnGetOriginalImg.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnGetOriginalImg.DisabledBackColor = System.Drawing.Color.Empty; + this.btnGetOriginalImg.Dock = System.Windows.Forms.DockStyle.Fill; + this.btnGetOriginalImg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnGetOriginalImg.Location = new System.Drawing.Point(0, 0); + this.btnGetOriginalImg.Name = "btnGetOriginalImg"; + this.btnGetOriginalImg.Size = new System.Drawing.Size(99, 25); + this.btnGetOriginalImg.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnGetOriginalImg.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnGetOriginalImg.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnGetOriginalImg.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnGetOriginalImg.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnGetOriginalImg.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnGetOriginalImg.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnGetOriginalImg.Style.GradientAngle = 90; + this.btnGetOriginalImg.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnGetOriginalImg.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnGetOriginalImg.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnGetOriginalImg.TabIndex = 521; + this.btnGetOriginalImg.Text = "下载原图"; // // splitContainer3 // @@ -153,9 +154,9 @@ namespace TemuKJD.ToolForms // // splitContainer3.Panel2 // - this.splitContainer3.Panel2.Controls.Add(this.panelEx2); - this.splitContainer3.Size = new System.Drawing.Size(100, 123); - this.splitContainer3.SplitterDistance = 96; + this.splitContainer3.Panel2.Controls.Add(this.btnUploadImg); + this.splitContainer3.Size = new System.Drawing.Size(99, 121); + this.splitContainer3.SplitterDistance = 94; this.splitContainer3.SplitterWidth = 2; this.splitContainer3.TabIndex = 1; // @@ -167,7 +168,7 @@ namespace TemuKJD.ToolForms this.pnlMore.Cursor = System.Windows.Forms.Cursors.Hand; this.pnlMore.DisabledBackColor = System.Drawing.Color.Empty; this.pnlMore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.pnlMore.Location = new System.Drawing.Point(77, 74); + this.pnlMore.Location = new System.Drawing.Point(76, 76); this.pnlMore.Name = "pnlMore"; this.pnlMore.Size = new System.Drawing.Size(23, 23); this.pnlMore.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -192,35 +193,35 @@ namespace TemuKJD.ToolForms this.pbSkuImg.Image = global::TemuKJD.Properties.Resources.nopic; this.pbSkuImg.Location = new System.Drawing.Point(0, 0); this.pbSkuImg.Name = "pbSkuImg"; - this.pbSkuImg.Size = new System.Drawing.Size(100, 96); + this.pbSkuImg.Size = new System.Drawing.Size(99, 94); this.pbSkuImg.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pbSkuImg.TabIndex = 0; this.pbSkuImg.TabStop = false; this.pbSkuImg.Click += new System.EventHandler(this.pbSkuImg_Click); // - // panelEx2 + // btnUploadImg // - this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.panelEx2.Cursor = System.Windows.Forms.Cursors.Hand; - this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelEx2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.panelEx2.Location = new System.Drawing.Point(0, 0); - this.panelEx2.Name = "panelEx2"; - this.panelEx2.Size = new System.Drawing.Size(100, 25); - this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx2.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.panelEx2.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.panelEx2.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.panelEx2.Style.ForeColor.Color = System.Drawing.Color.White; - this.panelEx2.Style.GradientAngle = 90; - this.panelEx2.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx2.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.panelEx2.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.panelEx2.TabIndex = 521; - this.panelEx2.Text = "新增AI图"; + this.btnUploadImg.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnUploadImg.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnUploadImg.DisabledBackColor = System.Drawing.Color.Empty; + this.btnUploadImg.Dock = System.Windows.Forms.DockStyle.Fill; + this.btnUploadImg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnUploadImg.Location = new System.Drawing.Point(0, 0); + this.btnUploadImg.Name = "btnUploadImg"; + this.btnUploadImg.Size = new System.Drawing.Size(99, 25); + this.btnUploadImg.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnUploadImg.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnUploadImg.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnUploadImg.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnUploadImg.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnUploadImg.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnUploadImg.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnUploadImg.Style.GradientAngle = 90; + this.btnUploadImg.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnUploadImg.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnUploadImg.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnUploadImg.TabIndex = 521; + this.btnUploadImg.Text = "新增SKU图"; // // splitContainer4 // @@ -228,43 +229,43 @@ namespace TemuKJD.ToolForms this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; this.splitContainer4.IsSplitterFixed = true; - this.splitContainer4.Location = new System.Drawing.Point(1, 1); + this.splitContainer4.Location = new System.Drawing.Point(2, 2); this.splitContainer4.Name = "splitContainer4"; this.splitContainer4.Orientation = System.Windows.Forms.Orientation.Horizontal; // // splitContainer4.Panel1 // - this.splitContainer4.Panel1.Controls.Add(this.label1); - this.splitContainer4.Panel1.Padding = new System.Windows.Forms.Padding(0, 2, 0, 0); + this.splitContainer4.Panel1.Controls.Add(this.chkSpecName); + this.splitContainer4.Panel1.Padding = new System.Windows.Forms.Padding(4, 2, 0, 0); this.splitContainer4.Panel1MinSize = 20; // // splitContainer4.Panel2 // this.splitContainer4.Panel2.Controls.Add(this.splitContainer1); this.splitContainer4.Panel2MinSize = 20; - this.splitContainer4.Size = new System.Drawing.Size(206, 154); + this.splitContainer4.Size = new System.Drawing.Size(204, 152); this.splitContainer4.SplitterDistance = 25; this.splitContainer4.SplitterWidth = 2; this.splitContainer4.TabIndex = 1; // - // label1 + // chkSpecName // - this.label1.Dock = System.Windows.Forms.DockStyle.Fill; - this.label1.Location = new System.Drawing.Point(0, 2); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(206, 23); - this.label1.TabIndex = 0; - this.label1.Text = "label1"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.chkSpecName.Dock = System.Windows.Forms.DockStyle.Fill; + this.chkSpecName.Location = new System.Drawing.Point(4, 2); + this.chkSpecName.Name = "chkSpecName"; + this.chkSpecName.Size = new System.Drawing.Size(200, 23); + this.chkSpecName.TabIndex = 0; + this.chkSpecName.Text = "ucCheckBox1"; + this.chkSpecName.UseVisualStyleBackColor = true; // // UcSkuImgItem // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.BackColor = System.Drawing.SystemColors.MenuHighlight; + this.BackColor = System.Drawing.Color.LightSteelBlue; this.Controls.Add(this.splitContainer4); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Name = "UcSkuImgItem"; - this.Padding = new System.Windows.Forms.Padding(1); + this.Padding = new System.Windows.Forms.Padding(2); this.Size = new System.Drawing.Size(208, 156); this.SizeChanged += new System.EventHandler(this.UcImgChange_SizeChanged); this.Resize += new System.EventHandler(this.UcImgChange_Resize); @@ -296,11 +297,11 @@ namespace TemuKJD.ToolForms private System.Windows.Forms.SplitContainer splitContainer2; private System.Windows.Forms.SplitContainer splitContainer3; public System.Windows.Forms.PictureBox pbSkuImg; - public DevComponents.DotNetBar.PanelEx panelEx2; - public DevComponents.DotNetBar.PanelEx panelEx1; + public DevComponents.DotNetBar.PanelEx btnUploadImg; + public DevComponents.DotNetBar.PanelEx btnGetOriginalImg; public System.Windows.Forms.PictureBox pbSkuOriginalImg; private System.Windows.Forms.SplitContainer splitContainer4; - public System.Windows.Forms.Label label1; public DevComponents.DotNetBar.PanelEx pnlMore; + public UserComponent.UcCheckBox chkSpecName; } } diff --git a/TEMUKJD/ToolForms/UcSkuImgListItem.Designer.cs b/TEMUKJD/ToolForms/UcSkuImgListItem.Designer.cs index 2a81cf8..d107180 100644 --- a/TEMUKJD/ToolForms/UcSkuImgListItem.Designer.cs +++ b/TEMUKJD/ToolForms/UcSkuImgListItem.Designer.cs @@ -31,6 +31,7 @@ namespace TemuKJD.ToolForms { this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.btnDel = new DevComponents.DotNetBar.PanelEx(); + this.lblUseCount = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -50,14 +51,14 @@ namespace TemuKJD.ToolForms // // btnDel // - this.btnDel.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.btnDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnDel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnDel.Cursor = System.Windows.Forms.Cursors.Hand; this.btnDel.DisabledBackColor = System.Drawing.Color.Empty; this.btnDel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnDel.Location = new System.Drawing.Point(77, 253); + this.btnDel.Location = new System.Drawing.Point(152, 253); this.btnDel.Name = "btnDel"; - this.btnDel.Size = new System.Drawing.Size(100, 23); + this.btnDel.Size = new System.Drawing.Size(98, 23); this.btnDel.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnDel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnDel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -79,10 +80,20 @@ namespace TemuKJD.ToolForms this.btnDel.TabIndex = 525; this.btnDel.Text = "删除图片"; // + // lblUseCount + // + this.lblUseCount.AutoSize = true; + this.lblUseCount.Location = new System.Drawing.Point(0, 257); + this.lblUseCount.Name = "lblUseCount"; + this.lblUseCount.Size = new System.Drawing.Size(78, 17); + this.lblUseCount.TabIndex = 529; + this.lblUseCount.Text = "lblUseCount"; + // // UcSkuImgListItem // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; + this.Controls.Add(this.lblUseCount); this.Controls.Add(this.btnDel); this.Controls.Add(this.pictureBox1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -90,11 +101,13 @@ namespace TemuKJD.ToolForms this.Size = new System.Drawing.Size(250, 280); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion public DevComponents.DotNetBar.PanelEx btnDel; public System.Windows.Forms.PictureBox pictureBox1; + public System.Windows.Forms.Label lblUseCount; } }