Пример #1
0
        object TUNER_KEY_OnPush_0(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                ushort ITEMP = 0;


                __context__.SourceCodeLine = 69;
                ITEMP = (ushort)(Functions.GetLastModifiedArrayIndex(__SignalEventArg__));
                __context__.SourceCodeLine = 70;
                if (Functions.TestForTrue((Functions.BoolToInt(ITEMP != 100))))
                {
                    __context__.SourceCodeLine = 72;
                    switch ((int)SELECTED_TUNER.UshortValue)

                    {
                    case 4:

                    {
                        __context__.SourceCodeLine = 76;
                        if (Functions.TestForTrue((Functions.BoolToInt(ITEMP >= 10))))
                        {
                            __context__.SourceCodeLine = 78;
                            if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 10))))
                            {
                                __context__.SourceCodeLine = 80;
                                if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(SFREQ) < 3))))
                                {
                                    __context__.SourceCodeLine = 82;
                                    MakeString(SFREQ, "{0}0", SFREQ);
                                    __context__.SourceCodeLine = 83;
                                    TUNER_FREQUENCY__DOLLAR__.UpdateValue(SFREQ);
                                    __context__.SourceCodeLine = 84;
                                    ITEMP = (ushort)(100);
                                }

                                else
                                {
                                    __context__.SourceCodeLine = 88;
                                    ITEMP = (ushort)(100);
                                }
                            }

                            else
                            {
                                __context__.SourceCodeLine = 91;
                                if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 11))))
                                {
                                    __context__.SourceCodeLine = 93;
                                    if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(SFREQ) > 0))))
                                    {
                                        __context__.SourceCodeLine = 95;
                                        SFREQ.UpdateValue(Functions.Left(SFREQ, (int)((Functions.Length(SFREQ) - 1))));
                                        __context__.SourceCodeLine = 96;
                                        TUNER_FREQUENCY__DOLLAR__.UpdateValue(SFREQ);
                                        __context__.SourceCodeLine = 97;
                                        ITEMP = (ushort)(100);
                                    }
                                }

                                else
                                {
                                    __context__.SourceCodeLine = 100;
                                    if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 12))))
                                    {
                                        __context__.SourceCodeLine = 102;
                                        SFREQ.UpdateValue("");
                                        __context__.SourceCodeLine = 103;
                                        TUNER_FREQUENCY__DOLLAR__.UpdateValue(SFREQ);
                                        __context__.SourceCodeLine = 104;
                                        ITEMP = (ushort)(100);
                                    }

                                    else
                                    {
                                        __context__.SourceCodeLine = 106;
                                        if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 13))))
                                        {
                                            __context__.SourceCodeLine = 108;
                                            MakeString(TO_DEVICE__DOLLAR__, "{0}{1}\r", "!1SCH", SFREQ.PadLeft(3, '0'));
                                            __context__.SourceCodeLine = 109;
                                            SFREQ.UpdateValue("");
                                            __context__.SourceCodeLine = 110;
                                            ITEMP = (ushort)(100);
                                        }

                                        else
                                        {
                                            __context__.SourceCodeLine = 114;
                                            ITEMP = (ushort)(100);
                                        }
                                    }
                                }
                            }
                        }

                        else
                        {
                            __context__.SourceCodeLine = 119;
                            if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(SFREQ) < 3))))
                            {
                                __context__.SourceCodeLine = 121;
                                MakeString(SFREQ, "{0}{1:d}", SFREQ, (short)ITEMP);
                                __context__.SourceCodeLine = 122;
                                TUNER_FREQUENCY__DOLLAR__.UpdateValue(SFREQ);
                                __context__.SourceCodeLine = 123;
                                ITEMP = (ushort)(100);
                            }

                            else
                            {
                                __context__.SourceCodeLine = 127;
                                ITEMP = (ushort)(100);
                            }
                        }

                        __context__.SourceCodeLine = 130;
                        break;
                    }

                        goto case 1;

                    case 1:

                    {
                        __context__.SourceCodeLine = 134;
                        if (Functions.TestForTrue((Functions.BoolToInt(ITEMP >= 10))))
                        {
                            __context__.SourceCodeLine = 136;
                            if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 10))))
                            {
                                __context__.SourceCodeLine = 138;
                                if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(SFREQ) < 5))))
                                {
                                    __context__.SourceCodeLine = 140;
                                    MakeString(SFREQ, "{0}0", SFREQ);
                                    __context__.SourceCodeLine = 141;
                                    MakeString(TUNER_FREQUENCY__DOLLAR__, "{0} kHz", SFREQ);
                                    __context__.SourceCodeLine = 142;
                                    ITEMP = (ushort)(100);
                                }

                                else
                                {
                                    __context__.SourceCodeLine = 146;
                                    ITEMP = (ushort)(100);
                                }
                            }

                            else
                            {
                                __context__.SourceCodeLine = 149;
                                if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 11))))
                                {
                                    __context__.SourceCodeLine = 151;
                                    if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(SFREQ) > 0))))
                                    {
                                        __context__.SourceCodeLine = 153;
                                        SFREQ.UpdateValue(Functions.Left(SFREQ, (int)((Functions.Length(SFREQ) - 1))));
                                        __context__.SourceCodeLine = 154;
                                        MakeString(TUNER_FREQUENCY__DOLLAR__, "{0} kHz", SFREQ);
                                        __context__.SourceCodeLine = 155;
                                        ITEMP = (ushort)(100);
                                    }
                                }

                                else
                                {
                                    __context__.SourceCodeLine = 158;
                                    if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 12))))
                                    {
                                        __context__.SourceCodeLine = 160;
                                        SFREQ.UpdateValue("");
                                        __context__.SourceCodeLine = 161;
                                        TUNER_FREQUENCY__DOLLAR__.UpdateValue(SFREQ);
                                        __context__.SourceCodeLine = 162;
                                        ITEMP = (ushort)(100);
                                    }

                                    else
                                    {
                                        __context__.SourceCodeLine = 164;
                                        if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 13))))
                                        {
                                            __context__.SourceCodeLine = 166;
                                            MakeString(TO_DEVICE__DOLLAR__, "{0}{1}\r", STUNER, SFREQ.PadLeft(5, '0'));
                                            __context__.SourceCodeLine = 167;
                                            SFREQ.UpdateValue("");
                                            __context__.SourceCodeLine = 168;
                                            ITEMP = (ushort)(100);
                                        }
                                    }
                                }
                            }
                        }

                        else
                        {
                            __context__.SourceCodeLine = 173;
                            if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(SFREQ) < 5))))
                            {
                                __context__.SourceCodeLine = 175;
                                MakeString(SFREQ, "{0}{1:d}", SFREQ, (short)ITEMP);
                                __context__.SourceCodeLine = 176;
                                MakeString(TUNER_FREQUENCY__DOLLAR__, "{0} kHz", SFREQ);
                                __context__.SourceCodeLine = 177;
                                ITEMP = (ushort)(100);
                            }

                            else
                            {
                                __context__.SourceCodeLine = 181;
                                ITEMP = (ushort)(100);
                            }
                        }

                        __context__.SourceCodeLine = 184;
                        break;
                    }

                        goto case 2;

                    case 2:

                    {
                        __context__.SourceCodeLine = 188;
                        if (Functions.TestForTrue((Functions.BoolToInt(ITEMP >= 10))))
                        {
                            __context__.SourceCodeLine = 190;
                            if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 10))))
                            {
                                __context__.SourceCodeLine = 192;
                                if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(SFREQ) < 5))))
                                {
                                    __context__.SourceCodeLine = 194;
                                    MakeString(SFREQ, "{0}0", SFREQ);
                                    __context__.SourceCodeLine = 195;
                                    MakeString(TUNER_FREQUENCY__DOLLAR__, "{0} MHz", SFREQ);
                                    __context__.SourceCodeLine = 196;
                                    ITEMP = (ushort)(100);
                                }

                                else
                                {
                                    __context__.SourceCodeLine = 200;
                                    ITEMP = (ushort)(100);
                                }
                            }

                            else
                            {
                                __context__.SourceCodeLine = 203;
                                if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 11))))
                                {
                                    __context__.SourceCodeLine = 205;
                                    if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(SFREQ) > 0))))
                                    {
                                        __context__.SourceCodeLine = 207;
                                        SFREQ.UpdateValue(Functions.Left(SFREQ, (int)((Functions.Length(SFREQ) - 1))));
                                        __context__.SourceCodeLine = 208;
                                        MakeString(TUNER_FREQUENCY__DOLLAR__, "{0} MHz", SFREQ);
                                        __context__.SourceCodeLine = 209;
                                        ITEMP = (ushort)(100);
                                    }
                                }

                                else
                                {
                                    __context__.SourceCodeLine = 212;
                                    if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 12))))
                                    {
                                        __context__.SourceCodeLine = 214;
                                        SFREQ.UpdateValue("");
                                        __context__.SourceCodeLine = 215;
                                        TUNER_FREQUENCY__DOLLAR__.UpdateValue(SFREQ);
                                        __context__.SourceCodeLine = 216;
                                        ITEMP = (ushort)(100);
                                    }

                                    else
                                    {
                                        __context__.SourceCodeLine = 218;
                                        if (Functions.TestForTrue((Functions.BoolToInt(ITEMP == 13))))
                                        {
                                            __context__.SourceCodeLine = 220;
                                            MakeString(TO_DEVICE__DOLLAR__, "{0}{1}\r", STUNER, SFREQ.PadLeft(5, '0'));
                                            __context__.SourceCodeLine = 221;
                                            SFREQ.UpdateValue("");
                                            __context__.SourceCodeLine = 222;
                                            ITEMP = (ushort)(100);
                                        }

                                        else
                                        {
                                            __context__.SourceCodeLine = 226;
                                            ITEMP = (ushort)(100);
                                        }
                                    }
                                }
                            }
                        }

                        else
                        {
                            __context__.SourceCodeLine = 231;
                            if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(SFREQ) < 5))))
                            {
                                __context__.SourceCodeLine = 233;
                                MakeString(SFREQ, "{0}{1:d}", SFREQ, (short)ITEMP);
                                __context__.SourceCodeLine = 234;
                                MakeString(TUNER_FREQUENCY__DOLLAR__, "{0} MHz", SFREQ);
                                __context__.SourceCodeLine = 235;
                                ITEMP = (ushort)(100);
                            }

                            else
                            {
                                __context__.SourceCodeLine = 239;
                                ITEMP = (ushort)(100);
                            }
                        }

                        __context__.SourceCodeLine = 242;
                        break;
                    }

                        goto default;

                    default:

                    {
                        __context__.SourceCodeLine = 246;
                        ITEMP = (ushort)(100);
                        __context__.SourceCodeLine = 247;
                        break;
                    }
                    break;
                    }
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }