1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2024-10-17 09:42:45 +02:00
TweetDuck/Updates/FormUpdateDownload.cs

31 lines
861 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()){
timerDownloadCheck.Stop();
DialogResult = DialogResult.OK;
Close();
}
}
}
}