Ejemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);



            Win.Login login = new Win.Login();
            login.BackgroundImage = System.Drawing.Image.FromFile(System.IO.Path.Combine(Application.StartupPath, "login.png"));
            login.Wait            = true;
            login.Show();
            int check = CheckAppLong();

            if (check != 0)
            {
                login = new Win.Login(false, null);
                login.Show();
                if (check == 4)
                {
                    MessageBox.Show("加密狗文件不对!", "速录宝");
                }
                else if (check == 5)
                {
                    MessageBox.Show("加密狗文件内容不对!", "速录宝");
                }
                else
                {
                    MessageBox.Show("加密狗不对,请插入正确的加密狗!", "速录宝");
                }
                Application.Exit();
                return;
            }


            login.Wait           = false;
            CheckTh              = new System.Threading.Thread(new System.Threading.ThreadStart(CheckLong));
            CheckTh.IsBackground = true;
            CheckTh.Start();



            int iProcessNum = 0;

            foreach (Process singleProc in Process.GetProcesses())
            {
                if (singleProc.ProcessName == Process.GetCurrentProcess().ProcessName)
                {
                    iProcessNum += 1;
                }
            }

            if (iProcessNum <= 1)
            {
                //不要重复运行程序
                MIme = new Win.WinInput();
                Application.Run(MIme);
            }
        }
Ejemplo n.º 2
0
 public ConfigFrm(Win.WinInput input)
 {
     this.winput = input;
     InitializeComponent();
     //this.Icon = new Icon(System.IO.Path.Combine(Application.StartupPath, "log32.ico"));
 }