public void OnCraftDelete() { var result = MessageBox.Show("Are you sure you want to delete this craft?\n\nALL JOBS TIED TO THIS CRAFT WILL BE DELETED AND THEIR CONFIGURATION LOST!", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning); if (result == MessageBoxResult.Yes) { SelectedCraft.Jobs.Clear(); Crafts.Remove(SelectedCraft); } Globals.ChangesMade = true; // Jobs will have been deleted, so make sure joblist is updated LoadJobs(); // Reload documents without deleted craft ImportDocuments(); }
/// <summary> /// Removes a craft and its related info /// </summary> /// <param name="craft"></param> private void RemoveCraft(CraftInfo craft) { Crafts.Remove(craft); //olvCraftList.SmallImageList.Images.Remove(craft.Thumb); //olvCraftList.LargeImageList.Images.Remove(craft.Thumb); }
public static void DeleteAutoCraft(FCSOperation craft) { Crafts.Remove(craft); }