static void Main(string[] args) { var test = AppDomain.CurrentDomain.BaseDirectory; var libDir = Directory.GetParent(test).Parent.Parent.Parent.Parent; SetDllDirectory(Path.Combine(libDir.FullName, "00_lib")); var canvas = new LED3DCanvas(); // var filter = new LED3DWaveCanvasFilter(canvas); // var filter = new LED3DSurfaceCanvasFilter(canvas); var filter = new LED3DWaveCanvasFilter(new LED3DHsvColorFilter(canvas)); // filter = null; int testcase = 5; var showCases = new List <IShowCase>(); showCases.Add(new CircleOnCube()); showCases.Add(new RectangleOnCube()); showCases.Add(new RippleOnCube()); showCases.Add(new AtFieldOnCube()); showCases.Add(new AngelOnCube()); showCases.Add(new RippleOnWaveCube()); showCases[testcase].SetUp(canvas, filter); showCases[testcase].Run(canvas, filter); while (true) { canvas.Show(); LED.Wait(10); } }
static void Main(string[] args) { var test = AppDomain.CurrentDomain.BaseDirectory; var libDir = Directory.GetParent(test).Parent.Parent.Parent.Parent; SetDllDirectory(Path.Combine(libDir.FullName, "00_lib")); var cmds = Environment.GetCommandLineArgs(); if (cmds.Length > 1) { Debug.WriteLine("Target IP: " + cmds[1]); LEDLIB.LED.SetUrl(cmds[1]); } var canvas = new LED3DCanvas(); // var filter = new LED3DWaveCanvasFilter(canvas); // var filter = new LED3DSurfaceCanvasFilter(canvas); var filter = new LED3DWaveCanvasFilter(new LED3DHsvColorFilter(canvas)); // LED3DCanvasFilter filter = null; int testcase = 5; var showCases = new List <IShowCase>(); showCases.Add(new CircleOnCube()); showCases.Add(new RectangleOnCube()); showCases.Add(new RippleOnCube()); showCases.Add(new AtFieldOnCube()); showCases.Add(new AngelOnCube()); showCases.Add(new RippleOnWaveCube()); showCases.Add(new BallOnCube()); showCases[testcase].SetUp(canvas, filter); showCases[testcase].Run(canvas, filter); while (true) { canvas.Show(); LED.Wait(10); } }