private void button_Click(object sender, RoutedEventArgs e)
{
if (apiBox.Text == "")
{
MessageBox.Show("You must include an API key", "Error", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK);
}
else
{
ccw.ShowDialog();
if (ccw.DialogResult.HasValue && ccw.DialogResult == true)
{
CC = ccw.CC;
CCA = new ChatCommandApi()
{
Name = CC.Name,
ApiKey = "",
ChatCommand = new ChatCommand()
};
if (apiBox.Text == "")
{
MessageBox.Show("You must include an API key.", "Error", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK);
}
else
{
CCA.ApiKey = apiBox.Text;
}
DialogResult = true;
Close();
}
}
}