示例#1
0
 /// <summary>
 /// 更新界面Ui下载值
 /// </summary>
 /// <param name="state"></param>
 private void Tick(object state)
 {
     this.RunOnUiThread(() =>
     {
         if (tv_progress.Visibility == ViewStates.Gone)
         {
             tv_progress.Visibility = ViewStates.Visible;
         }
         tv_progress.Text = "下载中:" + _progressBar.Progress;
         if (_progressBar.Progress == 100)
         {
             timerDelegate.Clone();
             _timer.Dispose();
             string tarPath = Android.OS.Environment.ExternalStorageDirectory + "/JYandroidpda.apk";
             Common.DownloadHelper.installApk(tarPath, this);
         }
     });
 }