Пример #1
0
 private void PackageManager_PackageDownloaded(PackageManager sender, Package target) {
     this.webBrowser1.Document.InvokeScript("UpdatePackageLocalInstallStatus", new object[] { JSON.JsonEncode(target.ToHashTable()), PackageManager.PACKAGE_STATUSCODE_DOWNLOADSUCCESS, "Downloaded" });
 }
Пример #2
0
 private void PackageManager_PackageAwaitingRestart(PackageManager sender, Package target) {
     this.webBrowser1.Document.InvokeScript("UpdatePackageLocalInstallStatus", new object[] { JSON.JsonEncode(target.ToHashTable()), PackageManager.PACKAGE_STATUSCODE_INSTALLQUEUED, "Restart" });
 }
Пример #3
0
        private void focus_DownloadError(Package sender, CDownloadFile file) {
            this.UnregisterEvents(sender);

            if (this.PackageDownloadFail != null) {
                FrostbiteConnection.RaiseEvent(this.PackageDownloadFail.GetInvocationList(), this, sender);
            }
        }
Пример #4
0
        //private void focus_DownloadProgressUpdate(Package sender, CDownloadFile file) {
        //    this.UnregisterEvents(sender);
        //}

        private void focus_DownloadComplete(Package sender, CDownloadFile file) {
            //this.UnregisterEvents(sender);

            if (this.PackageDownloaded != null) {
                FrostbiteConnection.RaiseEvent(this.PackageDownloaded.GetInvocationList(), this, sender);
            }
        }
Пример #5
0
        private void focus_PackageEndUnzip(Package sender) {
            this.UnregisterEvents(sender);

            if (this.PackageAwaitingRestart != null) {
                FrostbiteConnection.RaiseEvent(this.PackageAwaitingRestart.GetInvocationList(), this, sender);
            }
        }
Пример #6
0
 private void focus_PackageBeginUnzip(Package sender) {
     if (this.PackageInstalling != null) {
         FrostbiteConnection.RaiseEvent(this.PackageInstalling.GetInvocationList(), this, sender);
     }
 }
Пример #7
0
 private void RegisterEvents(Package focus) {
     focus.DownloadComplete += new Package.DownloadFileEventHandler(focus_DownloadComplete);
     focus.DownloadError += new Package.DownloadFileEventHandler(focus_DownloadError);
     //focus.DownloadProgressUpdate += new Package.DownloadFileEventHandler(focus_DownloadProgressUpdate);
     focus.PackageBeginUnzip += new Package.PackageEventHandler(focus_PackageBeginUnzip);
     focus.PackageEndUnzip += new Package.PackageEventHandler(focus_PackageEndUnzip);
 }