Esempio n. 1
0
 protected override ISampleString CreateInstance(string type)
 {
     if (type == "Point")
     {
         return(PointSampleString.CreateInstance());
     }
     else if (type == "Matrix")
     {
         return(MatrixSampleString.CreateInstance());
     }
     else if (type == "Vector")
     {
         return(VectorSampleString.CreateInstance());
     }
     else if (type == "Point3D")
     {
         return(Point3DSampleString.CreateInstance());
     }
     else if (type == "Vector3D")
     {
         return(Vector3DSampleString.CreateInstance());
     }
     else if (type == "Size3D")
     {
         return(Size3DSampleString.CreateInstance());
     }
     else if (type == "Point4D")
     {
         return(Point4DSampleString.CreateInstance());
     }
     else
     {
         return(null);
     }
 }
Esempio n. 2
0
 public static ISampleString CreateInstance()
 {
     if (Size3DSample == null)
     {
         //lock (CntrolObj)
         //{
         //if (Size3DSample == null)
         // {
         Size3DSample = new Size3DSampleString();
         // }
         //}
     }
     return(Size3DSample);
 }