private void bgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (!e.Cancelled)
            {
                SmartUpdateXml updateXml = (SmartUpdateXml)e.Result;


                //string version = fvi.FileVersion;
                //업데이트 확인
                if (updateXml != null && updateXml.IsNewerThan(applicationInfo.appId))
                {
                    if (type == 0)
                    {
                        uc_updater.SetVersionState(true, updateXml);
                    }
                    else if (type == 1)
                    {
                        win.SetVersionState(updateXml);
                    }

                    //업데이트 작업

                    //this.DownloadUpdate(updateXml);
                }
                else if (updateXml != null && updateXml.IsEqualsVer(applicationInfo.appId))
                {
                    //같을때
                    if (type == 0)
                    {
                        uc_updater.SetVersionState(false, updateXml);
                    }
                }
            }
        }
        private void bgWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            ISmartUpdatable application = (ISmartUpdatable)e.Argument;

            if (!SmartUpdateXml.ExistsOnServer(application.UpdateXmlLocation))
            {
                e.Cancel = true;
            }
            else
            {
                e.Result = SmartUpdateXml.Parse(application.UpdateXmlLocation, application.ApplicationID);
            }
        }
 public void SetVersionState(bool IsNewVer, SmartUpdateXml updateXml)
 {
     if (IsNewVer)
     {
         this.updateInfo         = updateXml;
         NewVersionTb.Text       = String.Format("New Ver : {0}", updateInfo.Version.ToString());
         IsDownloadState         = true;
         existNewGrid.Visibility = Visibility.Visible;
     }
     else
     {
         updateText.Visibility = Visibility.Visible;
     }
 }
Exemplo n.º 4
0
        public void SetVersionState(SmartUpdateXml updateXml)
        {
            updateText.Text = updateXml.Version.ToString();
            this.updateInfo = updateXml;

            this.application_path = applicationInfo.ApplicationAssembly.Location;
            this.download_uri     = updateInfo.Uri.ToString();
            this.file_list        = updateInfo.FileList;

            this.complete_file_cnt = 0;
            this.total_file_cnt    = file_list.Count;

            complete_file_cnt++;
            this.progressText.Text = String.Format("Downloaded {0} of {1}", /*다운받은 갯수*/ complete_file_cnt, /*전체 파일 갯수*/ total_file_cnt);
        }
Exemplo n.º 5
0
        private void bgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (!e.Cancelled)
            {
                SmartUpdateXml updateXml = (SmartUpdateXml)e.Result;


                //업데이트 확인
                if (updateXml != null && updateXml.IsNewerThan(this.applicationInfo.appId))
                {
                    //업데이트 작업
                    IsAvailableUpdate = true;
                    this.updateXml    = updateXml;
                }
                else if (updateXml != null && updateXml.IsEqualsVer(this.applicationInfo.appId))
                {
                    IsAvailableUpdate = false;
                }
            }
        }
        private void bgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (!e.Cancelled)
            {
                SmartUpdateXml updateXml = (SmartUpdateXml)e.Result;


                //업데이트 확인
                if (updateXml != null && updateXml.IsNewerThan(this.applicationInfo.appId))
                {
                    
                    //업데이트 작업
                    IsAvailableUpdate = true;
                    this.updateXml = updateXml;
                }
                else if (updateXml != null && updateXml.IsEqualsVer(this.applicationInfo.appId))
                {
                    IsAvailableUpdate = false;                    
                }
            }
        }