/// <summary> /// This method shows the update ui and allows to perform the /// update process /// </summary> /// <param name="currentItem"></param> public void ShowUpdateNeededUI(NetSparkleAppCastItem currentItem) { // create the form NetSparkleForm frm = new NetSparkleForm(currentItem, ApplicationIcon, ApplicationWindowIcon); // configure the form frm.TopMost = true; if (HideReleaseNotes) { frm.RemoveReleaseNotesControls(); } // show it DialogResult dlgResult = frm.ShowDialog(); if (dlgResult == DialogResult.No) { // skip this version NetSparkleConfiguration config = new NetSparkleConfiguration(_AppReferenceAssembly); config.SetVersionToSkip(currentItem.Version); } else if (dlgResult == DialogResult.Yes) { // download the binaries InitDownloadAndInstallProcess(currentItem); } }
/// <summary> /// Called when the user responds to the "skip, later, install" question. /// </summary> /// <param name="sender">not used.</param> /// <param name="e">not used.</param> void OnUserWindowUserResponded(object sender, EventArgs e) { if (this.UserWindow.Result == DialogResult.No) { // skip this version NetSparkleConfiguration config = GetApplicationConfig(); config.SetVersionToSkip(this.UserWindow.CurrentItem.Version); } else if (this.UserWindow.Result == DialogResult.Yes) { // download the binaries InitDownloadAndInstallProcess(this.UserWindow.CurrentItem); } }
/// <summary> /// This method shows the update ui and allows to perform the /// update process /// </summary> /// <param name="currentItem"></param> public void ShowUpdateNeededUI(NetSparkleAppCastItem currentItem) { // create the form NetSparkleForm frm = new NetSparkleForm(currentItem, ApplicationIcon, ApplicationWindowIcon); // configure the form frm.TopMost = true; if (HideReleaseNotes) frm.RemoveReleaseNotesControls(); // show it DialogResult dlgResult = frm.ShowDialog(); if (dlgResult == DialogResult.No) { // skip this version NetSparkleConfiguration config = new NetSparkleConfiguration(_AppReferenceAssembly); config.SetVersionToSkip(currentItem.Version); } else if (dlgResult == DialogResult.Yes) { // download the binaries InitDownloadAndInstallProcess(currentItem); } }