コード例 #1
0
        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();
        }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
 public static void DeleteAutoCraft(FCSOperation craft)
 {
     Crafts.Remove(craft);
 }