Exemple #1
0
        object KEYPAD_ENTER_SELECT_OnPush_1(Object __EventInfo__)

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

                __context__.SourceCodeLine = 64;
                if (Functions.TestForTrue((Functions.BoolToInt((Functions.TestForTrue(Functions.BoolToInt(Functions.Atoi(SK_CHANNEL) > 0)) && Functions.TestForTrue(Functions.BoolToInt(Functions.Length(SK_CHANNEL) <= 7)))))))
                {
                    __context__.SourceCodeLine = 66;
                    SK_CHANNEL.UpdateValue(">" + Functions.ItoA((int)(PARAMETERIZED_UNIT_ID.UshortValue)) + "TC=" + SK_CHANNEL + "\r\n");
                    __context__.SourceCodeLine = 67;
                    TO_DEVICE.UpdateValue(SK_CHANNEL);
                    __context__.SourceCodeLine = 68;
                    SK_CHANNEL.UpdateValue("");
                    __context__.SourceCodeLine = 69;
                    CHANNEL_KEY_IN_TEXT.UpdateValue("");
                    __context__.SourceCodeLine = 70;
                    CHANNEL_KEY_OUT_TEXT.UpdateValue(SK_CHANNEL);
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Exemple #2
0
        object ADD_SLAVE_OnPush_0(Object __EventInfo__)

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

                __context__.SourceCodeLine = 39;
                Print("Add Slave Pushed");
                __context__.SourceCodeLine = 40;
                TO_CONSOLE__DOLLAR__.UpdateValue("ADDPeer " + IP_ID__DOLLAR__ + " " + IP_ADDRESS__DOLLAR__ + "\u000D");
                __context__.SourceCodeLine = 41;
                IP_ADDRESS__DOLLAR__.UpdateValue("");
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        private int GETDISKSPACE(SplusExecutionContext __context__)
        {
            uint SPACE = 0;

            ushort P1    = 0;
            ushort P2    = 0;
            ushort P3    = 0;
            ushort P4    = 0;
            ushort COUNT = 0;

            CrestronString TEMP;

            TEMP = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 250, this);

            ushort I = 0;


            __context__.SourceCodeLine = 110;
            DISKCOMMAND.UpdateValue("");
            __context__.SourceCodeLine = 111;
            DISKSPACE.UpdateValue("");
            __context__.SourceCodeLine = 112;
            I = (ushort)(0);
            __context__.SourceCodeLine = 114;
            DISKCOMMAND.UpdateValue("cd " + PATH__DOLLAR__ + "\r\n" + "free\r\n");
            __context__.SourceCodeLine = 116;
            while (Functions.TestForTrue((Functions.BoolToInt(Functions.Find(">", DISKSPACE) == 0))))
            {
                __context__.SourceCodeLine = 119;
                if (Functions.TestForTrue((Functions.BoolToInt(I == 6))))
                {
                    __context__.SourceCodeLine = 121;
                    return((int)(Functions.ToSignedLongInteger(-(1))));
                }

                __context__.SourceCodeLine = 124;
                I = (ushort)((I + 1));
                __context__.SourceCodeLine = 125;
                Functions.Delay((int)(50));
                __context__.SourceCodeLine = 116;
            }

            __context__.SourceCodeLine = 128;
            SPACE = (uint)(0);
            __context__.SourceCodeLine = 130;
            P1 = (ushort)(Functions.Find(">", DISKSPACE));
            __context__.SourceCodeLine = 132;
            P2 = (ushort)(Functions.Find("bytes free on", DISKSPACE));
            __context__.SourceCodeLine = 134;
            COUNT = (ushort)((P2 - P1));
            __context__.SourceCodeLine = 136;
            TEMP.UpdateValue(Functions.Mid(DISKSPACE, (int)(P1), (int)(COUNT)));
            __context__.SourceCodeLine = 138;
            SPACE = (uint)(Functions.Atol(TEMP));
            __context__.SourceCodeLine = 140;
            P3 = (ushort)(Functions.Find("used\r\n", DISKSPACE));
            __context__.SourceCodeLine = 142;
            P4 = (ushort)(Functions.Find(" bytes reclaimable", DISKSPACE));
            __context__.SourceCodeLine = 144;
            COUNT = (ushort)((P4 - P3));
            __context__.SourceCodeLine = 146;
            TEMP.UpdateValue(Functions.Mid(DISKSPACE, (int)(P3), (int)(COUNT)));
            __context__.SourceCodeLine = 148;
            SPACE = (uint)((SPACE + Functions.Atol(TEMP)));
            __context__.SourceCodeLine = 150;
            return((int)(SPACE));
        }