private void unrar_PasswordRequired(object sender, PasswordRequiredEventArgs e) { TextInputDialog dialog = new 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_MissingVolume(object sender, MissingVolumeEventArgs e) { TextInputDialog dialog = new 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; } }