Exemplo n.º 1
0
 protected void OnVerifyFolder(FilesEventArgs e)
 {
     if (e == null)
     {
         throw new ArgumentNullException("e");
     }
     if (this.VerifyFolder != null)
     {
         this.VerifyFolder(this, e);
     }
 }
Exemplo n.º 2
0
 protected void OnExtractFiles(FilesEventArgs e)
 {
     if (e == null)
     {
         throw new ArgumentNullException("e");
     }
     if (this.ExtractFiles != null)
     {
         this.ExtractFiles(this, e);
     }
 }
Exemplo n.º 3
0
 private void VerifyFiles(object sender, FilesEventArgs e)
 {
     using (TaskDialog taskDialog = new TaskDialog(new Predicate <NexonArchiveFileEntry>(MainForm.VerifyFilesHelper), e.Files))
     {
         taskDialog.Text = "Verifying files...";
         DialogResult result = taskDialog.ShowDialog(this);
         if (result == DialogResult.Abort)
         {
             MessageBox.Show("An error occured while verifying the files.", "Error");
         }
         else if (result == DialogResult.OK)
         {
             MessageBox.Show("All the selected files have been verified successfully.", "Verification Complete");
         }
     }
 }
Exemplo n.º 4
0
 private void treeView_ShowFolder(object sender, FilesEventArgs e)
 {
     this.pathToolStripStatusLabel.Text = e.Path;
     this.listView.FullPath             = e.Path;
     this.listView.BeginUpdate();
     this.listView.Items.Clear();
     this.listView_SelectedIndexChanged(this, EventArgs.Empty);
     if (e.Files != null)
     {
         foreach (NexonArchiveFileEntry entry in e.Files)
         {
             this.listView.AddFile(entry);
         }
     }
     this.listView.EndUpdate();
     this.listView_SelectedIndexChanged(this, EventArgs.Empty);
 }
Exemplo n.º 5
0
 private void ExtractFiles(object sender, FilesEventArgs e)
 {
     if (this.extractFolderBrowserDialog.ShowDialog() == DialogResult.OK)
     {
         MainForm.ExtractHelper extractHelper = new MainForm.ExtractHelper();
         extractHelper.DecryptModels = Settings.Default.AutoDecryptModels;
         extractHelper.ExtractPath   = this.extractFolderBrowserDialog.SelectedPath;
         using (TaskDialog taskDialog = new TaskDialog(new Predicate <NexonArchiveFileEntry>(extractHelper.Extract), e.Files))
         {
             taskDialog.Text            = "Extracting files...";
             taskDialog.DestinationPath = extractHelper.ExtractPath;
             DialogResult result = taskDialog.ShowDialog(this);
             if (result == DialogResult.Abort)
             {
                 MessageBox.Show("An error occured while extracting the files.", "Error");
             }
             else if (result == DialogResult.OK)
             {
                 MessageBox.Show("All the selected files have been extracted successfully.", "Extraction Complete");
             }
         }
     }
 }