public void AddItem() { BundleBuildItem[] items = new BundleBuildItem[BundleCount + 1]; for (int i = 0; i < BundleCount; i++) { items[i] = BuildItems[i]; } items[BundleCount] = new BundleBuildItem(); BuildItems = items; }
public void DeleteItem(int index) { if (index >= 0 && index < BundleCount) { if (BundleCount - 1 > 0) { BundleBuildItem[] items = new BundleBuildItem[BundleCount - 1]; for (int i = 0; i < index; i++) { items[i] = BuildItems[i]; } for (int i = index + 1; i < BundleCount; i++) { items[i - 1] = BuildItems[i]; } BuildItems = items; } else { BuildItems = null; } } }