Ejemplo n.º 1
0
 private void Window_Donate_Load(object sender, EventArgs e)
 {
     new Thread(() => {
         textBox1.Text = "正在加载...";
         string donateStr = new NetUtils().Http_Get("http://git.oschina.net/jokers/ZonyLrcDownload/blob/master/readme.md", Encoding.UTF8);
         Regex reg = new Regex(@"捐赠记录.+(?=

###)");
         string str = reg.Match(donateStr).ToString();
         var textStr = str.Replace("
", "\r\n");
         textBox1.Text = textStr;
     }).Start();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 更新检测
 /// </summary>
 private void updateCheck()
 {
     if (Config.configValue.option_Update)
     {
         new Thread(() =>
         {
             var result = new NetUtils().Http_Get("http://myzony.com/update.txt", Encoding.UTF8);
             if (result != null)
             {
                 var resultAray = result.Split(',');
                 if (int.Parse(resultAray[0]) > Ver.CurrentVersion)
                 {
                     if (MessageBox.Show("检测到新版本,是否下载新版本?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK)
                     {
                         System.Diagnostics.Process.Start(resultAray[1]);
                     }
                 }
             }
             else
             {
                 MessageBox.Show("与更新服务器网络连接异常。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }).Start();
     }
 }