public void PaintSimulationZone(SimulationZone simulationZonePair) { string factorValue1 = simulationZonePair.GetValueOf(FactorName1); string factorValue2 = simulationZonePair.GetValueOf(FactorName2); int index1 = values1.IndexOf(factorValue1); if (index1 == -1) { values1.Add(factorValue1); index1 = values1.Count - 1; } int index2 = values2.IndexOf(factorValue2); if (index2 == -1) { values2.Add(factorValue2); index2 = values2.Count - 1; } index1 = index1 % MaximumIndex1; index2 = index2 % MaximumIndex2; Setter1(simulationZonePair.visualElement, index1); Setter2(simulationZonePair.visualElement, index2); }
public void PaintSimulationZone(SimulationZone simulationZonePair) { string factorValue = simulationZonePair.GetValueOf(FactorName); int index = values.IndexOf(factorValue); if (index == -1) { values.Add(factorValue); index = values.Count - 1; } index = index % MaximumIndex; Setter(simulationZonePair.visualElement, index); }