private button2_Click ( object sender, |
||
sender | object | |
e | ||
return | void |
private void button2_Click(object sender, RoutedEventArgs e) {
if (textBox1.Text.Contains("\\") || textBox1.Text.Contains("/") || textBox1.Text.Contains(":") || textBox1.Text.Contains("?") || textBox1.Text.Contains("*") || textBox1.Text.Contains("<") || textBox1.Text.Contains(">") || textBox1.Text.Contains("|")) {
MessageBox.Show(FindResource("txtIllegalCharacters") as string, "Choose a new name", MessageBoxButton.OK, MessageBoxImage.Error);
}
else {
dialogresult = true;
this.Close();
}
}