Example #1
0
 private void SpecialAreaEdit_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         MenuItem lbItem = sender as MenuItem;
         var dataContext = lbItem.DataContext;
         SpecialArea data = (SpecialArea)dataContext;
         CbSpecialLoc window = new CbSpecialLoc(data);
         window.Owner = this;
         window.ShowDialog();
     }
     catch (Exception ex)
     {
         Helpers.Debug.Report(ex);
     }
 }
Example #2
0
 private void SpecialAreaAdd_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SpecialArea newArea = new SpecialArea("NewArea", 0, 0, 0, 0, WalkSender.Walking);
         CaveBot.Instance.SpecialAreasList.Add(newArea);
         windowCbSpecialLoc = new CbSpecialLoc(newArea);
         windowCbSpecialLoc.Owner = this;
         windowCbSpecialLoc.ShowDialog();
     }
     catch (Exception ex)
     {
         Helpers.Debug.Report(ex);
     }
 }