微信商品图片无法显示/上传问题优化(30%)
This commit is contained in:
1 parent
b7241236ca
commit
1aa0954e43
7 files changed
+175
-34
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using AllBase;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
@@ -24,7 +25,15 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
if (!string.IsNullOrEmpty(currentImgUrl))
|
||||
{
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
if (currentImgUrl.Contains("wxapp"))
|
||||
{
|
||||
string getImgError = "";
|
||||
this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
}
|
||||
|
||||
//string getImgError = "";
|
||||
//var image = AllBase.GetHtml.GetUrlImg(currentImgUrl, out getImgError);
|
||||
@@ -45,7 +54,17 @@ namespace TemuKJD.ToolForms
|
||||
if (!string.IsNullOrEmpty(currentImgUrl))
|
||||
{
|
||||
if (picDic != null)
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
{
|
||||
if (currentImgUrl.Contains("wxapp"))
|
||||
{
|
||||
string getImgError = "";
|
||||
this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,30 +92,31 @@ namespace TemuKJD.ToolForms
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
//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;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
pictureBox1_Click(null, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -175,7 +195,15 @@ namespace TemuKJD.ToolForms
|
||||
if (index == imgDic.Keys.Count)
|
||||
index = 0;
|
||||
currentImgUrl = imgDic.Keys.ToList()[index];
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
if (currentImgUrl.Contains("wxapp"))
|
||||
{
|
||||
string getImgError = "";
|
||||
this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (imgDic[imgDic.Keys.ToList()[i]] == currentImgUrl)
|
||||
@@ -184,7 +212,15 @@ namespace TemuKJD.ToolForms
|
||||
if (index == imgDic.Keys.Count)
|
||||
index = 0;
|
||||
currentImgUrl = imgDic[imgDic.Keys.ToList()[index]];
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
if (currentImgUrl.Contains("wxapp"))
|
||||
{
|
||||
string getImgError = "";
|
||||
this.pictureBox1.Image = ImageBuild.LoadBitmapLoadBitmipImageFromUrl(currentImgUrl, out getImgError);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pictureBox1.ImageLocation = currentImgUrl.Replace("https", "http");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user