static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new MainForm()); //myDog.RunDogTesting(); bool checkSuperDog = false; SuperDog.SuperDogSeries myDog = new SuperDog.SuperDogSeries(); if (!checkSuperDog || myDog.DogFlag) { Application.Run(new MainForm()); } else MessageBox.Show("Error: " + myDog.Status.ToString() + "\nSuperDog disabled!"); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new MainForm()); //myDog.RunDogTesting(); bool checkSuperDog = false; SuperDog.SuperDogSeries myDog = new SuperDog.SuperDogSeries(); if (!checkSuperDog || myDog.DogFlag) { Application.Run(new MainForm()); } else { MessageBox.Show("Error: " + myDog.Status.ToString() + "\nSuperDog disabled!"); } }
private void MainForm_Load(object sender, EventArgs e) { DirectoryInfo di = new DirectoryInfo(Application.StartupPath + @"\日志"); if (!di.Exists) { di.Create(); } LogHelper.Initial(Application.StartupPath + @"\日志\" + DateTime.Now.ToString(@"yyyyMMdd-HH-mm-ss") + @".txt"); LogHelper.AddLogEvent += new LogHelper.AddLogHandler(AddLogToTextBox); LogHelper.UpdateProgressEvent += new LogHelper.UpdateProgressHandler(UpdateProgressDisplay); LogHelper.UpdateFileNameDisplayEvent += new LogHelper.UpdateFileNameDisplayHandler(ToolStripStatusLabel_SetText); SuperDog.SuperDogSeries myDog = new SuperDog.SuperDogSeries(); myDog.RunDogTesting(); if (myDog.DogFlag) { Signitue_Write(myDog.Signiture); person = myDog.Person; } else if (checkSuperDog) { MessageBox.Show("Error: " + myDog.Status.ToString() + "\nSuperDog disabled!"); this.Close(); return; } else { Signitue_Write(SuperDog.SuperDogAlpha.getInstance().Signiture); person = SuperDog.SuperDogAlpha.getInstance().Person; } ProgramConfiguration.Initial(Application.StartupPath); isWorking = false; isStopping = false; mi = DoWork; dod = new doOneDelegate(StandardizeOne); textBox6.Text = Application.StartupPath + @"\输出文件夹"; comboBox1.SelectedIndex = 0; comboBox3.SelectedIndex = 0; timer1.Start(); }
private void timer1_Tick(object sender, EventArgs e) { SuperDog.SuperDogSeries myDog = new SuperDog.SuperDogSeries(); if (checkSuperDog && !myDog.DogFlag) { timer1.Stop(); MessageBox.Show("Error: " + myDog.Status.ToString() + "\nSuperDog disabled!"); this.Close(); return; } }