Exemple #1
0
 protected void AddBot_Handler(object sender, RoutedEventArgs e)
 {
     StringInputDialog Dialog = new StringInputDialog();
     Dialog.Prompt = "Bot Name:";
     bool? Result = Dialog.ShowDialog();
     if (Result.HasValue && Result.Value) // Pressed Ok
     {
         BotTreeViewItem Temp;
         if (!Parent.AddBot((string)this.Header, Dialog.Input, out Temp)) // Add the owner
         {
             MessageBox.Show("A bot with that name already exists under this owner.", "Error");
         }
     }
     else
     {
         return;
     }
 }
Exemple #2
0
 protected void AddOwnerHandler(object sender, RoutedEventArgs e)
 {
     StringInputDialog Dialog = new StringInputDialog();
     Dialog.Prompt = "Owner Name:";
     bool? Result = Dialog.ShowDialog();
     if (Result.HasValue && Result.Value) // Pressed Ok
     {
         OwnerTreeViewItem Temp;
         if (!Bots.AddOwner(Dialog.Input, out Temp)) // Add the owner
         {
             MessageBox.Show("An Owner with that name already exists.", "Error");
         }
     }
     else
     {
         return;
     }
 }