修改程序逻辑,准备批量打包
This commit is contained in:
1 parent
aab73b978f
commit
55528e5109
30 files changed
+297
-150
No files matched your search
@@ -9,3 +9,4 @@ packages
|
||||
bin
|
||||
*.rar
|
||||
*.zip
|
||||
/Update/Update/*.user
|
||||
+11
-7
@@ -27,7 +27,9 @@ namespace AllBase
|
||||
/// <summary>
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
public static int VersionCount = 1113;
|
||||
public static int VersionCount = 1115;
|
||||
public static string MainPath = "29wx";
|
||||
//public static string MainPath = "kuajingda";
|
||||
//public static int VersionCount = 613;
|
||||
|
||||
/// <summary>
|
||||
@@ -41,7 +43,6 @@ namespace AllBase
|
||||
public static Image LoginImage = null;
|
||||
public static Image LogoImage = null;
|
||||
public static Icon Ico = null;
|
||||
public static string MainPath = "kuajingda";
|
||||
public static bool UsePddWorkbanch = true;
|
||||
public static bool NoRegedit = false;
|
||||
public static bool IsPinduoduo = false;
|
||||
@@ -721,6 +722,11 @@ namespace AllBase
|
||||
string c = ((int)y).ToString();
|
||||
return GetMd5(c); //返回签名的MD5结果
|
||||
}
|
||||
|
||||
public static string BuildDefaultObjString(string file, bool IsLoginDef = false)
|
||||
{
|
||||
return LoginApiUrl + "/" + file + "?obj=" + "/" + file;
|
||||
}
|
||||
/// <summary>
|
||||
/// 生成OBJ路径
|
||||
/// </summary>
|
||||
@@ -735,23 +741,21 @@ namespace AllBase
|
||||
//return LoginApiUrl + "index.php?obj=" + BaseClass.MainPath + "/" + file;
|
||||
//http://localhost:8000/user/user_login
|
||||
|
||||
//pdd相关操作
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
return LoginApiUrl + "/bxx_" + file + "?obj=" + BaseClass.MainPath + "/bxx_" + file;
|
||||
}
|
||||
if (BaseClass.MainPath == "douyin")
|
||||
if (BaseClass.MainPath == "29dy")
|
||||
{
|
||||
return LoginApiUrl + "/dyxd_" + file + "?obj=" + BaseClass.MainPath + "/dyxd_" + file;
|
||||
}
|
||||
if (BaseClass.MainPath == "weixin")
|
||||
if (BaseClass.MainPath == "29wx")
|
||||
{
|
||||
return LoginApiUrl + "/wxxd_" + file + "?obj=" + BaseClass.MainPath + "/wxxd_" + file;
|
||||
}
|
||||
|
||||
return LoginApiUrl + "/" + file+ "?obj=" + BaseClass.MainPath + "/" + file;
|
||||
}
|
||||
|
||||
public static string BuildPDDObjString(string file, bool IsLoginDef = false)
|
||||
{
|
||||
return LoginApiUrl + "/bxx_" + file + "?obj=" + BaseClass.MainPath + "/bxx_" + file;
|
||||
|
||||
@@ -29,6 +29,9 @@ namespace KJD_Web.BLL
|
||||
var UpdateExeChk = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExeChk"].ConnectionString;
|
||||
var LowVersion = System.Configuration.ConfigurationManager.ConnectionStrings["LowVersion"].ConnectionString;
|
||||
|
||||
serverVersion = "1115";
|
||||
UpdateFiles = "http://weidian.e57.cn/kjd_update/Update1115.zip";
|
||||
|
||||
if (version > LowVersion.ParseToInt())
|
||||
{
|
||||
return "{\"code\":200,\"msg\":\"success\",\"next_version\":" + serverVersion + ",\"exe_check\":\"" + UpdateExeChk +
|
||||
@@ -45,5 +48,42 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"未知错误\"}";
|
||||
}
|
||||
|
||||
public string GetUpdateNew(string inputData)
|
||||
{
|
||||
//string time1 = Encryption(time);
|
||||
//return "time=" + time + "&code=" + time1 + "&NbCodeVersion=1" + "&version=" + BaseClass.VersionCount
|
||||
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time);
|
||||
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
|
||||
if (time1 != EncrypUtil.Encryption(time))
|
||||
return "{\"code\":50000,\"msg\":\"校验失败\"}";
|
||||
|
||||
var version = RegexUtils.GetStringQuery(ref inputData, "version").ParseToInt();
|
||||
var serverVersion = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateVersion"].ConnectionString;
|
||||
var UpdateNewUrl = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateNewUrl"].ConnectionString;
|
||||
var UpdateExe = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExe"].ConnectionString;
|
||||
var UpdateExeChk = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExeChk"].ConnectionString;
|
||||
var LowVersion = System.Configuration.ConfigurationManager.ConnectionStrings["LowVersion"].ConnectionString;
|
||||
|
||||
if (version > LowVersion.ParseToInt())
|
||||
{
|
||||
return "{\"code\":200,\"msg\":\"success\",\"next_version\":" + serverVersion + ",\"exe_check\":\"" + UpdateExeChk +
|
||||
"\",\"exe_address\":\"" + UpdateExe + "\",\"file_address\":\"" + UpdateNewUrl + "\"}";
|
||||
}
|
||||
else if (version > 0)
|
||||
{
|
||||
return "{\"code\":501,\"msg\":\"版本过低已无法直接升级,请联系管理员获取最新安装包\"}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "{\"code\":502,\"msg\":\"get update version failed\"}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"未知错误\"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ namespace KJD_Web
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public void get_update()
|
||||
{
|
||||
@@ -66,5 +66,17 @@ namespace KJD_Web
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void get_update_new()
|
||||
{
|
||||
var jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new UpadteManage().GetUpdateNew(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,8 @@
|
||||
<add name="LowVersion" connectionString="523"/>
|
||||
<add name="LimitVersion" connectionString="823"/>
|
||||
<add name="UpdateExe" connectionString="http://1.13.195.131:9000/Download/Update.exe"/>
|
||||
<add name="UpdateFiles" connectionString="http://1.13.195.131:9000/Download/Update525.zip"/>
|
||||
<add name="UpdateExeChk" connectionString="324527ACE5020DCA77D65A5037718B65"/>
|
||||
<add name="UpdateNewUrl" connectionString="http://weidian.e57.cn/kjd_update/"/>
|
||||
<add name="UpdateExeChk" connectionString="CE4A009B7AA330314F03EEA0C3AB23F9"/>
|
||||
<add name="GetReturnPackage" connectionString="true"/>
|
||||
<add name="GetWXRecommendHotProd" connectionString="true"/>
|
||||
<add name="GetWXRecommendHotProdOncePerDay" connectionString="false"/>
|
||||
|
||||
@@ -23,10 +23,16 @@ namespace Publish
|
||||
{
|
||||
try
|
||||
{
|
||||
int fileId = 0;
|
||||
var dir = "..\\AllBase\\BaseClass.cs";
|
||||
string baseClassStr = File.ReadAllText(dir);
|
||||
var mainPath = baseClassStr.Substring(baseClassStr.IndexOf("MainPath = \"") + "MainPath = \"".Length);
|
||||
mainPath = mainPath.Split('\"')[0];
|
||||
var versionCount = baseClassStr.Substring(baseClassStr.IndexOf("VersionCount = ") + "VersionCount = ".Length);
|
||||
versionCount = versionCount.Split(';')[0];
|
||||
int version = Convert.ToInt32(versionCount);
|
||||
|
||||
List<string> filePathLst = new List<string>();
|
||||
string destinationZip = AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "Update" + fileId + ".zip";
|
||||
string destinationZip = AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "Update" + mainPath + version + ".zip";
|
||||
foreach (var item in this.lstFile.Items)
|
||||
{
|
||||
filePathLst.Add(AppDomain.CurrentDomain.SetupInformation.ApplicationBase + item.ToString());
|
||||
|
||||
@@ -866,7 +866,12 @@ namespace TemuKJD.BLL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 微信店铺采集转拼多多
|
||||
/// </summary>
|
||||
/// <param name="convertRst"></param>
|
||||
/// <param name="dbProd"></param>
|
||||
/// <returns></returns>
|
||||
public PDDProductInfo WXProdToPddConvert(out string convertRst, KJDDBProduct dbProd)
|
||||
{
|
||||
convertRst = "";
|
||||
@@ -1220,7 +1225,12 @@ namespace TemuKJD.BLL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 1688网页端采集转拼多多
|
||||
/// </summary>
|
||||
/// <param name="convertRst"></param>
|
||||
/// <param name="dbProd"></param>
|
||||
/// <returns></returns>
|
||||
public PDDProductInfo _1688ClientToPddConvert(out string convertRst, KJDDBProduct dbProd)
|
||||
{
|
||||
convertRst = "";
|
||||
@@ -1565,7 +1575,7 @@ namespace TemuKJD.BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 1688外部数据转拼多多
|
||||
/// 1688外部数据转拼多多(万象工具)
|
||||
/// </summary>
|
||||
/// <param name="convertRst"></param>
|
||||
/// <param name="dbProd"></param>
|
||||
@@ -1770,6 +1780,17 @@ namespace TemuKJD.BLL
|
||||
prodInfo.detail.size_spec_id = null;
|
||||
|
||||
prodInfo.detail.sku = new List<sku_item>();
|
||||
if (_1688OutProdInfo.skus == null)
|
||||
_1688OutProdInfo.skus = new List<_1688Sku>();
|
||||
if (_1688OutProdInfo.skus.Count == 0)
|
||||
{
|
||||
_1688OutProdInfo.skus.Add(new _1688Sku()
|
||||
{
|
||||
skuId = -1,
|
||||
quantity = 999,
|
||||
price = (_1688OutProdInfo.priceHigh.ParseToDecimal() * 100).ParseToInt(),
|
||||
});
|
||||
}
|
||||
foreach (var sku in _1688OutProdInfo.skus)
|
||||
{
|
||||
var postFeeValue = (_1688OutProdInfo.deliveryInfo?.carriageList?.Max(c => c.price)).ParseToDecimal();
|
||||
@@ -1849,6 +1870,18 @@ namespace TemuKJD.BLL
|
||||
}
|
||||
}
|
||||
}
|
||||
if (skuInfo.spec.Count == 0)
|
||||
skuInfo.spec.Add(new spec_item()
|
||||
{
|
||||
parent_id = 0,
|
||||
parent_name = "款式",
|
||||
spec_id = 0,
|
||||
spec_name = "默认",
|
||||
});
|
||||
if(string.IsNullOrEmpty(skuInfo.thumb_url))
|
||||
{
|
||||
skuInfo.thumb_url = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1)?.url;
|
||||
}
|
||||
prodInfo.detail.sku.Add(skuInfo);
|
||||
}
|
||||
prodInfo.detail.sku_type = null;
|
||||
@@ -1920,6 +1953,12 @@ namespace TemuKJD.BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 微信商城手机版转拼多多
|
||||
/// </summary>
|
||||
/// <param name="convertRst"></param>
|
||||
/// <param name="dbProd"></param>
|
||||
/// <returns></returns>
|
||||
public PDDProductInfo WXClientToPddConvert(out string convertRst, KJDDBProduct dbProd)
|
||||
{
|
||||
convertRst = "";
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace TemuKJD.BLL.PddApi
|
||||
|
||||
public static void GetShopClientInfo(List<ShopLoginInfo> shops = null)
|
||||
{
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
ConcurrentList<ShopLoginInfo> shopList = new ConcurrentList<ShopLoginInfo>();
|
||||
if (shops == null)
|
||||
@@ -169,7 +169,7 @@ namespace TemuKJD.BLL.PddApi
|
||||
|
||||
public static void GetPddClientInfo()
|
||||
{
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
var url = BaseClass.BuildPDDObjString("shop/get_pdd_client_info");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
|
||||
@@ -297,7 +297,7 @@ namespace TemuKJD.BLL
|
||||
shop.is_point_shop_expire = BaseRegex.GetBoolJson(ref shopStr, "is_point_shop_expire");
|
||||
shop.expire_time = BaseRegex.GetIntJson(ref shopStr, "expire_time");
|
||||
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
shop.AntiContents.Clear();
|
||||
//shop.AntiContents.AddRange(JsonHelper.DeserializeJsonToList<string>(jObj["anti_contents"].IsNullOrEmpty() ? "[]" : jObj["anti_contents"].ToString()));
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace TemuKJD.BaseForms
|
||||
setSkinColor(c);
|
||||
|
||||
// pdd皮肤颜色
|
||||
if (BaseClass.MainPath == "binxixi" || BaseClass.MainPath == "weixin")
|
||||
if (BaseClass.MainPath == "29pdd" || BaseClass.MainPath == "29wx")
|
||||
{
|
||||
if (c is Panel && c.BackColor == GlobalConfig.DefaultMainColor)
|
||||
{
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace TemuKJD.BaseForms
|
||||
|
||||
private void LcBaseForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (BaseClass.MainPath == "binxixi" || BaseClass.MainPath == "weixin")
|
||||
if (BaseClass.MainPath == "29pdd" || BaseClass.MainPath == "29wx")
|
||||
{
|
||||
this.pnlTitle.BackColor = GlobalConfig.MainColor;
|
||||
this.BackColor = GlobalConfig.BorderColor;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace TemuKJD
|
||||
pnlExtend.Visible = BaseClass.DarenYaoyue;
|
||||
|
||||
//直接登录上货工具
|
||||
if (BaseClass.MainPath != "weixin") // 在此处切换是否显示登录客服选项功能
|
||||
if (BaseClass.MainPath != "29wx") // 在此处切换是否显示登录客服选项功能
|
||||
{
|
||||
label1.Visible = true;
|
||||
pnlChat.Visible = pnlUploadGoods.Visible = false;
|
||||
|
||||
+80
-66
@@ -13,6 +13,7 @@ using System.Windows.Forms;
|
||||
using AllBase.Helper;
|
||||
using NaiBa.Util.Helper;
|
||||
using System.IO;
|
||||
using AllBase;
|
||||
|
||||
namespace TemuKJD
|
||||
{
|
||||
@@ -28,74 +29,87 @@ namespace TemuKJD
|
||||
|
||||
private void InitForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists(System.Environment.CurrentDirectory + "\\YkdChoice.dll"))
|
||||
{
|
||||
this.panel3.Location = new Point(4, 4);
|
||||
this.panel4.Visible = true;
|
||||
this.rbPdd.Visible = true;
|
||||
}
|
||||
if (File.Exists(System.Environment.CurrentDirectory + "\\WxChoice.dll"))
|
||||
{
|
||||
this.panel3.Location = new Point(4, 4);
|
||||
this.panel4.Visible = true;
|
||||
this.rbWX.Visible = true;
|
||||
}
|
||||
#if DEBUG
|
||||
this.panel3.Location = new Point(4, 4);
|
||||
this.panel4.Visible = true;
|
||||
this.rbPdd.Visible = true;
|
||||
this.rbWX.Visible = true;
|
||||
#endif
|
||||
initFormSettings = ConfigHelper.LoadConfig<InitFormSettings>("initFormSettings");
|
||||
if (initFormSettings == null)
|
||||
initFormSettings = new InitFormSettings();
|
||||
this.chkRemember.Checked = initFormSettings.Remember;
|
||||
this.rbTemu.Checked = initFormSettings.LoginType.ToLower() == "temu";
|
||||
this.rbPdd.Checked = initFormSettings.LoginType.ToLower() == "pdd";
|
||||
this.rbWX.Checked = initFormSettings.LoginType.ToLower() == "wx";
|
||||
this.rbTemu.CheckedChanged += rbTemu_CheckedChanged;
|
||||
this.rbPdd.CheckedChanged += rbTemu_CheckedChanged;
|
||||
this.rbWX.CheckedChanged += rbTemu_CheckedChanged;
|
||||
if (rbWX.Visible == false || rbPdd.Visible == false)
|
||||
flowLayoutPanel1.Location = new Point(38, flowLayoutPanel1.Location.Y);
|
||||
OpenNewMainForm();
|
||||
return;
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
while (!Work.Initialization.IsCheckFilesFinish || !Program.IsInit || this.progressBarX1.Value < 50)
|
||||
{
|
||||
Thread.Sleep(new Random().Next(10, 50));
|
||||
// if (File.Exists(System.Environment.CurrentDirectory + "\\YkdChoice.dll"))
|
||||
// {
|
||||
// this.panel3.Location = new Point(4, 4);
|
||||
// this.panel4.Visible = true;
|
||||
// this.rbPdd.Visible = true;
|
||||
// }
|
||||
// if (File.Exists(System.Environment.CurrentDirectory + "\\WxChoice.dll"))
|
||||
// {
|
||||
// this.panel3.Location = new Point(4, 4);
|
||||
// this.panel4.Visible = true;
|
||||
// this.rbWX.Visible = true;
|
||||
// }
|
||||
//#if DEBUG
|
||||
// this.panel3.Location = new Point(4, 4);
|
||||
// this.panel4.Visible = true;
|
||||
// this.rbPdd.Visible = true;
|
||||
// this.rbWX.Visible = true;
|
||||
//#endif
|
||||
// initFormSettings = ConfigHelper.LoadConfig<InitFormSettings>("initFormSettings");
|
||||
// if (initFormSettings == null)
|
||||
// initFormSettings = new InitFormSettings();
|
||||
// this.chkRemember.Checked = initFormSettings.Remember;
|
||||
// this.rbTemu.Checked = initFormSettings.LoginType.ToLower() == "temu";
|
||||
// this.rbPdd.Checked = initFormSettings.LoginType.ToLower() == "pdd";
|
||||
// this.rbWX.Checked = initFormSettings.LoginType.ToLower() == "wx";
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.progressBarX1.Value = Work.Initialization.InitPercent++;
|
||||
this.progressBarX1.Maximum = 50;
|
||||
}));
|
||||
if (this.progressBarX1.Value >= 50)
|
||||
Thread.Sleep(300);
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
btnOK.Visible = true;
|
||||
}));
|
||||
// if (initFormSettings.LoginType.ToLower() == "temu")
|
||||
// BaseClass.MainPath = "kuajingda";
|
||||
// else if (initFormSettings.LoginType.ToLower() == "pdd")
|
||||
// BaseClass.MainPath = "29pdd";
|
||||
// else if (initFormSettings.LoginType.ToLower() == "wx")
|
||||
// BaseClass.MainPath = "29wx";
|
||||
// else if (initFormSettings.LoginType.ToLower() == "dy")
|
||||
// BaseClass.MainPath = "29dy";
|
||||
|
||||
#if DEBUG
|
||||
Thread.Sleep(2500);
|
||||
#else
|
||||
if (File.Exists(System.Environment.CurrentDirectory + "\\YkdChoice.dll"))
|
||||
{
|
||||
Thread.Sleep(2500);
|
||||
}
|
||||
#endif
|
||||
if (initFormSettings.Remember)
|
||||
Thread.Sleep(500);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if(initFormSettings.Remember && isChangeType == false)
|
||||
{
|
||||
OpenNewMainForm();
|
||||
}
|
||||
}));
|
||||
});
|
||||
// this.rbTemu.CheckedChanged += rbTemu_CheckedChanged;
|
||||
// this.rbPdd.CheckedChanged += rbTemu_CheckedChanged;
|
||||
// this.rbWX.CheckedChanged += rbTemu_CheckedChanged;
|
||||
// if (rbWX.Visible == false || rbPdd.Visible == false)
|
||||
// flowLayoutPanel1.Location = new Point(38, flowLayoutPanel1.Location.Y);
|
||||
|
||||
// Task.Run(() =>
|
||||
// {
|
||||
// while (!Work.Initialization.IsCheckFilesFinish || !Program.IsInit || this.progressBarX1.Value < 50)
|
||||
// {
|
||||
// Thread.Sleep(new Random().Next(10, 50));
|
||||
|
||||
// Invoke(new Action(() =>
|
||||
// {
|
||||
// this.progressBarX1.Value = Work.Initialization.InitPercent++;
|
||||
// this.progressBarX1.Maximum = 50;
|
||||
// }));
|
||||
// if (this.progressBarX1.Value >= 50)
|
||||
// Thread.Sleep(300);
|
||||
// }
|
||||
// Invoke(new Action(() =>
|
||||
// {
|
||||
// btnOK.Visible = true;
|
||||
// }));
|
||||
|
||||
//#if DEBUG
|
||||
// Thread.Sleep(2500);
|
||||
//#else
|
||||
// if (File.Exists(System.Environment.CurrentDirectory + "\\YkdChoice.dll"))
|
||||
// {
|
||||
// Thread.Sleep(2500);
|
||||
// }
|
||||
//#endif
|
||||
// if (initFormSettings.Remember)
|
||||
// Thread.Sleep(500);
|
||||
// Invoke(new Action(() =>
|
||||
// {
|
||||
// if(initFormSettings.Remember && isChangeType == false)
|
||||
// {
|
||||
// OpenNewMainForm();
|
||||
// }
|
||||
// }));
|
||||
// });
|
||||
}
|
||||
|
||||
bool isOpen = false;
|
||||
@@ -112,7 +126,7 @@ namespace TemuKJD
|
||||
}
|
||||
this.Hide();
|
||||
isOpen = true;
|
||||
new MainForm(initFormSettings.LoginType).ShowDialog();
|
||||
new MainForm().ShowDialog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace TemuKJD.KJDForms.SystemForms
|
||||
|
||||
private void SystemRemoveRestrictionsForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (AllBase.BaseClass.MainPath == "weixin")
|
||||
if (AllBase.BaseClass.MainPath == "29wx")
|
||||
{
|
||||
this.ucCheckBox1.Visible = true;
|
||||
}
|
||||
|
||||
+22
-26
@@ -57,7 +57,7 @@ namespace TemuKJD
|
||||
public static int ProcessCount = 0;
|
||||
public static MainForm instance;
|
||||
|
||||
public string LoginType;
|
||||
//public string LoginType;
|
||||
private Point mouseOffset;//记录鼠标指针的坐标
|
||||
private bool isMouseDown;//记录鼠标左键是否按下
|
||||
public delegate void delegateShow(Form nf);
|
||||
@@ -146,30 +146,26 @@ namespace TemuKJD
|
||||
//SetFormRoundRectRgn(this, 7);
|
||||
}
|
||||
|
||||
public MainForm(string loginType = "Temu")
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
LoginType = loginType;
|
||||
if (loginType == "Pdd")
|
||||
{
|
||||
BaseClass.MainPath = "binxixi";
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
GlobalConfig.MainColor = GlobalConfig.PddMainColor;
|
||||
GlobalConfig.MainColorLight = GlobalConfig.PddMainColorLight;
|
||||
GlobalConfig.BorderColor = GlobalConfig.PddBorderColor;
|
||||
this.pnlJit.Visible = false;
|
||||
}
|
||||
else if (loginType == "Wx")
|
||||
else if (BaseClass.MainPath == "29wx")
|
||||
{
|
||||
BaseClass.MainPath = "weixin";
|
||||
GlobalConfig.MainColor = GlobalConfig.WeiXinMainColor;
|
||||
GlobalConfig.MainColorLight = GlobalConfig.WeiXinMainColorLight;
|
||||
GlobalConfig.BorderColor = GlobalConfig.WeiXinBorderColor;
|
||||
this.pnlJit.Visible = false;
|
||||
}
|
||||
else if (loginType == "Dy")
|
||||
else if (BaseClass.MainPath == "29dy")
|
||||
{
|
||||
BaseClass.MainPath = "douyin";
|
||||
this.pnlJit.Visible = false;
|
||||
}
|
||||
|
||||
@@ -230,7 +226,7 @@ namespace TemuKJD
|
||||
|
||||
private void MainForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
BaseClass.Ico = Icon.FromHandle(Properties.Resources.pdd_icon.GetHicon());
|
||||
BaseClass.LogoImage = Properties.Resources.pdd_logo;
|
||||
@@ -240,7 +236,7 @@ namespace TemuKJD
|
||||
|
||||
BaseClass.ToolName = "29供应链 - 多多管理工具";
|
||||
}
|
||||
if (BaseClass.MainPath == "weixin")
|
||||
if (BaseClass.MainPath == "29wx")
|
||||
{
|
||||
BaseClass.Ico = Icon.FromHandle(Properties.Resources.weixin_icon.GetHicon());
|
||||
BaseClass.LogoImage = Properties.Resources.weixin_logo;
|
||||
@@ -862,7 +858,7 @@ namespace TemuKJD
|
||||
}
|
||||
ShowMainPanel(shopForm as ShopForm, sender as Panel);
|
||||
}
|
||||
else if (BaseClass.MainPath == "binxixi")
|
||||
else if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
if (shopForm == null)
|
||||
{
|
||||
@@ -870,7 +866,7 @@ namespace TemuKJD
|
||||
}
|
||||
ShowMainPanel(shopForm as A_PddShopForm, sender as Panel);
|
||||
}
|
||||
else if (BaseClass.MainPath == "weixin")
|
||||
else if (BaseClass.MainPath == "29wx")
|
||||
{
|
||||
if (shopForm == null)
|
||||
{
|
||||
@@ -891,15 +887,7 @@ namespace TemuKJD
|
||||
}
|
||||
ShowMainPanel(adminForm as AdminForm, sender as Panel);
|
||||
}
|
||||
else if (BaseClass.MainPath == "binxixi")
|
||||
{
|
||||
if (adminForm == null)
|
||||
{
|
||||
adminForm = new PDDAdminForm();
|
||||
}
|
||||
ShowMainPanel(adminForm as PDDAdminForm, sender as Panel);
|
||||
}
|
||||
else if (BaseClass.MainPath == "douyin")
|
||||
else if (BaseClass.MainPath == "29dy")
|
||||
{
|
||||
//if (adminForm == null)
|
||||
//{
|
||||
@@ -907,7 +895,15 @@ namespace TemuKJD
|
||||
//}
|
||||
//ShowMainPanel(adminForm as PDDAdminForm, sender as Panel);
|
||||
}
|
||||
else if (BaseClass.MainPath == "weixin")
|
||||
else if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
if (adminForm == null)
|
||||
{
|
||||
adminForm = new PDDAdminForm();
|
||||
}
|
||||
ShowMainPanel(adminForm as PDDAdminForm, sender as Panel);
|
||||
}
|
||||
else if (BaseClass.MainPath == "29wx")
|
||||
{
|
||||
if (adminForm == null)
|
||||
{
|
||||
@@ -928,7 +924,7 @@ namespace TemuKJD
|
||||
}
|
||||
ShowMainPanel(uploadForm as ProductForm, sender as Panel);
|
||||
}
|
||||
else if (BaseClass.MainPath == "binxixi")
|
||||
else if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
if (uploadForm == null)
|
||||
{
|
||||
@@ -936,7 +932,7 @@ namespace TemuKJD
|
||||
}
|
||||
ShowMainPanel(uploadForm as PDDProductForm, sender as Panel);
|
||||
}
|
||||
else if (BaseClass.MainPath == "weixin")
|
||||
else if (BaseClass.MainPath == "29wx")
|
||||
{
|
||||
if (uploadForm == null)
|
||||
{
|
||||
|
||||
@@ -501,7 +501,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
//public Func<object, string, string, request, bool> BeforeResourceLoadEvent; // sender, requestUrl, postData, request, true(表示取消执行)
|
||||
private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request)
|
||||
{
|
||||
if (BaseClass.MainPath == "binxixi" && BaseClass.UsePddWorkbanch && !shop.Cookies.Contains("windows_1"))
|
||||
if (BaseClass.MainPath == "29pdd" && BaseClass.UsePddWorkbanch && !shop.Cookies.Contains("windows_1"))
|
||||
{
|
||||
var ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
|
||||
//ua = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36";
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
|
||||
lblGroup.Visible = cmbGroup.Visible = btnSetGroup.Visible = false;
|
||||
}
|
||||
if (BaseClass.MainPath != "binxixi")
|
||||
if (BaseClass.MainPath != "29pdd")
|
||||
{
|
||||
//this.dgvDbProduct.Columns["col_edit"].Visible = false;
|
||||
this.dgvDbProduct.Columns["colExtCodePrice"].Visible = false;
|
||||
@@ -593,7 +593,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
case "详情":
|
||||
case "编辑/详情":
|
||||
PDDDBProdEditForm editForm = new PDDDBProdEditForm(dbProduct);
|
||||
if (BaseClass.MainPath != "binxixi")
|
||||
if (BaseClass.MainPath != "29pdd")
|
||||
{
|
||||
editForm.pnlSkuOption.Visible = false;
|
||||
editForm.txtProductName.ReadOnly = true;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
|
||||
private void PDDDBProdUserSelectCacheForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
dgvSelectProduct.Columns["colBound"].Visible = false;
|
||||
}
|
||||
|
||||
@@ -9780,7 +9780,7 @@ Content-Type: image/jpeg
|
||||
private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request)
|
||||
{
|
||||
var shop = (sender as ChromiumWebBrowser).Tag as ShopLoginInfo;
|
||||
if (BaseClass.MainPath == "binxixi" && BaseClass.UsePddWorkbanch && !(shop?.Cookies).ParseToString().Contains("windows_1"))
|
||||
if (BaseClass.MainPath == "29pdd" && BaseClass.UsePddWorkbanch && !(shop?.Cookies).ParseToString().Contains("windows_1"))
|
||||
{
|
||||
var ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
|
||||
//ua = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36";
|
||||
|
||||
@@ -610,7 +610,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
//public Func<object, string, string, request, bool> BeforeResourceLoadEvent; // sender, requestUrl, postData, request, true(表示取消执行)
|
||||
private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request)
|
||||
{
|
||||
if (BaseClass.MainPath == "binxixi" && BaseClass.UsePddWorkbanch && !shop.Cookies.Contains("windows_1"))
|
||||
if (BaseClass.MainPath == "29pdd" && BaseClass.UsePddWorkbanch && !shop.Cookies.Contains("windows_1"))
|
||||
{
|
||||
var ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
|
||||
//ua = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36";
|
||||
|
||||
+2
-2
@@ -204,7 +204,7 @@ namespace TemuKJD
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
if (BaseClass.MainPath != "weixin") // 微信才读取违规商品信息
|
||||
if (BaseClass.MainPath != "29wx") // 微信才读取违规商品信息
|
||||
return;
|
||||
|
||||
new WXProdViolationManage().GetShopProdViolation();
|
||||
@@ -228,7 +228,7 @@ namespace TemuKJD
|
||||
return;
|
||||
}
|
||||
|
||||
if (BaseClass.MainPath != "weixin") // 微信读取
|
||||
if (BaseClass.MainPath != "29wx") // 微信读取
|
||||
return;
|
||||
|
||||
var url = BaseClass.BuildObjString("product/is_get_wx_recommend_hot_prod");
|
||||
|
||||
@@ -786,7 +786,7 @@ namespace TemuKJD.ToolForms
|
||||
{
|
||||
if (platformType == "Pinduoduo" || string.IsNullOrEmpty(platformType))
|
||||
GetPinDuoduoProd();
|
||||
else if (platformType == "douyin")
|
||||
else if (platformType == "Douyin")
|
||||
GetDyProd();
|
||||
}
|
||||
|
||||
@@ -986,7 +986,7 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
else if (cmbPlatformType.Text == "抖音")
|
||||
{
|
||||
platformType = "douyin";
|
||||
platformType = "Douyin";
|
||||
}
|
||||
else if (cmbPlatformType.Text == "淘宝")
|
||||
{
|
||||
|
||||
@@ -38,13 +38,13 @@ namespace TemuKJD.UserForm
|
||||
|
||||
private void LoginForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
this.pnlLoginBg.Style.BackgroundImage = Properties.Resources.pdd_bg;
|
||||
this.pnlLoginBg.Style.BackgroundImagePosition = DevComponents.DotNetBar.eBackgroundImagePosition.Stretch;
|
||||
this.pbLogo.Image = Properties.Resources.pdd_logo;
|
||||
}
|
||||
if (BaseClass.MainPath == "weixin")
|
||||
if (BaseClass.MainPath == "29wx")
|
||||
{
|
||||
this.pnlLoginBg.Style.BackgroundImage = Properties.Resources.weixin_bg;
|
||||
this.pnlLoginBg.Style.BackgroundImagePosition = DevComponents.DotNetBar.eBackgroundImagePosition.Stretch;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
tableLayoutPanel1.SetColumn(lblSourceType, 2);
|
||||
tableLayoutPanel1.SetColumn(cmbSourceType, 3);
|
||||
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
chkCatBoundLessThan.Visible = false;
|
||||
chkCatBoundMoreThan.Visible = false;
|
||||
@@ -83,7 +83,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.dgvDbProduct.Columns["colPriceText"].Visible = true;
|
||||
lblGroup.Visible = false;
|
||||
}
|
||||
if (BaseClass.MainPath != "binxixi")
|
||||
if (BaseClass.MainPath != "29pdd")
|
||||
{
|
||||
this.dgvDbProduct.Columns["colExtCodePrice"].Visible = false;
|
||||
this.dgvDbProduct.Columns["colEdit"].Visible = false;
|
||||
@@ -342,9 +342,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
"&search_prod_name=" + txtProdName.Text.Trim() +
|
||||
"&wx_safe_status=" + cmbWxSafe.Text.Trim().Replace("安全+未校验", "安全商品,未校验").Replace("违规商品", "");
|
||||
data += "&add_user_name=" + BaseClass.UserName;
|
||||
if (BaseClass.MainPath == "weixin")
|
||||
if (BaseClass.MainPath == "29wx")
|
||||
data += "&ban_wx=0";
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
data += "&ban_pdd=0";
|
||||
if (cmbRelation.Text == "否")
|
||||
data += "&is_relation=0";
|
||||
@@ -587,7 +587,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
case "详情":
|
||||
case "编辑/详情":
|
||||
//PDDDBProdEditForm editForm = new PDDDBProdEditForm(dbProduct);
|
||||
//if (BaseClass.MainPath != "binxixi")
|
||||
//if (BaseClass.MainPath != "29pdd")
|
||||
//{
|
||||
// editForm.pnlSkuOption.Visible = false;
|
||||
// editForm.txtProductName.ReadOnly = true;
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
private void ProductListForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
{
|
||||
chkCatBoundLessThan.Visible = false;
|
||||
chkCatBoundMoreThan.Visible = false;
|
||||
@@ -83,7 +83,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
this.dgvDbProduct.Columns["colPriceText"].Visible = true;
|
||||
lblGroup.Visible = false;
|
||||
}
|
||||
if (BaseClass.MainPath != "binxixi")
|
||||
if (BaseClass.MainPath != "29pdd")
|
||||
{
|
||||
this.dgvDbProduct.Columns["colExtCodePrice"].Visible = false;
|
||||
this.dgvDbProduct.Columns["colEdit"].Visible = false;
|
||||
@@ -415,9 +415,9 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
addUserName = BaseClass.ParentAuthority.Contains("机会商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin";
|
||||
data += "&add_user_name=" + addUserName;
|
||||
|
||||
if (BaseClass.MainPath == "weixin")
|
||||
if (BaseClass.MainPath == "29wx")
|
||||
data += "&ban_wx=0";
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
if (BaseClass.MainPath == "29pdd")
|
||||
data += "&ban_pdd=0";
|
||||
if (cmbRelation.Text == "否")
|
||||
data += "&is_relation=0";
|
||||
@@ -664,7 +664,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
case "详情":
|
||||
case "编辑/详情":
|
||||
//PDDDBProdEditForm editForm = new PDDDBProdEditForm(dbProduct);
|
||||
//if (BaseClass.MainPath != "binxixi")
|
||||
//if (BaseClass.MainPath != "29pdd")
|
||||
//{
|
||||
// editForm.pnlSkuOption.Visible = false;
|
||||
// editForm.txtProductName.ReadOnly = true;
|
||||
|
||||
@@ -345,7 +345,7 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
|
||||
public static void GetShopDefaultAddress(List<ShopLoginInfo> shopGetAddressList = null)
|
||||
{
|
||||
if (BaseClass.MainPath == "weixin")
|
||||
if (BaseClass.MainPath == "29wx")
|
||||
{
|
||||
if (shopGetAddressList == null)
|
||||
{
|
||||
|
||||
+3
-3
@@ -358,7 +358,7 @@
|
||||
this.cmbGroup.DropDownWidth = 1;
|
||||
this.cmbGroup.FormattingEnabled = true;
|
||||
this.cmbGroup.IntegralHeight = false;
|
||||
this.cmbGroup.Location = new System.Drawing.Point(385, 5);
|
||||
this.cmbGroup.Location = new System.Drawing.Point(385, 8);
|
||||
this.cmbGroup.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
|
||||
this.cmbGroup.Name = "cmbGroup";
|
||||
this.cmbGroup.Size = new System.Drawing.Size(74, 25);
|
||||
@@ -384,7 +384,7 @@
|
||||
this.cmbNotes.DropDownWidth = 1;
|
||||
this.cmbNotes.FormattingEnabled = true;
|
||||
this.cmbNotes.IntegralHeight = false;
|
||||
this.cmbNotes.Location = new System.Drawing.Point(276, 5);
|
||||
this.cmbNotes.Location = new System.Drawing.Point(276, 8);
|
||||
this.cmbNotes.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
|
||||
this.cmbNotes.Name = "cmbNotes";
|
||||
this.cmbNotes.Size = new System.Drawing.Size(74, 25);
|
||||
@@ -517,7 +517,7 @@
|
||||
this.cmbSubAccount.DropDownWidth = 1;
|
||||
this.cmbSubAccount.FormattingEnabled = true;
|
||||
this.cmbSubAccount.IntegralHeight = false;
|
||||
this.cmbSubAccount.Location = new System.Drawing.Point(506, 5);
|
||||
this.cmbSubAccount.Location = new System.Drawing.Point(506, 8);
|
||||
this.cmbSubAccount.Margin = new System.Windows.Forms.Padding(0, 0, 0, 4);
|
||||
this.cmbSubAccount.Name = "cmbSubAccount";
|
||||
this.cmbSubAccount.Size = new System.Drawing.Size(74, 25);
|
||||
|
||||
@@ -1185,7 +1185,7 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
case "详情":
|
||||
case "编辑/详情":
|
||||
//PDDDBProdEditForm editForm = new PDDDBProdEditForm(dbProduct);
|
||||
//if (BaseClass.MainPath != "binxixi")
|
||||
//if (BaseClass.MainPath != "29pdd")
|
||||
//{
|
||||
// editForm.pnlSkuOption.Visible = false;
|
||||
// editForm.txtProductName.ReadOnly = true;
|
||||
|
||||
@@ -23,8 +23,41 @@ namespace Update
|
||||
/// 应用程序的主入口点。
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (args.Length > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
var arr = args[0].TrimStart('-').Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (arr.Length > 3)
|
||||
{
|
||||
softName = arr[0];
|
||||
oldVersion = Convert.ToInt32(arr[1]);
|
||||
newVersion = Convert.ToInt32(arr[2]);
|
||||
updateUrl = arr[3];
|
||||
|
||||
if (oldVersion == 0 || string.IsNullOrEmpty(softName) || string.IsNullOrEmpty(updateUrl))
|
||||
return;
|
||||
|
||||
// 如果有新版本,就继续升级
|
||||
if (newVersion > oldVersion)
|
||||
{
|
||||
//Application.Current.Shutdown(); // 强制升级
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
// 仍然删除旧版数据防止残留
|
||||
if (File.Exists("UpdateConfig.ini"))
|
||||
File.Delete("UpdateConfig.ini");
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
}
|
||||
|
||||
if (File.Exists("UpdateConfig.ini"))
|
||||
{
|
||||
try
|
||||
@@ -193,7 +226,7 @@ namespace Update
|
||||
try
|
||||
{
|
||||
WebClientUtils webClient = new WebClientUtils();
|
||||
webClient.Timeout = 600;
|
||||
webClient.Timeout = 1200; // 20分钟
|
||||
if (File.Exists(FilePath))
|
||||
File.Delete(FilePath);
|
||||
webClient.DownloadProgressChanged += WebClient_DownloadProgressChanged;
|
||||
|
||||
@@ -320,7 +320,7 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
|
||||
// while (true)
|
||||
{
|
||||
string updatefilepath = System.Environment.CurrentDirectory + "\\Update.exe";
|
||||
var url = BaseClass.BuildObjString("update/get_update");
|
||||
var url = BaseClass.BuildDefaultObjString("update/get_update_new");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
@@ -329,8 +329,10 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
|
||||
var updateExeChk = BaseRegex.GetStringJson(ref html, "exe_check").ParseToString();
|
||||
var updateExeAddress = BaseRegex.GetStringJson(ref html, "exe_address");
|
||||
var updateFileAddress = BaseRegex.GetStringJson(ref html, "file_address");
|
||||
updateFileAddress = updateFileAddress.Replace("/Update", "/Update" + BaseClass.MainPath);
|
||||
var newVersion = BaseRegex.GetIntJson(ref html, "next_version").ParseToInt();
|
||||
|
||||
|
||||
if (File.Exists(updatefilepath))
|
||||
{
|
||||
string fc = BaseClass.GetFileMd5(updatefilepath);
|
||||
@@ -348,13 +350,13 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
|
||||
{
|
||||
if (File.Exists(updatefilepath))
|
||||
{
|
||||
File.WriteAllText(System.Environment.CurrentDirectory + "\\UpdateConfig.ini",
|
||||
"TemuKJD\r\n" +
|
||||
BaseClass.VersionCount + "\r\n" +
|
||||
newVersion + "\r\n" +
|
||||
updateFileAddress);
|
||||
string fileName = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
|
||||
|
||||
Process.Start(updatefilepath);
|
||||
string arguments = "-" + fileName + "\r\n" + BaseClass.VersionCount + "\r\n" + newVersion + "\r\n" + updateFileAddress;
|
||||
|
||||
File.WriteAllText(System.Environment.CurrentDirectory + "\\UpdateConfig.ini", arguments);
|
||||
|
||||
Process.Start(updatefilepath, arguments);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in new issue
Block a user