Esempio n. 1
0
 //升级服务端
 private void 升级服务端UtoolStripMenuItem_Click(object sender, EventArgs e)
 {
     ICanSeeYou.Configure.Option option = new ICanSeeYou.Configure.Option(ICanSeeYou.Common.Constant.OptionFilename);
     if (!option.Read())
     {
         MessageBox.Show("配置文件丢失,请重新设置.");
     }
     if (option.OptFile == null)
     {
         MessageBox.Show("配置文件发生错误,请重新设置.");
     }
     else
     {
         string UpdatedFile = option.OptFile.UpdatedFile;
         if (UpdatedFile != null && System.IO.File.Exists(UpdatedFile))
         {
             GeneralControler.UpdateServer();
         }
         else
         {
             MessageBox.Show("配置文件发生错误或升级文件丢失.");
         }
     }
 }