private void CheckElement(ElementInstance element) { if (element.GetAttributeValue("Status") == "Pożądany") { element.Color = element.Definition.Colors[1]; } else { element.Color = element.Definition.Colors[0]; } }
private void CheckElement(ElementInstance element) { if (element.GetTokenAmount(GetTokenDefinition(0)) >= int.Parse(element.GetAttributeValue("Cena"))) { element.Color = element.Definition.Colors[1]; element.SetAttributeValue("Czy kupiony?", "Tak"); } else { element.Color = element.Definition.Colors[0]; element.SetAttributeValue("Czy kupiony?", "Nie"); } }