예제 #1
0
        //DeletePart
        public bool DeletePart(int i)
        {
            bool success = false;

            for (int j = 0; j < AllParts.Count; j++)
            {
                if (AllParts[j].PartID.Equals(i))
                {
                    AllParts.RemoveAt(CurrentPartIndex);
                    return(success = true);
                }
                else
                {
                    MessageBox.Show("Removal failed.");
                    return(false);
                }
            }
            return(success);
        }
예제 #2
0
 // Remove Part by Part.
 internal static void RemovePart(Part part)
 {
     AllParts.RemoveAt(CurrentPartIndex);
 }
예제 #3
0
 // SwapParts.
 internal static void SwapPart(Part part)
 {
     AllParts.Insert(CurrentPartIndex, part);
     AllParts.RemoveAt(CurrentPartIndex + 1);
 }
예제 #4
0
 public static bool deletePart(int i)
 {
     AllParts.RemoveAt(i);
     return(true);
 }
예제 #5
0
 public static void updatePart(int i, Part part)
 {
     AllParts.Insert(i, part);
     AllParts.RemoveAt(i + 1);
 }
 public static void UpdatePart(int idx, Part selectedPart)
 {
     AllParts.Insert(idx, selectedPart);
     AllParts.RemoveAt(idx + 1);
 }
예제 #7
0
 public static void updatePart(int k, Part part)
 {
     AllParts.RemoveAt(k);
     AllParts.Add(part);
 }