1 核价查询功能优化 2 添加上传商品次数修改功能 3优化备货功能
This commit is contained in:
1 parent
c45254656b
commit
fc017993df
22 files changed
+1661
-869
No files matched your search
+64
-15
@@ -10,11 +10,14 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using AllBase.Helper;
|
||||
using NaiBa.Util.Helper;
|
||||
|
||||
namespace TemuKJD
|
||||
{
|
||||
public partial class InitForm : LRBaseForm
|
||||
{
|
||||
InitFormSettings initFormSettings = new InitFormSettings();
|
||||
public InitForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -24,6 +27,17 @@ namespace TemuKJD
|
||||
|
||||
private void InitForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
#if DEBUG
|
||||
this.panel3.Location = new Point(4, 4);
|
||||
this.panel4.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() != "temu";
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
while (!Work.Initialization.IsCheckFilesFinish || !Program.IsInit || this.progressBarX1.Value < 50)
|
||||
@@ -38,31 +52,66 @@ namespace TemuKJD
|
||||
if (this.progressBarX1.Value >= 50)
|
||||
Thread.Sleep(300);
|
||||
}
|
||||
if (initFormSettings.Remember)
|
||||
Thread.Sleep(500);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Work.Initialization.IsCheckFilesSuccesss)
|
||||
{
|
||||
BaseMsgForm.ShowError("文件初始化失败,请检查是否有程序占用并使用管理员权限运行本程序!");
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
|
||||
this.Hide();
|
||||
new MainForm().ShowDialog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError(ex.Message);
|
||||
Process.GetCurrentProcess().Kill();
|
||||
if(initFormSettings.Remember)
|
||||
{
|
||||
OpenNewMainForm();
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
void OpenNewMainForm()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Work.Initialization.IsCheckFilesSuccesss)
|
||||
{
|
||||
BaseMsgForm.ShowError("文件初始化失败,请检查是否有程序占用并使用管理员权限运行本程序!");
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
this.Hide();
|
||||
new MainForm(initFormSettings.LoginType).ShowDialog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError(ex.Message);
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenNewMainForm();
|
||||
}
|
||||
|
||||
private void chkRemember_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
initFormSettings.Remember = chkRemember.Checked;
|
||||
ConfigHelper.SaveConfig("initFormSettings", initFormSettings);
|
||||
}
|
||||
|
||||
private void rbTemu_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (rbTemu.Checked)
|
||||
initFormSettings.LoginType = "Temu";
|
||||
else
|
||||
initFormSettings.LoginType = "Pdd";
|
||||
ConfigHelper.SaveConfig("initFormSettings", initFormSettings);
|
||||
}
|
||||
}
|
||||
|
||||
class InitFormSettings
|
||||
{
|
||||
public string LoginType { get; set; } = "Temu";
|
||||
public bool Remember { get; set; } = true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user