private void DoCommit()
 {
   if (this.commitMessage == string.Empty && !EditorUtility.DisplayDialog("Commit without description", "Are you sure you want to commit with empty commit description message?", "Commit", "Cancel"))
     GUIUtility.ExitGUI();
   bool refreshCommit = AssetServer.GetRefreshCommit();
   ASCommitWindow asCommitWindow = new ASCommitWindow(this, ASCommitWindow.GetParentViewSelectedItems(this.pv, true, false).ToArray());
   asCommitWindow.InitiateReinit();
   if ((refreshCommit || asCommitWindow.lastTransferMovedDependencies) && (!refreshCommit && !EditorUtility.DisplayDialog("Committing with dependencies", "Assets selected for committing have dependencies that will also be committed. Press Details to view full changeset", "Commit", "Details") || refreshCommit))
   {
     this.committing = false;
     this.selectedPage = ASMainWindow.Page.Commit;
     asCommitWindow.description = this.commitMessage;
     if (refreshCommit)
       asCommitWindow.showReinitedWarning = 1;
     this.asCommitWin = asCommitWindow;
     this.Repaint();
     GUIUtility.ExitGUI();
   }
   else
   {
     string[] itemsToCommit = asCommitWindow.GetItemsToCommit();
     AssetServer.SetAfterActionFinishedCallback("ASEditorBackend", "CBOverviewsCommitFinished");
     AssetServer.DoCommitOnNextTick(this.commitMessage, itemsToCommit);
     AssetServer.SetLastCommitMessage(this.commitMessage);
     asCommitWindow.AddToCommitMessageHistory(this.commitMessage);
     this.committing = false;
     GUIUtility.ExitGUI();
   }
 }
 private void SelectedPageChanged()
 {
   AssetServer.ClearAssetServerError();
   if (this.committing)
     this.CancelCommit();
   switch (this.selectedPage)
   {
     case ASMainWindow.Page.Overview:
       if (ASEditorBackend.SettingsAreValid())
       {
         AssetServer.CheckForServerUpdates();
         if (this.UpdateNeedsRefresh())
         {
           this.InitiateUpdateStatusWithCallback("CBInitOverviewPage");
           break;
         }
         this.InitOverviewPage(true);
         break;
       }
       this.connectionString = "Asset Server connection for current project is not set up";
       this.sharedChangesets = new Changeset[0];
       this.changesetContents = new GUIContent[0];
       this.needsSetup = true;
       break;
     case ASMainWindow.Page.Update:
       this.InitUpdatePage(true);
       break;
     case ASMainWindow.Page.Commit:
       this.asCommitWin = new ASCommitWindow(this, !this.pvHasSelection ? (string[]) null : ASCommitWindow.GetParentViewSelectedItems(this.pv, true, false).ToArray());
       this.asCommitWin.InitiateReinit();
       break;
     case ASMainWindow.Page.History:
       this.pageTitles[3] = "History";
       this.InitHistoryPage(true);
       break;
     case ASMainWindow.Page.ServerConfig:
       this.pageTitles[3] = "Connection";
       this.asConfigWin = new ASConfigWindow(this);
       break;
     case ASMainWindow.Page.Admin:
       this.pageTitles[3] = "Administration";
       this.asAdminWin = new ASServerAdminWindow(this);
       if (!this.error)
         break;
       break;
   }
 }