Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        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);
            }
        }
Beispiel #3
0
 public static void Show()
 {
     canvas.Show();
 }