コード例 #1
0
        public EmpireUpdater(IEmpireUpdate appInfo)
        {
            this.appInfo = appInfo;

            this.bgWorker                     = new BackgroundWorker();
            this.bgWorker.DoWork             += new DoWorkEventHandler(bgWorker_DoWork);
            this.bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgWorker_RunWorkerCompleted);
        }
コード例 #2
0
ファイル: EmpireUpdater.cs プロジェクト: xzyio/Rotmg-PServer
        public EmpireUpdater(IEmpireUpdate appInfo)
        {
            this.appInfo = appInfo;

            this.bgWorker = new BackgroundWorker();
            this.bgWorker.DoWork += new DoWorkEventHandler(bgWorker_DoWork);
            this.bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgWorker_RunWorkerCompleted);
        }
コード例 #3
0
        internal EmpireUpdateInfoForm(IEmpireUpdate appInfo, EmpireUpdateXml updateInfo)
        {
            InitializeComponent();

            if (appInfo.AppIcon != null)
                this.Icon = appInfo.AppIcon;

            this.Text = appInfo.AppName + " - Update Info";
            this.lblVersions.Text = String.Format("Current Version: {0}\nUpdate Version: {1}", appInfo.AppAssembly.GetName().Version.ToString(), 
                updateInfo.Version.ToString());
            this.txtDescrition.Text = updateInfo.Description;
        }
コード例 #4
0
        private void bgWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            IEmpireUpdate app = (IEmpireUpdate)e.Argument;

            if (!EmpireUpdateXml.ExistsOnServer(app.UpdateXmlLoc))
            {
                e.Cancel = true;
            }
            else
            {
                e.Result = EmpireUpdateXml.Parse(app.UpdateXmlLoc, app.AppID);
            }
        }
コード例 #5
0
        internal EmpireUpdateAcceptForm(IEmpireUpdate appInfo, EmpireUpdateXml updateInfo)
        {
            InitializeComponent();

            this.appInfo = appInfo;
            this.updateInfo = updateInfo;

            this.Text = this.appInfo.AppName + " - Update Available";

            if (this.appInfo.AppIcon != null)
                this.Icon = this.appInfo.AppIcon;

            this.lblNewVersion.Text = string.Format("New Version: {0}", this.updateInfo.Version.ToString());
        }
コード例 #6
0
        internal EmpireUpdateInfoForm(IEmpireUpdate appInfo, EmpireUpdateXml updateInfo)
        {
            InitializeComponent();

            if (appInfo.AppIcon != null)
            {
                this.Icon = appInfo.AppIcon;
            }

            this.Text             = appInfo.AppName + " - Update Info";
            this.lblVersions.Text = String.Format("Current Version: {0}\nUpdate Version: {1}", appInfo.AppAssembly.GetName().Version.ToString(),
                                                  updateInfo.Version.ToString());
            this.txtDescrition.Text = updateInfo.Description;
        }
コード例 #7
0
        internal EmpireUpdateAcceptForm(IEmpireUpdate appInfo, EmpireUpdateXml updateInfo)
        {
            InitializeComponent();

            this.appInfo    = appInfo;
            this.updateInfo = updateInfo;

            this.Text = this.appInfo.AppName + " - Update Available";

            if (this.appInfo.AppIcon != null)
            {
                this.Icon = this.appInfo.AppIcon;
            }

            this.lblNewVersion.Text = string.Format("New Version: {0}", this.updateInfo.Version.ToString());
        }