예제 #1
0
        static void SendToScreen1()
        {
            for (int i = 0; i < list.Count; i++)
            {
                Led led = list[i];

                if ((led.IP == "") || (led.IP == "0.0.0.0") || (!led.IsConnected) || (led.state == 0))
                {
                    continue;
                }

                switch (led.state)
                {
                case 10:
                    Close1(i);
                    continue;

                case 11:
                    Open1(i);
                    break;
                }

                LedCommon.DLL_MakeRoot((int)LedCommon.eRootType.ROOT_PLAY, (int)LedCommon.eScreenType.SCREEN_COLOR);
                LedCommon.DLL_AddLeaf(1000);

                LedCommon.RECT r;
                r.left   = 0;
                r.top    = 0;
                r.right  = 256;
                r.bottom = 256;

                int dc = led.mdc.ToInt32();

                LedCommon.DLL_AddWindow(dc, 256, 256, ref r, 1, 8, 1);

                try
                {
                    LedCommon.DLL_LED_SendToScreen(led.dev, led.Addr, led.IP, (ushort)6666);
                }
                catch (Exception e)
                {
                    FUNC.Sleep(100);
                    Close1(i);

                    FUNC.Sleep(100);
                    Open1(i);

                    throw new Exception("SendToScreen(" + i.ToString() + ") Error:" + e.Message);
                }

                FUNC.Sleep(20);
            }
        }
예제 #2
0
        static void SendToScreen3()
        {
            for (int i = 0; i < list.Count; i++)
            {
                Led led = list[i];

                if ((led.IP == "") || (led.IP == "0.0.0.0") || (!led.IsConnected) || (led.state == 0))
                {
                    continue;
                }

                switch (led.state)
                {
                case 10:
                    Close3(i);
                    continue;

                case 11:
                    Open3(i);
                    break;
                }


                try
                {
                    LedDll.LedSend((byte)(i + 1), led.bmp);
                }

                catch (Exception e)
                {
                    FUNC.Sleep(100);
                    Close3(i);

                    FUNC.Sleep(100);
                    Open3(i);

                    throw new Exception("SendToScreen(" + i.ToString() + ") Error:" + e.Message);
                }

                FUNC.Sleep(20);
            }
        }