예제 #1
0
파일: MainForm.cs 프로젝트: Jaex/SMBStats
        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);
            }
        }
예제 #2
0
 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;
 }
예제 #3
0
        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();
        }