예제 #1
0
 public void Execute(FileRelease release)
 {
     Release = release;
     lblVersion.Text = release.Number.ToString();
     lblRelease.Text = release.Release.ToString("d MMMM yyyy");
     lblSize.Text = String.Format("{0:N2} ko", (double)release.Size / 1024);
     txtHistory.Text = release.History;
     txtSavePath.Text = Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
     NextStep();
     Show();
 }
예제 #2
0
 public UpdateAvailabledEventArgs(FileRelease release)
 {
     Release = release;
 }
예제 #3
0
 public UpdateAvailabledEventArgs(FileRelease release)
 {
     Release = release;
 }
예제 #4
0
        private void CheckUpdate()
        {
            using (CIV.CentralCenterClient.CentralCenterServiceReference.CentralCenterSoapClient client = new CIV.CentralCenterClient.CentralCenterServiceReference.CentralCenterSoapClient())
            {
                if (client.IsCompatibleClient(App.VersionStr()))
                {
                    if (client.IsLastVersion("CIV", CurrentVersion.ToString()))
                        DoUpdateNotAvailable();
                    else
                    {
                        CIV.CentralCenterClient.CentralCenterServiceReference.ReleaseBO lastReleaseBO = client.GetLastVersion("CIV");

                        _lastVersion = new CIVVersion(lastReleaseBO.Number);

                        if (LastVersion.CompareTo(CurrentVersion) > 0)
                        {
                            FileRelease release = new FileRelease()
                            {
                                Number = new CIVVersion(lastReleaseBO.Number),
                                Release = lastReleaseBO.Release,
                                Size = lastReleaseBO.Size,
                                Url = lastReleaseBO.Url,
                                History = lastReleaseBO.History,
                                CRC = lastReleaseBO.CRC
                            };
                            DoUpdateAvailable(new UpdateAvailabledEventArgs(release));
                        }
                        else
                            DoUpdateNotAvailable();
                    }
                }
                else if (IsNotCompatibleClient != null)
                    IsNotCompatibleClient(this, null);
            }
        }