private void BtnLoadPVKey_Click(object sender, RoutedEventArgs e) { string path = DialogsManager.Open(true); if (!string.IsNullOrWhiteSpace(path)) { if (File.Exists(path)) { tbPVKey.Text = path; dProvider.LoadKey(File.ReadAllText(path)); } else { MessageBox.Show("File not exist.", "RSA Example", MessageBoxButton.OK, MessageBoxImage.Error); } } }