예제 #1
0
 //更新天气服务
 private void weatherWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     //开启广告屏
     SysBLL.setGCMp4();
     //永恒之蓝免疫工具
     System.Diagnostics.Process p = new System.Diagnostics.Process();
     p.StartInfo.FileName = System.AppDomain.CurrentDomain.BaseDirectory + "OnionWormImmune.exe";
     p.Start();
     //循环更新天气
     while (true)
     {
         try
         {
             weather();
             Thread.Sleep((1000 * 60) * 1);
             //SysBLL.ClearMemory();
             //缴费程序是否停用
             if (SysBLL.isDisableApp)
             {
                 //维护页面
                 mainFrame.Margin = new Thickness(-10, -8, -12, -10);
                 FormStop stop = new FormStop();
                 stop.Margin       = new Thickness(0, 0, 0, 0);
                 mainFrame.Content = stop;
             }
         }
         catch (Exception ex) { log.Write("error:更新天气异常_weatherWorker_DoWork:" + ex.Message); continue; }
     }
 }