private void btnAddRecess_Click(object sender, RoutedEventArgs e)
 {
     if (tbRecessName.Text == "" || tbRecessWidth.Text == "" || tbRecessHeight.Text == "" || tbRecessDepth.Text == "") // If any inputs are blank
     {
         MessageBox.Show("One or more required inputs is missing");
     }
     else
     {
         try // Catchs any errors that may arise if input data is in correct format
         {
             bool isDoor = false;
             if (cbRecessIsDoor.IsChecked == true)
             {
                 isDoor = true;
             }
             else if (cbRecessIsDoor.IsChecked == false)
             {
                 isDoor = false;
             }
             Recess r = new Recess(tbRecessName.Text, tbRecessWidth.Text, tbRecessHeight.Text, tbRecessDepth.Text, isDoor); // Create new recess object
             recesses.Add(r);                                                                                               // Add inputted data to recess list as recess object
             lbRecesses.Items.Add(r);                                                                                       // Add inputted data to listbox as recess object
             // Resetting all input fields
             tbRecessName.Text        = "";
             tbRecessHeight.Text      = "";
             tbRecessWidth.Text       = "";
             tbRecessDepth.Text       = "";
             cbRecessIsDoor.IsChecked = false;
         }
         catch
         { MessageBox.Show("One or more inputs was in an incorrect format"); }
     }
 }
 private void lbRecesses_Context_Remove(object sender, RoutedEventArgs e)
 {
     if (lbRecesses.SelectedItem == null)
     {
     }                                        // If user attempts to remove non-existant item, do nothing
     else
     {
         Recess selectedRecess = (Recess)lbRecesses.SelectedItem; // Get selected Recess object
         recesses.Remove(selectedRecess);                         // Remove recess from recess list
         lbRecesses.Items.Remove(selectedRecess);                 // Remove recess from listbox
     }
 }