public RarFileInfo(IDirectoryInfo parentDir, string rarPath, Schematrix.RARFileInfo rarFileInfo) { _parentDir = parentDir; _rarPath = rarPath; //The rar archive file path _lastModifiedTime = rarFileInfo.FileTime; _size = rarFileInfo.UnpackedSize; _filePath = rarFileInfo.FileName; //Path of the file within the rar archive }
private void unrar_PasswordRequired(object sender, Schematrix.PasswordRequiredEventArgs e) { Schematrix.TextInputDialog dialog=new Schematrix.TextInputDialog(); dialog.Prompt=string.Format("Password is required for extraction."); dialog.PasswordChar='*'; if(dialog.ShowDialog()==DialogResult.OK) { e.Password=dialog.Value; e.ContinueOperation=true; } else e.ContinueOperation=false; }
private void unrar_ExtractionProgress(object sender, Schematrix.ExtractionProgressEventArgs e) { //lblUnrarStatus.Text = e.FileName; //pbarUnrar.Value=(int)e.PercentComplete; SafeInvoke.Invoke(this, "UnrarStatus", e.FileName); SafeInvoke.Invoke(this, "pbarIncUnrar", (int)e.PercentComplete); }
private void unrar_MissingVolume(object sender, Schematrix.MissingVolumeEventArgs e) { Schematrix.TextInputDialog dialog=new Schematrix.TextInputDialog(); dialog.Value=e.VolumeName; dialog.Prompt=string.Format("Volume is missing. Correct or cancel."); if(dialog.ShowDialog()==DialogResult.OK) { e.VolumeName=dialog.Value; e.ContinueOperation=true; } else e.ContinueOperation=false; }
private void AttachHandlers(Schematrix.Unrar unrar) { unrar.ExtractionProgress+=new Schematrix.ExtractionProgressHandler(unrar_ExtractionProgress); unrar.MissingVolume+=new Schematrix.MissingVolumeHandler(unrar_MissingVolume); unrar.PasswordRequired+=new Schematrix.PasswordRequiredHandler(unrar_PasswordRequired); }