private void Button_Click(object sender, RoutedEventArgs e)
{
if (txtSize.IsEnabled == true)
{
bool noerror = true;
try
{
long blah = Convert.ToInt64(txtSize.Text);
}
catch
{
noerror = false;
}
if (noerror == true)
{
yep = true;
this.Close();
}
else
{
MessageBox.Show("The value entered in the Drive Size field is not a valid number.", "Error Must Be Resolved", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
else
{
yep = true;
this.Close();
}
}