Example #1
0
 public MDIParent()
 {
     this.InitializeComponent();
     this.picEnter.Parent = this.pictureBox1;
     this.pictureBox2.Parent = this.pictureBox1;
     this.lblDays.Parent = this.pictureBox1;
     this.lblPrompt.Parent = this.pictureBox1;
     this.lblDays.ForeColor = Color.FromArgb(178, 51, 21);
     this.pictureBox1.Image = Image.FromFile(Application.StartupPath + "\\images\\main.png");
     this.picEnter.Image = Image.FromFile(Application.StartupPath + "\\images\\enter_leave.png");
     this.pictureBox2.Image = Image.FromFile(Application.StartupPath + "\\images\\!.png");
     if (this.checkVolName() == "0")
     {
         MDIParent.MDIForm = this;
         this.Init = new frmInit(this);
         this.Init.Show();
         Thread thread = new Thread(new ThreadStart(this.initP));
         thread.Start();
         Thread thread2 = new Thread(new ThreadStart(this.initAED));
         thread2.Start();
         Thread thread3 = new Thread(new ThreadStart(this.initF));
         thread3.Start();
         Thread thread4 = new Thread(new ThreadStart(this.initBQ));
         thread4.Start();
         Thread thread5 = new Thread(new ThreadStart(this.CheckUpdate));
         thread5.Start();
         while (!this.bInitOK)
         {
             if (this.Init.progressBar1.Value == this.Init.progressBar1.Maximum)
             {
                 Thread.Sleep(120);
                 thread.Abort();
                 thread2.Abort();
                 thread3.Abort();
                 thread4.Abort();
                 thread5.Abort();
                 break;
             }
             Application.DoEvents();
         }
         this.Init.Dispose();
     }
     else
     {
         MessageBox.Show(this, "由于您电脑本次的升级校验码与您上次提供的不一样,无法提供查询服务!\r\n咨询电话:010-51268119!", "错误提示!", MessageBoxButtons.OK);
         File.Delete(Directory.GetCurrentDirectory() + "\\p3.xml");
         this.picEnter.Enabled = false;
     }
 }
Example #2
0
 public MDIParent()
 {
     this.InitializeComponent();
     this.picEnter.Parent    = this.pictureBox1;
     this.pictureBox2.Parent = this.pictureBox1;
     this.lblDays.Parent     = this.pictureBox1;
     this.lblPrompt.Parent   = this.pictureBox1;
     this.lblDays.ForeColor  = Color.FromArgb(178, 51, 21);
     this.pictureBox1.Image  = Image.FromFile(Application.StartupPath + "\\images\\main.png");
     this.picEnter.Image     = Image.FromFile(Application.StartupPath + "\\images\\enter_leave.png");
     this.pictureBox2.Image  = Image.FromFile(Application.StartupPath + "\\images\\!.png");
     if (this.checkVolName() == "0")
     {
         MDIParent.MDIForm = this;
         this.Init         = new frmInit(this);
         this.Init.Show();
         Thread thread = new Thread(new ThreadStart(this.initP));
         thread.Start();
         Thread thread2 = new Thread(new ThreadStart(this.initAED));
         thread2.Start();
         Thread thread3 = new Thread(new ThreadStart(this.initF));
         thread3.Start();
         Thread thread4 = new Thread(new ThreadStart(this.initBQ));
         thread4.Start();
         Thread thread5 = new Thread(new ThreadStart(this.CheckUpdate));
         thread5.Start();
         while (!this.bInitOK)
         {
             if (this.Init.progressBar1.Value == this.Init.progressBar1.Maximum)
             {
                 Thread.Sleep(120);
                 thread.Abort();
                 thread2.Abort();
                 thread3.Abort();
                 thread4.Abort();
                 thread5.Abort();
                 break;
             }
             Application.DoEvents();
         }
         this.Init.Dispose();
     }
     else
     {
         MessageBox.Show(this, "由于您电脑本次的升级校验码与您上次提供的不一样,无法提供查询服务!\r\n咨询电话:010-51268119!", "错误提示!", MessageBoxButtons.OK);
         File.Delete(Directory.GetCurrentDirectory() + "\\p3.xml");
         this.picEnter.Enabled = false;
     }
 }