mirror of
https://github.com/chylex/TweetDuck.git
synced 2024-11-23 08:42:47 +01:00
31 lines
866 B
C#
31 lines
866 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace TweetDuck.Updates{
|
|
sealed partial class FormUpdateDownload : Form{
|
|
private readonly UpdateInfo updateInfo;
|
|
|
|
public FormUpdateDownload(UpdateInfo info){
|
|
InitializeComponent();
|
|
|
|
this.updateInfo = info;
|
|
|
|
Text = "Updating "+Program.BrandName;
|
|
labelDescription.Text = "Downloading version "+info.VersionTag+"...";
|
|
timerDownloadCheck.Start();
|
|
}
|
|
|
|
private void btnCancel_Click(object sender, EventArgs e){
|
|
Close();
|
|
}
|
|
|
|
private void timerDownloadCheck_Tick(object sender, EventArgs e){
|
|
if (updateInfo.DownloadStatus.IsFinished(false)){
|
|
timerDownloadCheck.Stop();
|
|
DialogResult = DialogResult.OK;
|
|
Close();
|
|
}
|
|
}
|
|
}
|
|
}
|