private void OnDisable()
 {
     if (this.m_PackageController.IsUploading)
     {
         UploadDialog.CreateInstance(this.m_PackageController);
     }
     EditorApplication.update = (EditorApplication.CallbackFunction)Delegate.Remove(EditorApplication.update, new EditorApplication.CallbackFunction(this.PackageControllerUpdatePump));
     AssetStoreManager.isOpen = false;
 }
 private static void PackageControllerUpdatePump()
 {
     UploadDialog.packageController.Update();
     if (UploadDialog.packageController.IsUploading)
     {
         float  getUploadProgress = UploadDialog.packageController.GetUploadProgress;
         string text  = string.Format("Uploading {1}... {0}%", (getUploadProgress * 100f).ToString("N0"), UploadDialog.packageController.SelectedPackage.Name);
         string text2 = "Closing this window will stop the ongoing upload process";
         if (EditorUtility.DisplayCancelableProgressBar(text, text2, getUploadProgress))
         {
             UploadDialog.packageController.OnClickUpload();
             UploadDialog.FinishInstance();
         }
     }
     else
     {
         UploadDialog.FinishInstance();
     }
 }