Ejemplo n.º 1
0
        public OnlineUpdater(OnlineUpdatable applicationInfo)
        {
            this.applicationInfo = applicationInfo;

            this.bgWorker = new BackgroundWorker();

            this.bgWorker.DoWork             += new DoWorkEventHandler(bgWorker_DoWork);
            this.bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgWorker_RunWorkerComplete);
        }
Ejemplo n.º 2
0
        private void bgWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            OnlineUpdatable applicatiion = (OnlineUpdatable)e.Argument;

            if (!OnlineUpdateXML.ExistsOnServer(applicatiion.UpdateXmlLocation)) //check if file exists on server
            {
                e.Cancel = true;
            }
            else
            {
                e.Result = OnlineUpdateXML.Parse(applicatiion.UpdateXmlLocation, applicatiion.ApplicationID);
            }
        }
Ejemplo n.º 3
0
        public OnlineUpdateInfoForm(OnlineUpdatable applicationInfo, OnlineUpdateXML updateInfo)
        {
            InitializeComponent();

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

            this.Text = applicationInfo.ApplicationName + " - Update Info";
            this.labelverssions.Text = string.Format("Current Version: {0}\nUpdate Version: {1}",
                                                     applicationInfo.ApplicationAssembley.GetName().Version.ToString(),
                                                     updateInfo.Version.ToString());
            this.richTextBoxDescription.Text = updateInfo.Description;
        }
Ejemplo n.º 4
0
        public OnlineUpdateAcceptForm(OnlineUpdatable applicationInfo, OnlineUpdateXML 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.labelNewVersion.Text = string.Format("New Version: {0}", this.updateInfo.Version.ToString());
        }