temu客户端程序
This commit is contained in:
commit
4aaf264e89
694 files changed
+263780
No files matched your search
@@ -0,0 +1,66 @@
|
||||
using LittleRabbit.LittleRabbitForms.BaseForms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LittleRabbit
|
||||
{
|
||||
public partial class InitForm : LRBaseForm
|
||||
{
|
||||
public InitForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Load += InitForm_Load;
|
||||
}
|
||||
|
||||
private void InitForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
while (!Work.Initialization.IsCheckFilesFinish || !Program.IsInit)
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.progressBarX1.Value = Work.Initialization.InitPercent;
|
||||
this.progressBarX1.Maximum = 50;
|
||||
}));
|
||||
}
|
||||
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();
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
private void InitForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user