예제 #1
0
 /// <summary>
 /// Returns the current instance of the Pixelcade API.
 /// </summary>
 /// <returns>New or current instance</returns>
 public static Pixelcade GetInstance()
 {
     if (_instance == null)
     {
         _instance = new Pixelcade();
     }
     _instance.Init();
     return(_instance);
 }
예제 #2
0
 /// <summary>
 /// Returns the current instance of the Pixelcade API.
 /// </summary>
 /// <param name="port">Don't loop through available ports but use this COM port name.</param>
 /// <param name="colorMatrix">RGB or RBG</param>
 /// <returns>New or current instance</returns>
 public static Pixelcade GetInstance(string port, ColorMatrix colorMatrix)
 {
     if (_instance == null)
     {
         _instance = new Pixelcade {
             Port = port, ColorMatrix = colorMatrix
         };
     }
     _instance.Init();
     return(_instance);
 }