/// <summary>Initializes a new instance of the <see cref="SharpUpdateAcceptDialog" /> class.</summary> /// <param name="applicationInfo">The application information.</param> /// <param name="updateInfo">The update information.</param> internal SharpUpdateAcceptDialog(ISharpUpdatable applicationInfo, SharpUpdateXML updateInfo) { InitializeComponent(); try { _applicationInfo = applicationInfo; _updateInfo = updateInfo; Text = LanguageEN.SharpUpdateAcceptForm_Title; klblpdateAvail.Text = LanguageEN.SharpUpdateAcceptForm_lblUpdateAvail; klblNewVersion.Text = string.Format(LanguageEN.SharpUpdateAcceptForm_lblNewVersion, _updateInfo.Version.ToString()); //kbtnYes.Text = LanguageEN.SharpUpdateAcceptForm_btnYes; //kbtnNo.Text = LanguageEN.SharpUpdateAcceptForm_btnNo; kbtnDetails.Text = LanguageEN.SharpUpdateAcceptForm_btnDetails; } catch (Exception e) { ExceptionHandler.CaptureException(e); } if (applicationInfo.ApplicationIcon != null) { Icon = applicationInfo.ApplicationIcon; } }
/// <summary> /// Creates a new SharpUpdateAcceptForm /// </summary> /// <param name="applicationInfo"></param> /// <param name="updateInfo"></param> internal SharpUpdateAcceptForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); try { this.applicationInfo = applicationInfo; this.updateInfo = updateInfo; this.Text = SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_Title; this.lblUpdateAvail.Text = SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_lblUpdateAvail; this.lblNewVersion.Text = String.Format(SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_lblNewVersion, this.updateInfo.Version.ToString()); this.btnYes.Text = SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_btnYes; this.btnNo.Text = SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_btnNo; this.btnDetails.Text = SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_btnDetails; } catch (Exception ee) { int dds = 0; } // Assigns the icon if it isn't null if (this.applicationInfo.ApplicationIcon != null) { this.Icon = this.applicationInfo.ApplicationIcon; } // Adds the update version # to the form }
internal SharpUpdateInfoDialog(ISharpUpdatable applicationInfo, SharpUpdateXML updateInfo) { InitializeComponent(); try { if (applicationInfo.ApplicationIcon != null) { Icon = applicationInfo.ApplicationIcon; } Text = LanguageEN.SharpUpdateInfoForm_Title; klblVersions.Text = string.Format(LanguageEN.SharpUpdateInfoForm_Version, applicationInfo.ApplicationAssembly.GetName().Version.ToString(), updateInfo.Version.ToString()); klblDescription.Text = LanguageEN.SharpUpdateInfoForm_lblDescription; ktxtDescription.Text = updateInfo.Description; kbtnBack.Text = LanguageEN.SharpUpdateInfoForm_btnBack; } catch (Exception e) { throw; } }
public SharpUpdater(ISharpUpdatable applicationInfo) { this.applicationInfo = applicationInfo; this.bgWorker = new BackgroundWorker(); this.bgWorker.DoWork += BgWorker_DoWork; this.bgWorker.RunWorkerCompleted += BgWorker_RunWorkerCompleted; }
public SharpUpdater(ISharpUpdatable applcationInfo) { this.applcationInfo = applcationInfo; this.bgWorker = new BackgroundWorker(); this.bgWorker.DoWork += BgWorker_DoWork; this.bgWorker.RunWorkerCompleted += BgWorker_RunWorkerCompleted; }
internal SharpUpdate(ISharpUpdatable applicationInfo) { this.applicationInfo = applicationInfo; this.bgWorker = new BackgroundWorker(); this.bgWorker.DoWork += new DoWorkEventHandler(BgWorker_DoWork); this.bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BgWorker_RunWorkerCompleted); }
/// <summary> /// Crée une instance de l'updater /// </summary> /// <param name="p_ApplicationInfo"></param> public SharpUpdater(ISharpUpdatable p_ApplicationInfo) { applicationInfo = p_ApplicationInfo; bgWorker = new BackgroundWorker(); bgWorker.DoWork += BgWorker_DoWork; bgWorker.RunWorkerCompleted += BgWorker_RunWorkerCompleted; }
/// <summary> /// Creates a new SharpUpdater object /// </summary> /// <param name="applicationName">The name of the application so it can be displayed on dialog boxes to user</param> /// <param name="appId">A unique Id for the application, same as in update xml</param> /// <param name="updateXmlLocation">The Uri for the program's update.xml</param> public SharpUpdater(ISharpUpdatable applicationInfo) { this.applicationInfo = applicationInfo; // Set up backgroundworker this.bgWorker = new BackgroundWorker(); this.bgWorker.DoWork += new DoWorkEventHandler(bgWorker_DoWork); this.bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgWorker_RunWorkerCompleted); }
/// <summary> /// Creates a new SharpUpdater object /// </summary> /// <param name="applicationName">The name of the application so it can be displayed on dialog boxes to user</param> /// <param name="appId">A unique Id for the application, same as in update xml</param> /// <param name="updateXmlLocation">The Uri for the program's update.xml</param> public SharpUpdater(ISharpUpdatable applicationInfo) { this.applicationInfo = applicationInfo; // Set up backgroundworker this.bgWorker = new BackgroundWorker(); this.bgWorker.DoWork += new DoWorkEventHandler(bgWorker_DoWork); this.bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgWorker_RunWorkerCompleted); }
private void BgWorker_DoWork(object sender, DoWorkEventArgs e) { ISharpUpdatable application = (ISharpUpdatable)e.Argument; if (!SharpUdateXml.ExistsOnServer(application.UpdateXmlLocation)) { e.Cancel = true; } else { e.Result = SharpUdateXml.Parse(application.UpdateXmlLocation, application.ApplicationID); } }
public SharpUpdateInfoForm(ISharpUpdatable applcationInfo, SharpUpdateXml updateInfo ) { InitializeComponent(); if (applcationInfo.ApplcationIcon != null) { this.Icon = applcationInfo.ApplcationIcon; } this.Text = applcationInfo.ApplicationName + " - Update info"; this.lblVersions.Text = String.Format("Obecna wersja {0}\nNowa wersja {1}", applcationInfo.ApplcationAssembly.GetName().Version.ToString(), updateInfo.Version.ToString()); this.txDescription.Text = updateInfo.Description; }
internal SharpUpdateAcceptWindow(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); this.applicationInfo = applicationInfo; this.updateInfo = updateInfo; this.Title = applicationInfo.ApplicationName + " - Update Available"; if (applicationInfo.ApplicationIcon != null) this.Icon = applicationInfo.ApplicationIcon.Source; lblNewVersion.Content = string.Format("New Version {0}", updateInfo.Version); }
public SharpUpdateFornInfo(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); if (applicationInfo.ApplicationIcon != null) { this.Icon = applicationInfo.ApplicationIcon; } this.Text = applicationInfo.ApplicationName + " - Update Info"; this.lblVersion.Text = string.Format("Current Version: {0}\nUpdate Version: {1}", applicationInfo.ApplicationAssembly.GetName().Version.ToString(), updateInfo.Version.ToString()); this.txtDescription.Text = updateInfo.Description; }
/// <summary> /// Checks for/parses update.xml on server /// </summary> private void bgWorker_DoWork(object sender, DoWorkEventArgs e) { ISharpUpdatable application = (ISharpUpdatable)e.Argument; // Check for update on server if (!SharpUpdateXml.ExistsOnServer(application.UpdateXmlLocation)) { e.Cancel = true; } else // Parse update xml { e.Result = SharpUpdateXml.Parse(application.UpdateXmlLocation, application.ApplicationID); } }
/// <summary> /// Creates a new SharpUpdateInfoForm /// </summary> internal SharpUpdateInfoForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); // Sets the icon if it's not null if (applicationInfo.ApplicationIcon != null) this.Icon = applicationInfo.ApplicationIcon; // Fill in the UI this.Text = applicationInfo.ApplicationName + " - Update Info"; this.lblVersions.Text = String.Format("Current Version: {0}\nUpdate version: {1}", applicationInfo.ApplicationAssembly.GetName().Version.ToString(), updateInfo.Version.ToString()); this.txtDescription.Text = updateInfo.Description; }
internal SharpUpdateAcceptForm(ISharpUpdatable applicationInfo, SharpUdateXml updateInfo) { InitializeComponent(); this.applicationInfo = applicationInfo; this.updateInfo = updateInfo; this.Text = this.applicationInfo.ApplicationName + " - Update Available"; if (this.applicationInfo.ApplicationIcon != null) { this.Icon = applicationInfo.ApplicationIcon; } this.lblNewVersion.Text = string.Format("New Version : {0}", this.updateInfo.Version); }
internal SharpUpdateAcceptForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); this.applicationInfo = applicationInfo; this.updateInfo = updateInfo; this.Text = this.applicationInfo.ApplicationName; if (this.applicationInfo.ApplcationIcon != null) { this.Icon = this.applicationInfo.ApplcationIcon; } lblNewVersion.Text = string.Format("Nowa wersja {0}", this.updateInfo.Version.ToString()); }
internal SharpUpdateInfoWindow(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); if (applicationInfo.ApplicationIcon != null) this.Icon = applicationInfo.ApplicationIcon.Source; this.Title = applicationInfo.ApplicationName + " - Update Info"; this.lblDescription.Content = string.Format("Current Version: {0}\nUpdate Version: {1}", applicationInfo.ApplicationAssembly.GetName().Version, updateInfo.Version); this.txtDescription.Document.Blocks.Clear(); this.txtDescription.Document.Blocks.Add(new Paragraph(new Run(updateInfo.Description))); }
/// <summary> /// Creates a new SharpUpdateInfoForm /// </summary> internal SharpUpdateInfoForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); // Sets the icon if it's not null if (applicationInfo.ApplicationIcon != null) { this.Icon = applicationInfo.ApplicationIcon; } // Fill in the UI this.Text = applicationInfo.ApplicationName + " - Güncelleme Bilgisi"; this.lblVersions.Text = String.Format("Mevcut version: {0}\nGüncel version: {1}", applicationInfo.ApplicationAssembly.GetName().Version.ToString(), updateInfo.Version.ToString()); this.txtDescription.Text = updateInfo.Description; }
/// <summary> /// Creates a new SharpUpdateInfoForm /// </summary> internal SharpUpdateInfoForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); // Sets the icon if it's not null if (applicationInfo.ApplicationIcon != null) { this.Icon = applicationInfo.ApplicationIcon; } // Fill in the UI this.Text = "Информация об обновлении - " + applicationInfo.ApplicationName; this.lblVersions.Text = String.Format("Текущая версия: {0}\nНовая версия: {1}", applicationInfo.ApplicationAssembly.GetName().Version.ToString(), updateInfo.Version.ToString()); this.txtDescription.Text = updateInfo.Description; }
/// <summary> /// Constructeur du formulaire /// </summary> /// <param name="applicationInfo"></param> /// <param name="updateInfo"></param> public SharpUpdateInfoForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); if (applicationInfo.ApplicationIcon != null) { Icon = applicationInfo.ApplicationIcon; } this.Text = applicationInfo.ApplicationName + " - Mise à jour"; lblVersion.Text = String.Format("Version Actuelle: {0}\nVersion à jour: {1}", applicationInfo.ApplicationAssembly.GetName().Version.ToString(), updateInfo.Version.ToString()); txtDescription.Text = updateInfo.Description; }
private void bgWorker_DoWork(object sender, DoWorkEventArgs e) { fc.ErrorLog("bgWorker_DoWork"); ISharpUpdatable application = (ISharpUpdatable)e.Argument; if (!SharpUpdateXml.ExistOnServer(application.UpdateXmlLocation)) { e.Cancel = true; fc.ErrorLog("e.Cancel = true;"); } else { e.Result = SharpUpdateXml.Parse(application.UpdateXmlLocation, application.ApplicationID); fc.ErrorLog("application.UpdateXmlLocation=" + application.UpdateXmlLocation + " application.ApplicationID=" + application.ApplicationID); } }
/// <summary> /// Creates a new SharpUpdateAcceptForm /// </summary> /// <param name="applicationInfo"></param> /// <param name="updateInfo"></param> internal SharpUpdateAcceptForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); this.applicationInfo = applicationInfo; this.updateInfo = updateInfo; this.Text = this.applicationInfo.ApplicationName + " - Update Available"; // Assigns the icon if it isn't null if (this.applicationInfo.ApplicationIcon != null) this.Icon = this.applicationInfo.ApplicationIcon; // Adds the update version # to the form this.lblNewVersion.Text = String.Format("New Version: {0}", this.updateInfo.Version.ToString()); }
/// <summary> /// Creates a new SharpUpdateInfoForm /// </summary> internal SharpUpdateInfoForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); // Sets the icon if it's not null if (applicationInfo.ApplicationIcon != null) this.Icon = applicationInfo.ApplicationIcon; // Fill in the UI this.Text = SharpUpdate.LanguageFile._default.SharpUpdateInfoForm_Title; this.lblVersions.Text = String.Format(SharpUpdate.LanguageFile._default.SharpUpdateInfoForm_Version, applicationInfo.ApplicationAssembly.GetName().Version.ToString(), updateInfo.Version.ToString()); this.lblDescription.Text = SharpUpdate.LanguageFile._default.SharpUpdateInfoForm_lblDescription; this.txtDescription.Text = updateInfo.Description; this.btnBack.Text = SharpUpdate.LanguageFile._default.SharpUpdateInfoForm_btnBack; }
internal SharpUpdateAcceptForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); fc.ErrorLog("VSharpUpdateAcceptForm"); this.applicationInfo = applicationInfo; this.updateInfo = updateInfo; this.Text = this.applicationInfo.ApplicationName + ""; if (this.applicationInfo.ApplicationIcon != null) { this.Icon = this.applicationInfo.ApplicationIcon; } this.lbNew.Text = string.Format("新版本 Ver:{0}", this.updateInfo.Version.ToString()); }
/// <summary> /// Creates a new SharpUpdateAcceptForm /// </summary> /// <param name="applicationInfo"></param> /// <param name="updateInfo"></param> internal SharpUpdateAcceptForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); this.applicationInfo = applicationInfo; this.updateInfo = updateInfo; this.Text = this.applicationInfo.ApplicationName + " - Update Available"; // Assigns the icon if it isn't null if (this.applicationInfo.ApplicationIcon != null) { this.Icon = this.applicationInfo.ApplicationIcon; } // Adds the update version # to the form this.lblNewVersion.Text = String.Format("New Version: {0}", this.updateInfo.Version.ToString()); }
/// <summary> /// Creates a new SharpUpdateAcceptForm /// </summary> /// <param name="applicationInfo"></param> /// <param name="updateInfo"></param> internal SharpUpdateAcceptForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); this.applicationInfo = applicationInfo; this.updateInfo = updateInfo; this.Text = "Доступно обновление - " + this.applicationInfo.ApplicationName; // Assigns the icon if it isn't null if (this.applicationInfo.ApplicationIcon != null) { this.Icon = this.applicationInfo.ApplicationIcon; } // Adds the update version # to the form this.lblNewVersion.Text = String.Format("Новая версия: {0}", this.updateInfo.Version.ToString()); }
/// <summary> /// Constructeur de la frame /// </summary> /// <param name="applicationInfo"></param> /// <param name="updateInfo"></param> internal SharpUpdateAcceptForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); this.applicationInfo = applicationInfo; this.updateInfo = updateInfo; this.Text = applicationInfo.ApplicationName + " - Mise à jour disponible"; // Afficher l'icone si ce dernier n'est pas nul if (applicationInfo.ApplicationIcon != null) { Icon = applicationInfo.ApplicationIcon; } // Afficher le numéro de version lblNewVersion.Text = string.Format("Nouvelle version: {0}", updateInfo.Version.ToString()); }
/// <summary> /// Creates a new SharpUpdateInfoForm /// </summary> internal SharpUpdateInfoForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); // Sets the icon if it's not null if (applicationInfo.ApplicationIcon != null) { this.Icon = applicationInfo.ApplicationIcon; } // Fill in the UI this.Text = SharpUpdate.LanguageFile._default.SharpUpdateInfoForm_Title; this.lblVersions.Text = String.Format(SharpUpdate.LanguageFile._default.SharpUpdateInfoForm_Version, applicationInfo.ApplicationAssembly.GetName().Version.ToString(), updateInfo.Version.ToString()); this.lblDescription.Text = SharpUpdate.LanguageFile._default.SharpUpdateInfoForm_lblDescription; this.txtDescription.Text = updateInfo.Description; this.btnBack.Text = SharpUpdate.LanguageFile._default.SharpUpdateInfoForm_btnBack; }
/// <summary> /// Creates a new SharpUpdateAcceptForm /// </summary> /// <param name="applicationInfo"></param> /// <param name="updateInfo"></param> internal SharpUpdateAcceptForm(ISharpUpdatable applicationInfo, SharpUpdateXml updateInfo) { InitializeComponent(); try { this.applicationInfo = applicationInfo; this.updateInfo = updateInfo; this.Text = SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_Title; this.lblUpdateAvail.Text = SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_lblUpdateAvail; this.lblNewVersion.Text = String.Format(SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_lblNewVersion, this.updateInfo.Version.ToString()); this.btnYes.Text = SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_btnYes; this.btnNo.Text = SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_btnNo; this.btnDetails.Text = SharpUpdate.LanguageFile._default.SharpUpdateAcceptForm_btnDetails; } catch (Exception ee) { int dds = 0; } // Assigns the icon if it isn't null if (this.applicationInfo.ApplicationIcon != null) this.Icon = this.applicationInfo.ApplicationIcon; // Adds the update version # to the form }
public SharpUpdateInfoForm(ISharpUpdatable applicationInfo, SharpUpdateXml updatInfo) { InitializeComponent(); if (applicationInfo.ApplicationIcon != null) { this.Icon = applicationInfo.ApplicationIcon; } System.Diagnostics.FileVersionInfo ver = System.Diagnostics.FileVersionInfo.GetVersionInfo( applicationInfo.ApplicationAssembly.Location); string[] tmpv = ver.FileVersion.Split('.'); Version v = new Version(Int32.Parse(tmpv[0]), Int32.Parse(tmpv[1]), Int32.Parse(tmpv[2]), Int32.Parse(tmpv[3])); this.Text = applicationInfo.ApplicationName + " "; this.lbdes.Text = string.Format("更新版本 Ver:{1}\n目前版本 Ver:{0}", applicationInfo.ApplicationAssembly.GetName().Version, updatInfo.Version.ToString()); this.rtbInfo.Text = updatInfo.Description; }
public SharpUpdateAcceptForm(ISharpUpdatable applicationInfo, SharpUpdateXml update) { this.applicationInfo = applicationInfo; this.update = update; }