public Cluster(String n, Implant s, Implant b, Implant f, ImprovementType type) { ClusterName = n; Shining = s; Bright = b; Faded = f; Category = type; ID = NextID++; }
private void AddShining(ComboBox cbo, Implant imp) { foreach (Cluster c in Clusters) { if (c.Shining.ImplantType == imp.ImplantType) { cbo.Items.Add(c); } } }
private void AddFaded(ComboBox cbo, Implant imp) { foreach (Cluster c in Clusters) { if (c.Faded.ImplantType == imp.ImplantType) { cbo.Items.Add(c); } } }
private void SetTag(ComboBox cbo, String name, Implant imp) { if (cbo.Name.Length < name.Length) { return; } if (cbo.Name.Substring(0, name.Length) == name) { cbo.Tag = imp; } }
private void AddImplant(Implant imp) { bool Found = false; foreach (ImplantItem item in listImplants.Items) { if (imp.ImplantType == item.ItemImplant.ImplantType) { Found = true; } } if (Found == false) { listImplants.Items.Add(new ImplantItem(imp)); } }