private void btnOk_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrEmpty(this.txtLicense.Text))
     {
         MessageBox.Show(this, App.Current.FindResource("Message_71").ToString());
     }
     else
     {
         try
         {
             NameValueCollection nvlist = new NameValueCollection();
             nvlist.Add("license", this.txtLicense.Text);
             nvlist.Add("cpuid", ComputerInfoTools.GetCPUId());
             var  res     = HttpWebTools.Post(App.reportSettingModel.CloudPath + "/api/active", nvlist);
             var  jsonObj = JObject.Parse(res);
             bool status  = (bool)jsonObj["status"];
             if (status)
             {
                 App.reportSettingModel.License = this.txtLicense.Text;
                 OperateIniFile.WriteIniData("Base", "License", this.txtLicense.Text, System.AppDomain.CurrentDomain.BaseDirectory + "Config.ini");
                 string filePath = System.AppDomain.CurrentDomain.BaseDirectory + "license.dat";
                 SecurityTools.EncryptTextToFile(App.reportSettingModel.License + ComputerInfoTools.GetCPUId(), filePath);
                 MessageBox.Show(this, App.Current.FindResource("Message_73").ToString());
                 this.DialogResult = (bool?)true;
                 this.Close();
             }
             else
             {
                 string info = (string)jsonObj["info"];
                 MessageBox.Show(this, info);
             }
         }
         catch (Exception exe)
         {
             MessageBox.Show(this, App.Current.FindResource("Message_72").ToString() + exe.Message);
         }
     }
     this.txtLicense.Focus();
 }