Exemple #1
0
        public ExamCenterUpdater(ExamCenterUpdatable applicationInfo)
        {
            this.applicationInfo = applicationInfo;

            this.bgWorker                     = new BackgroundWorker();
            this.bgWorker.DoWork             += new DoWorkEventHandler(BgWorker_DoWork);
            this.bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BgWorker_RunWorkerCompleted);
        }
Exemple #2
0
        private void BgWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            ExamCenterUpdatable application = (ExamCenterUpdatable)e.Argument;

            if (!ExamCenterUpdateXml.ExistsOnServer(application.UpdateXmlLocation))
            {
                e.Cancel = true;
            }
            else
            {
                e.Result = ExamCenterUpdateXml.Parse(application.UpdateXmlLocation, application.ApplicationID);
            }
        }
        public ExamCenterUpdateInfo(ExamCenterUpdatable applicationInfo, ExamCenterUpdateXml updateInfo)
        {
            InitializeComponent();

            if (applicationInfo.ApplicationIcon != null)
            {
                this.Icon = applicationInfo.ApplicationIcon;
            }

            this.Text             = applicationInfo.ApplicationName + " - Update Info";
            this.lblVersions.Text = String.Format("Current Version: {0}\nUpdate Version {1}", applicationInfo.ApplicationAssembly.GetName().Version.ToString(),
                                                  updateInfo.Version.ToString());
            this.txtDescription.Text = updateInfo.Description;
        }
        internal ExamCenterUpdateAcceptForm(ExamCenterUpdatable applicationInfo, ExamCenterUpdateXml updateInfo)
        {
            InitializeComponent();

            this.applicationInfo = applicationInfo;
            this.updateInfo      = updateInfo;

            this.Text = this.applicationInfo.ApplicationName + " - Update Available";

            if (this.applicationInfo.ApplicationIcon != null)
            {
                this.Icon = this.applicationInfo.ApplicationIcon;
            }

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