private static void Server_EncryptedFilePasswordRequested(object sender, EncryptedFilePasswordRequestedEventArgs e) { Console.WriteLine("Enter password:"); e.Password = Console.ReadLine(); e.Handled = true; IsValid = true; }
private void RichEditControl1_EncryptedFilePasswordRequested(object sender, EncryptedFilePasswordRequestedEventArgs e) { //Count the amount of attempts to enter the password if (tryCount > 0) { tryCount--; } }