From 55528e5109571eba1ff8b960b243193eac3674e3 Mon Sep 17 00:00:00 2001 From: wule Date: Thu, 28 May 2026 17:28:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A8=8B=E5=BA=8F=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E5=87=86=E5=A4=87=E6=89=B9=E9=87=8F=E6=89=93?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + AllBase/BaseClass.cs | 18 ++- .../KJD_WebService/BLL/KJD/UpadteManage.cs | 40 +++++ .../KJD_WebService/UpdateService.asmx.cs | 14 +- KJDService/KJD_WebService/Web.config | 4 +- PackTools/Publish/Publish/Form1.cs | 10 +- TEMUKJD/BLL/PDDProdFormConverter.cs | 45 +++++- TEMUKJD/BLL/Pdd/PddApiHelper.cs | 4 +- TEMUKJD/BLL/ShopBLL.cs | 2 +- TEMUKJD/BaseForms/BaseForm.cs | 2 +- TEMUKJD/BaseForms/BaseGeneralForm.cs | 2 +- TEMUKJD/ChangeForm.cs | 2 +- TEMUKJD/InitForm.cs | 146 ++++++++++-------- .../SystemRemoveRestrictionsForm.cs | 2 +- TEMUKJD/MainForm.cs | 48 +++--- .../AdminForms/PDDAdminShopLoginForm.cs | 2 +- .../ProductSelectForms/PDDDBProdListForm.cs | 4 +- .../PDDDBProdUserSelectCacheForm.cs | 2 +- .../PDDDBProdUserSelectForm.cs | 2 +- .../PDDForms/ShopForms/PDDShopLoginForm.cs | 2 +- TEMUKJD/StartUp.cs | 4 +- TEMUKJD/ToolForms/GetJuShuitanProdForm.cs | 4 +- TEMUKJD/UserForm/LoginForm.cs | 4 +- .../WXUserCollectAuthProdListForm.cs | 10 +- .../ProductForms/WXUserProdListForm.cs | 10 +- .../ShopForms/WXShopDefaultAddressListForm.cs | 2 +- .../ShopForms/WXShopListForm.Designer.cs | 6 +- .../TalkForms/PDDBuyerOrderListForm.cs | 2 +- Update/Update/Program.cs | 37 ++++- Work/Initialization.cs | 16 +- 30 files changed, 297 insertions(+), 150 deletions(-) diff --git a/.gitignore b/.gitignore index b3ca126..ded2f31 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ packages bin *.rar *.zip +/Update/Update/*.user diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 9c8377e..29b14de 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,9 @@ namespace AllBase /// /// 版本ID /// - 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; /// @@ -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; + } /// /// 生成OBJ路径 /// @@ -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; diff --git a/KJDService/KJD_WebService/BLL/KJD/UpadteManage.cs b/KJDService/KJD_WebService/BLL/KJD/UpadteManage.cs index 47383d6..1c44fc1 100644 --- a/KJDService/KJD_WebService/BLL/KJD/UpadteManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/UpadteManage.cs @@ -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\":\"未知错误\"}"; + } } } \ No newline at end of file diff --git a/KJDService/KJD_WebService/UpdateService.asmx.cs b/KJDService/KJD_WebService/UpdateService.asmx.cs index 8cace63..a247605 100644 --- a/KJDService/KJD_WebService/UpdateService.asmx.cs +++ b/KJDService/KJD_WebService/UpdateService.asmx.cs @@ -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(); + } } } diff --git a/KJDService/KJD_WebService/Web.config b/KJDService/KJD_WebService/Web.config index 0d6067e..e8df77c 100644 --- a/KJDService/KJD_WebService/Web.config +++ b/KJDService/KJD_WebService/Web.config @@ -11,8 +11,8 @@ - - + + diff --git a/PackTools/Publish/Publish/Form1.cs b/PackTools/Publish/Publish/Form1.cs index cbd391c..f031b76 100644 --- a/PackTools/Publish/Publish/Form1.cs +++ b/PackTools/Publish/Publish/Form1.cs @@ -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 filePathLst = new List(); - 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()); diff --git a/TEMUKJD/BLL/PDDProdFormConverter.cs b/TEMUKJD/BLL/PDDProdFormConverter.cs index 5cfafb5..773f3ee 100644 --- a/TEMUKJD/BLL/PDDProdFormConverter.cs +++ b/TEMUKJD/BLL/PDDProdFormConverter.cs @@ -866,7 +866,12 @@ namespace TemuKJD.BLL } } - + /// + /// 微信店铺采集转拼多多 + /// + /// + /// + /// public PDDProductInfo WXProdToPddConvert(out string convertRst, KJDDBProduct dbProd) { convertRst = ""; @@ -1220,7 +1225,12 @@ namespace TemuKJD.BLL } } - + /// + /// 1688网页端采集转拼多多 + /// + /// + /// + /// public PDDProductInfo _1688ClientToPddConvert(out string convertRst, KJDDBProduct dbProd) { convertRst = ""; @@ -1565,7 +1575,7 @@ namespace TemuKJD.BLL } /// - /// 1688外部数据转拼多多 + /// 1688外部数据转拼多多(万象工具) /// /// /// @@ -1770,6 +1780,17 @@ namespace TemuKJD.BLL prodInfo.detail.size_spec_id = null; prodInfo.detail.sku = new List(); + 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 } } + /// + /// 微信商城手机版转拼多多 + /// + /// + /// + /// public PDDProductInfo WXClientToPddConvert(out string convertRst, KJDDBProduct dbProd) { convertRst = ""; diff --git a/TEMUKJD/BLL/Pdd/PddApiHelper.cs b/TEMUKJD/BLL/Pdd/PddApiHelper.cs index 5c882e5..900f227 100644 --- a/TEMUKJD/BLL/Pdd/PddApiHelper.cs +++ b/TEMUKJD/BLL/Pdd/PddApiHelper.cs @@ -97,7 +97,7 @@ namespace TemuKJD.BLL.PddApi public static void GetShopClientInfo(List shops = null) { - if (BaseClass.MainPath == "binxixi") + if (BaseClass.MainPath == "29pdd") { ConcurrentList shopList = new ConcurrentList(); 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(); diff --git a/TEMUKJD/BLL/ShopBLL.cs b/TEMUKJD/BLL/ShopBLL.cs index 980393e..142d886 100644 --- a/TEMUKJD/BLL/ShopBLL.cs +++ b/TEMUKJD/BLL/ShopBLL.cs @@ -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(jObj["anti_contents"].IsNullOrEmpty() ? "[]" : jObj["anti_contents"].ToString())); diff --git a/TEMUKJD/BaseForms/BaseForm.cs b/TEMUKJD/BaseForms/BaseForm.cs index 171cf72..af9e15d 100644 --- a/TEMUKJD/BaseForms/BaseForm.cs +++ b/TEMUKJD/BaseForms/BaseForm.cs @@ -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) { diff --git a/TEMUKJD/BaseForms/BaseGeneralForm.cs b/TEMUKJD/BaseForms/BaseGeneralForm.cs index e81611c..44e3073 100644 --- a/TEMUKJD/BaseForms/BaseGeneralForm.cs +++ b/TEMUKJD/BaseForms/BaseGeneralForm.cs @@ -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; diff --git a/TEMUKJD/ChangeForm.cs b/TEMUKJD/ChangeForm.cs index 3cfd191..1f6049f 100644 --- a/TEMUKJD/ChangeForm.cs +++ b/TEMUKJD/ChangeForm.cs @@ -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; diff --git a/TEMUKJD/InitForm.cs b/TEMUKJD/InitForm.cs index 0de2ee2..29a2d70 100644 --- a/TEMUKJD/InitForm.cs +++ b/TEMUKJD/InitForm.cs @@ -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"); - 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"); +// 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) { diff --git a/TEMUKJD/KJDForms/SystemForms/SystemRemoveRestrictionsForm.cs b/TEMUKJD/KJDForms/SystemForms/SystemRemoveRestrictionsForm.cs index 7ddb531..1080a8e 100644 --- a/TEMUKJD/KJDForms/SystemForms/SystemRemoveRestrictionsForm.cs +++ b/TEMUKJD/KJDForms/SystemForms/SystemRemoveRestrictionsForm.cs @@ -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; } diff --git a/TEMUKJD/MainForm.cs b/TEMUKJD/MainForm.cs index 609cf04..8d2895a 100644 --- a/TEMUKJD/MainForm.cs +++ b/TEMUKJD/MainForm.cs @@ -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) { diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.cs index 10a13e0..970565a 100644 --- a/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.cs +++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminShopLoginForm.cs @@ -501,7 +501,7 @@ namespace TemuKJD.PDDForms.AdminForms //public Func 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"; diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs index 7adcbe3..7227c45 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs @@ -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; diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectCacheForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectCacheForm.cs index b62689a..88dd07c 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectCacheForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectCacheForm.cs @@ -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; } diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs index fd4f721..d9a5299 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs @@ -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"; diff --git a/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs b/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs index 0146cb8..be1e668 100644 --- a/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs +++ b/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs @@ -610,7 +610,7 @@ namespace TemuKJD.PDDForms.ShopForms //public Func 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"; diff --git a/TEMUKJD/StartUp.cs b/TEMUKJD/StartUp.cs index 51c7ca8..5e14066 100644 --- a/TEMUKJD/StartUp.cs +++ b/TEMUKJD/StartUp.cs @@ -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"); diff --git a/TEMUKJD/ToolForms/GetJuShuitanProdForm.cs b/TEMUKJD/ToolForms/GetJuShuitanProdForm.cs index 7df0d65..7c4ea6b 100644 --- a/TEMUKJD/ToolForms/GetJuShuitanProdForm.cs +++ b/TEMUKJD/ToolForms/GetJuShuitanProdForm.cs @@ -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 == "淘宝") { diff --git a/TEMUKJD/UserForm/LoginForm.cs b/TEMUKJD/UserForm/LoginForm.cs index a993d7a..5a116f9 100644 --- a/TEMUKJD/UserForm/LoginForm.cs +++ b/TEMUKJD/UserForm/LoginForm.cs @@ -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; diff --git a/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.cs b/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.cs index d955643..6e1ef02 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.cs @@ -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; diff --git a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.cs b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.cs index 3b09b3b..79c30a9 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.cs @@ -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; diff --git a/TEMUKJD/WXForms/ShopForms/WXShopDefaultAddressListForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopDefaultAddressListForm.cs index dff335e..f6c4ec2 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopDefaultAddressListForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopDefaultAddressListForm.cs @@ -345,7 +345,7 @@ namespace TemuKJD.WXForms.ShopForms public static void GetShopDefaultAddress(List shopGetAddressList = null) { - if (BaseClass.MainPath == "weixin") + if (BaseClass.MainPath == "29wx") { if (shopGetAddressList == null) { diff --git a/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs index 4b7382f..fa0de8e 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs @@ -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); diff --git a/TEMUKJD/WXForms/TalkForms/PDDBuyerOrderListForm.cs b/TEMUKJD/WXForms/TalkForms/PDDBuyerOrderListForm.cs index b4e1d93..373a07c 100644 --- a/TEMUKJD/WXForms/TalkForms/PDDBuyerOrderListForm.cs +++ b/TEMUKJD/WXForms/TalkForms/PDDBuyerOrderListForm.cs @@ -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; diff --git a/Update/Update/Program.cs b/Update/Update/Program.cs index 1c99536..9804b08 100644 --- a/Update/Update/Program.cs +++ b/Update/Update/Program.cs @@ -23,8 +23,41 @@ namespace Update /// 应用程序的主入口点。 /// [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; diff --git a/Work/Initialization.cs b/Work/Initialization.cs index b8142c7..bce8efa 100644 --- a/Work/Initialization.cs +++ b/Work/Initialization.cs @@ -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)