public EmpireUpdater(IEmpireUpdate appInfo) { this.appInfo = appInfo; this.bgWorker = new BackgroundWorker(); this.bgWorker.DoWork += new DoWorkEventHandler(bgWorker_DoWork); this.bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgWorker_RunWorkerCompleted); }
internal EmpireUpdateInfoForm(IEmpireUpdate appInfo, EmpireUpdateXml updateInfo) { InitializeComponent(); if (appInfo.AppIcon != null) this.Icon = appInfo.AppIcon; this.Text = appInfo.AppName + " - Update Info"; this.lblVersions.Text = String.Format("Current Version: {0}\nUpdate Version: {1}", appInfo.AppAssembly.GetName().Version.ToString(), updateInfo.Version.ToString()); this.txtDescrition.Text = updateInfo.Description; }
private void bgWorker_DoWork(object sender, DoWorkEventArgs e) { IEmpireUpdate app = (IEmpireUpdate)e.Argument; if (!EmpireUpdateXml.ExistsOnServer(app.UpdateXmlLoc)) { e.Cancel = true; } else { e.Result = EmpireUpdateXml.Parse(app.UpdateXmlLoc, app.AppID); } }
internal EmpireUpdateAcceptForm(IEmpireUpdate appInfo, EmpireUpdateXml updateInfo) { InitializeComponent(); this.appInfo = appInfo; this.updateInfo = updateInfo; this.Text = this.appInfo.AppName + " - Update Available"; if (this.appInfo.AppIcon != null) this.Icon = this.appInfo.AppIcon; this.lblNewVersion.Text = string.Format("New Version: {0}", this.updateInfo.Version.ToString()); }
internal EmpireUpdateInfoForm(IEmpireUpdate appInfo, EmpireUpdateXml updateInfo) { InitializeComponent(); if (appInfo.AppIcon != null) { this.Icon = appInfo.AppIcon; } this.Text = appInfo.AppName + " - Update Info"; this.lblVersions.Text = String.Format("Current Version: {0}\nUpdate Version: {1}", appInfo.AppAssembly.GetName().Version.ToString(), updateInfo.Version.ToString()); this.txtDescrition.Text = updateInfo.Description; }
internal EmpireUpdateAcceptForm(IEmpireUpdate appInfo, EmpireUpdateXml updateInfo) { InitializeComponent(); this.appInfo = appInfo; this.updateInfo = updateInfo; this.Text = this.appInfo.AppName + " - Update Available"; if (this.appInfo.AppIcon != null) { this.Icon = this.appInfo.AppIcon; } this.lblNewVersion.Text = string.Format("New Version: {0}", this.updateInfo.Version.ToString()); }