public void SetType(string s) { if (s == "4") { Type = KaleidoscopeTypes.Square; } else { Type = KaleidoscopeTypes.Triangle; } }
public void SetType(string s) { if (s == "4") { Type = KaleidoscopeTypes.Square; } else { Type = KaleidoscopeTypes.Triangle; } }
public IKaleidoscope <TNode, TGeometry, TTransformation> Get(KaleidoscopeTypes type) { if (_instanceCache.ContainsKey(type)) { return(_instanceCache[type]); } switch (type) { case KaleidoscopeTypes.Triangle: var triangleInstance = new TriangleKaleidoscope <TNode, TGeometry, TTransformation>(); _instanceCache[type] = triangleInstance; return(triangleInstance); case KaleidoscopeTypes.Square: var squareInstance = new SquareKaleidoscope <TNode, TGeometry, TTransformation>(); _instanceCache[type] = squareInstance; return(squareInstance); } throw new NotImplementedException(); }