private void DownloadCompleted(ContentOperationCallbackArgs e)
 {
     base.SetStatus("<LOC>Download Complete.", 0xbb8, new object[0]);
     try
     {
         SupcomMapList.RefreshMaps();
     }
     catch (Exception exception)
     {
         ErrorLog.WriteLine(exception);
     }
     if (this.OnDownloadComplete != null)
     {
         this.OnDownloadComplete(this, EventArgs.Empty);
     }
 }
 private void AdditionalContent_FinishDelete(ContentOperationCallbackArgs e)
 {
     if ((!base.Disposing && !base.IsDisposed) && e.CompletedSuccessfully)
     {
         this.RefreshActionButtons();
     }
 }
 private void DownloadStarted(ContentOperationCallbackArgs e)
 {
     VGen0 method = null;
     if ((base.InvokeRequired && !base.Disposing) && !base.IsDisposed)
     {
         if (method == null)
         {
             method = delegate {
                 this.DownloadStarted(e);
             };
         }
         base.BeginInvoke(method);
     }
     else if (!base.Disposing && !base.IsDisposed)
     {
         try
         {
             base.SetStatus("<LOC>Downloading {0}...", 0xbb8, new object[] { e.Content.ContentType.SingularDisplayName });
             this.gvResults.InvalidateRows();
             this.Cursor = Cursors.Default;
         }
         catch (Exception exception)
         {
             ErrorLog.WriteLine(exception);
         }
     }
 }
 private void DownloadCompleted(ContentOperationCallbackArgs e)
 {
     VGen0 method = null;
     try
     {
         base.SetStatus("<LOC>Download Complete.", 0xbb8, new object[0]);
         if (((e.CompletedSuccessfully && base.IsHandleCreated) && !base.Disposing) && !base.IsDisposed)
         {
             if (method == null)
             {
                 method = delegate {
                     this.gvResults.InvalidateRows();
                 };
             }
             base.BeginInvoke(method);
         }
     }
     catch (Exception exception)
     {
         ErrorLog.WriteLine(exception);
     }
 }
 private void DownloadStarted(ContentOperationCallbackArgs e)
 {
     base.SetStatus("<LOC>Downloading {0}...", 0xbb8, new object[] { e.Content.ContentType.SingularDisplayName });
 }
 private static void DownloadOperation_Finished(ContentOperationCallbackArgs e)
 {
     mDownloadTarget = null;
     if (FinishDownloadContent != null)
     {
         FinishDownloadContent(e);
     }
 }
 private void AdditionalContent_FinishDelete(ContentOperationCallbackArgs e)
 {
 }
 private void AdditionalContent_FinishDeleteMyUpload(ContentOperationCallbackArgs e)
 {
     try
     {
         bool allVersions = (bool) e.Args[0];
         TreeNode[] nodes = this.NodeMyUploads.Nodes.Find(this.TreeNodeName(e.Content), true);
         if (!base.Disposing && !base.IsDisposed)
         {
             base.BeginInvoke((VGen0)delegate {
                 Predicate<IAdditionalContent> match = null;
                 Predicate<IAdditionalContent> predicate2 = null;
                 string localFilePath = e.Content.LocalFilePath;
                 foreach (TreeNode node in nodes)
                 {
                     if (!e.Content.CanVersion || allVersions)
                     {
                         node.Remove();
                         if (match == null)
                         {
                             match = delegate (IAdditionalContent content) {
                                 return (content.TypeID == e.Content.TypeID) && (content.Name == e.Content.Name);
                             };
                         }
                         this.MyUploads.RemoveAll(match);
                     }
                     else if (!(node.Parent.Tag is ContentType) && ((node.Tag as IAdditionalContent).ID == e.Content.ID))
                     {
                         IAdditionalContent tag = node.Tag as IAdditionalContent;
                         if (tag.Version == tag.CurrentVersion)
                         {
                             if (predicate2 == null)
                             {
                                 predicate2 = delegate (IAdditionalContent content) {
                                     return ((content.TypeID == e.Content.TypeID) && (content.Name == e.Content.Name)) && (content.Version == content.CurrentVersion);
                                 };
                             }
                             this.MyUploads.RemoveAll(predicate2);
                             if ((node.NextNode == null) || (node.Parent.Nodes.Count <= 1))
                             {
                                 localFilePath = (node.Parent.Tag as IAdditionalContent).LocalFilePath;
                                 TreeNode root = node.Parent.Parent;
                                 node.Parent.Remove();
                                 this.RefreshToolstrip();
                                 this.TreeRootCount(root);
                                 goto Label_02BE;
                             }
                             IAdditionalContent content2 = AdditionalContent.Clone(node.NextNode.Tag as IAdditionalContent);
                             content2.LocalFilePath = (node.Parent.Tag as IAdditionalContent).LocalFilePath;
                             node.Parent.Tag = content2;
                             this.MyUploads.Add(node.Parent.Tag as IAdditionalContent);
                             foreach (IAdditionalContent content3 in this.MyUploads)
                             {
                                 if ((content3.TypeID == tag.TypeID) && (content3.Name == tag.Name))
                                 {
                                     content3.CurrentVersion--;
                                 }
                             }
                         }
                         node.Remove();
                         break;
                     }
                 }
             Label_02BE:
                 foreach (TreeNode node3 in this.NodeMyUploads.Nodes)
                 {
                     if (node3.Nodes.Count < 1)
                     {
                         node3.Remove();
                     }
                     else
                     {
                         this.TreeRootCount(node3);
                     }
                 }
                 if (Path.HasExtension(e.Content.LocalFilePath))
                 {
                     this.ValidateUploadFile(e.Content.LocalFilePath, true);
                 }
                 else if ((e.Content.LocalFilePath != null) && (e.Content.LocalFilePath.Length > 0))
                 {
                     foreach (string str2 in Directory.GetFiles(e.Content.LocalFilePath))
                     {
                         this.ValidateUploadFile(str2, true);
                     }
                 }
                 this.RefreshToolstrip();
             });
         }
     }
     catch (Exception exception)
     {
         ErrorLog.WriteLine(exception);
     }
 }
 private void AdditionalContent_FinishUploadContent(ContentOperationCallbackArgs e)
 {
     WaitCallback callBack = null;
     VGen0 method = null;
     IAdditionalContent content = e.Content;
     try
     {
         VGen0 gen = null;
         IAdditionalContent item = AdditionalContent.Clone(content);
         this.MyUploads.Add(item);
         foreach (IAdditionalContent content2 in this.MyUploads)
         {
             if ((content2.TypeID == content.TypeID) && (content2.Name == content.Name))
             {
                 content2.CurrentVersion = content.Version;
             }
         }
         this.AddUploadContentNode(this.NodeMyUploads, item, false);
         TreeNode[] availableNodes = this.NodeAvailableUploads.Nodes.Find(this.TreeNodeName(content), true);
         if (availableNodes.Length > 0)
         {
             if (base.Disposing || base.IsDisposed)
             {
                 return;
             }
             if (gen == null)
             {
                 gen = delegate {
                     foreach (TreeNode node in availableNodes)
                     {
                         TreeNode root = node.Parent;
                         node.Remove();
                         this.TreeRootCount(root);
                         if (this.SelectedUploadTreeNode == node)
                         {
                             this.BindToUploadContent();
                         }
                     }
                 };
             }
             base.Invoke(gen);
         }
         base.SetStatus("<LOC>Upload complete.", 0xbb8, new object[0]);
         this.UploadStatus("<LOC>Upload complete.", new object[0]);
         if (callBack == null)
         {
             callBack = delegate (object s) {
                 Thread.Sleep(0xbb8);
                 this.UploadStatus(this.PreviousUploadStatus, new object[0]);
             };
         }
         ThreadPool.QueueUserWorkItem(callBack);
     }
     catch (Exception exception)
     {
         ErrorLog.WriteLine(exception);
         base.SetStatus("<LOC>An error occured during upload.", 0xbb8, new object[0]);
     }
     finally
     {
         if (!base.Disposing && !base.IsDisposed)
         {
             if (method == null)
             {
                 method = delegate {
                     foreach (TreeNode node in this.treeViewUpload.Nodes.Find(this.TreeNodeName(content), true))
                     {
                         node.ImageIndex = content.ContentType.ImageIndex;
                         node.SelectedImageIndex = content.ContentType.ImageIndex;
                     }
                     this.RefreshToolstrip();
                 };
             }
             base.BeginInvoke(method);
         }
     }
 }
 private void AdditionalContent_BeginUploadContent(ContentOperationCallbackArgs e)
 {
     VGen0 method = null;
     if ((base.InvokeRequired && !base.Disposing) && !base.IsDisposed)
     {
         if (method == null)
         {
             method = delegate {
                 this.AdditionalContent_BeginUploadContent(e);
             };
         }
         base.BeginInvoke(method);
     }
     else if (!base.Disposing && !base.IsDisposed)
     {
         this.PreviousUploadStatus = this.NodeUploadSearch.Text;
         base.SetStatus("<LOC>Uploading {0}...", 0xbb8, new object[] { e.Content.ContentType.SingularDisplayName });
         this.UploadStatus("<LOC>Uploading {0}...", new object[] { e.Content.ContentType.SingularDisplayName });
         this.PreviousUploadStatus = this.NodeUploadSearch.Text;
         this.RefreshToolstrip();
         foreach (TreeNode node in this.treeViewUpload.Nodes.Find(this.TreeNodeName(e.Content), true))
         {
             node.ImageIndex = 4;
             node.SelectedImageIndex = 4;
         }
         this.ChangePanel(ContentVaultTabs.Activity);
     }
 }
 private void AdditionalContent_FinishDelete(ContentOperationCallbackArgs e)
 {
     this.RefreshMyContent();
     this.BindToMyContent();
 }
 private void AdditionalContent_BeginDeleteMyUpload(ContentOperationCallbackArgs e)
 {
 }
 private void Operation_OperationFinished(ContentOperationCallbackArgs e)
 {
     VGen0 method = null;
     if ((base.InvokeRequired && !base.Disposing) && !base.IsDisposed)
     {
         if (method == null)
         {
             method = delegate {
                 this.OnOperationFinished();
             };
         }
         base.BeginInvoke(method);
     }
     else if (!(base.Disposing || base.IsDisposed))
     {
         this.OnOperationFinished();
     }
 }
 private static void UploadOperation_Finished(ContentOperationCallbackArgs e)
 {
     mUploadingContent = false;
     if (FinishUploadContent != null)
     {
         FinishUploadContent(e);
     }
 }
 private void DownloadCompleted(ContentOperationCallbackArgs e)
 {
     if ((!base.Disposing && !base.IsDisposed) && e.CompletedSuccessfully)
     {
         this.RefreshActionButtons();
     }
 }
 private void MonitorUploadContent(ContentOperationCallbackArgs e)
 {
     VGen0 method = null;
     if ((base.InvokeRequired && !base.Disposing) && !base.IsDisposed)
     {
         if (method == null)
         {
             method = delegate {
                 this.MonitorUploadContent(e);
             };
         }
         base.Invoke(method);
     }
     else if (!base.Disposing && !base.IsDisposed)
     {
         int num = 6;
         ActivityMonitor monitor = e.ActiveOperation.CreateActivityMonitor();
         monitor.Left = 0;
         monitor.Top = 0;
         monitor.RemoveMonitor += new EventHandler(this.RemoveUploadMonitor);
         foreach (ActivityMonitor monitor2 in this.ActiveUploads)
         {
             monitor2.Top += monitor.Height + num;
         }
         this.gpgPanelUpActivity.Controls.Add(monitor);
         monitor.Width = this.gpgPanelUpActivity.Width;
         monitor.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
         this.ActiveUploads.Add(monitor);
     }
 }
 private void DownloadStarted(ContentOperationCallbackArgs e)
 {
     this.RefreshActionButtons();
 }
 private static void AdditionalContent_FinishDownloadContent(ContentOperationCallbackArgs e)
 {
     FinishDownloadContent = (ContentOperationCallback) Delegate.Remove(FinishDownloadContent, new ContentOperationCallback(AdditionalContent.AdditionalContent_FinishDownloadContent));
     e.ActiveOperation.SetStatus("<LOC>Update complete.", 0xbb8, new object[0]);
 }