public MainForm() { // ParserHelper.ParseAllLevels(@"C:\Users\Computer\Desktop\Others\Super Meat Boy\gamedata\Levels"); InitializeComponent(); InitGUI(); smb = new SMBManager(); smb2 = new SMBManager(); isCompare = false; if (Program.Settings.AutoUpdate) { UpdaterFormOptions options = new UpdaterFormOptions { WindowIcon = Properties.Resources.smb, Logo = Properties.Resources.potatoSmall, LogoPosition = new Point(15, 5) }; UpdateChecker updateChecker = new UpdateChecker(Program.UpdateURL, "SMBStats", new Version(Application.ProductVersion), true, null, options); updateChecker.CheckUpdateAsync(true); } if (Program.Settings.AutoLoad) { OpenSaveGameFile(Program.Settings.LastLoadPath); } }
public UpdateChecker(string url, string applicationName, Version applicationVersion, bool checkBeta, IWebProxy proxy, UpdaterFormOptions updaterFormOptions) { URL = url; ApplicationName = applicationName; ApplicationVersion = applicationVersion; CheckBeta = checkBeta; this.proxy = proxy; this.updaterFormOptions = updaterFormOptions; }
public UpdaterForm(UpdaterFormOptions options) { InitializeComponent(); Options = options; if (Options.WindowIcon != null) Icon = Options.WindowIcon; lblQuestion.Text = Options.Question; if (!string.IsNullOrEmpty(Options.UpdateInfo.Summary)) { txtVersionHistory.Text = Options.UpdateInfo.Summary; } Text = string.Format("{0} update is available", Options.ProjectName); BringToFront(); Activate(); }