using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using sharpupdater; namespace test_sharpupdater { public partial class MainWindow : Form { private const string UPDATE_URL = "http://elvenprogrammer.themanaworld.org/updates/versions.xml"; private SharpUpdater updater; public MainWindow() { InitializeComponent(); updater = new SharpUpdater(UPDATE_URL); } private void btnUpdate_Click(object sender, EventArgs e) { if (cboProducts.SelectedItem != null) { try { updater.UpdateProduct((string)cboProducts.SelectedItem, txtVersion.Text); } catch (UnableToRetrieveVersionException ex) { txtResponse.Text += string.Format("Unable to retrieve version informations: '{0}'{1}", ex.Message, Environment.NewLine); } } } } }