修改程序逻辑,准备批量打包
This commit is contained in:
1 parent
aab73b978f
commit
55528e5109
30 files changed
+297
-150
No files matched your search
+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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user