Esempio n. 1
0
        object SETSTRINGVALUE_OnChange_0(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                CrestronString        X;
                X = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this);


                __context__.SourceCodeLine = 18;
                if (Functions.TestForTrue((Functions.BoolToInt(SETSTRINGVALUE == ""))))
                {
                    __context__.SourceCodeLine = 20;
                    STRINGCONTROL.SetString("");
                }

                else
                {
                    __context__.SourceCodeLine = 24;
                    while (Functions.TestForTrue((Functions.BoolToInt(X != SETSTRINGVALUE))))
                    {
                        __context__.SourceCodeLine = 26;
                        X.UpdateValue(SETSTRINGVALUE);
                        __context__.SourceCodeLine = 27;
                        STRINGCONTROL.SetString(X.ToString());
                        __context__.SourceCodeLine = 24;
                    }
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        object CONFIRMUSER_OnPush_1(Object __EventInfo__)

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

                CrestronString UNAME;
                CrestronString PWORD;
                UNAME = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 50, this);
                PWORD = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 50, this);


                __context__.SourceCodeLine = 49;
                UNAME.UpdateValue(CHECKNAME);
                __context__.SourceCodeLine = 50;
                PWORD.UpdateValue(CHECKPASS);
                __context__.SourceCodeLine = 52;
                RESULT = (ushort)(MYSQLCONN.UserInfo(UNAME.ToString(), PWORD.ToString()));
                __context__.SourceCodeLine = 53;
                Trace("Result is {0:d}", (short)RESULT);
                __context__.SourceCodeLine = 55;
                if (Functions.TestForTrue((Functions.BoolToInt(RESULT == 1))))
                {
                    __context__.SourceCodeLine = 56;
                    Functions.Pulse(500, USERISCONFIRMED);
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        object STARTSEARCH_OnPush_0(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                CrestronString        SERVERIP;
                CrestronString        PORTNUM;
                CrestronString        DBNAME;
                CrestronString        NAMECOLUMN;
                CrestronString        USERNAME;
                CrestronString        USERPASS;
                CrestronString        NAMETOFIND;
                CrestronString        GOTBACK;
                SERVERIP   = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 20, this);
                PORTNUM    = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 6, this);
                DBNAME     = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 30, this);
                NAMECOLUMN = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 30, this);
                USERNAME   = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 80, this);
                USERPASS   = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 40, this);
                NAMETOFIND = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 100, this);
                GOTBACK    = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 1000, this);


                __context__.SourceCodeLine = 25;
                NAMETOFIND.UpdateValue(NAMETOQUERY);
                __context__.SourceCodeLine = 26;
                SERVERIP.UpdateValue(SERVERLOCATION);
                __context__.SourceCodeLine = 27;
                PORTNUM.UpdateValue(SERVERPORT);
                __context__.SourceCodeLine = 28;
                DBNAME.UpdateValue(SQL_DATABASE_NAME);
                __context__.SourceCodeLine = 29;
                NAMECOLUMN.UpdateValue(SQL_NAME_COLUMN);
                __context__.SourceCodeLine = 30;
                USERNAME.UpdateValue(SQL_USER_NAME);
                __context__.SourceCodeLine = 31;
                USERPASS.UpdateValue(SQL_USER_PASSWORD);
                __context__.SourceCodeLine = 33;
                try
                {
                    __context__.SourceCodeLine = 35;
                    GOTBACK.UpdateValue(MYSQLCONN.GetData(SERVERIP.ToString(), PORTNUM.ToString(), DBNAME.ToString(), NAMECOLUMN.ToString(), USERNAME.ToString(), USERPASS.ToString(), NAMETOFIND.ToString()));
                    __context__.SourceCodeLine = 36;
                    Trace("Returned Data = {0}", GOTBACK);
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);

                    __context__.SourceCodeLine = 40;
                    Trace("something broke");
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Esempio n. 4
0
        object INITIALIZE_NAMED_CONTROL_OnPush_1(Object __EventInfo__)

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

                __context__.SourceCodeLine = 101;
                MYNAMEDCONTROL.RampTime    = (short)(RAMP_TIME.Value);
                __context__.SourceCodeLine = 102;
                MYNAMEDCONTROL.AddNamedControl(GSNAMEDCONTROL.ToString(), (ushort)(GIID));
                __context__.SourceCodeLine = 103;
                // RegisterEvent( MYNAMEDCONTROL , ONNAMEDCONTROLEVENT , NAMEDCONTROLEVENT )
                try { g_criticalSection.Enter(); MYNAMEDCONTROL.OnNamedControlEvent += NAMEDCONTROLEVENT; } finally { g_criticalSection.Leave(); }
                ;
                __context__.SourceCodeLine = 105;
                Functions.Delay((int)(5));
                __context__.SourceCodeLine = 107;
                if (Functions.TestForTrue((ENABLE_POLL.Value)))
                {
                    __context__.SourceCodeLine = 109;
                    MYNAMEDCONTROL._Poll       = (ushort)(ENABLE_POLL.Value);
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Esempio n. 5
0
        object PRESETNAMEUPDATE_OnChange_7(Object __EventInfo__)

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

                CrestronString ATTRIBUTE;
                ATTRIBUTE = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 50, this);


                __context__.SourceCodeLine = 144;
                I = (ushort)(Functions.GetLastModifiedArrayIndex(__SignalEventArg__));
                __context__.SourceCodeLine = 146;
                if (Functions.TestForTrue((Functions.BoolToInt(PRESETNAMEUPDATE[I] != RHELP.GetName("preset", (ushort)((I - 1)))))))
                {
                    __context__.SourceCodeLine = 148;
                    MakeString(ATTRIBUTE, "preset{0:d2}_name", (ushort)I);
                    __context__.SourceCodeLine = 149;
                    RHELP.UpdateSerial(ATTRIBUTE.ToString(), PRESETNAMEUPDATE[I].ToString());
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Esempio n. 6
0
 private void REGISTER(SplusExecutionContext __context__)
 {
     __context__.SourceCodeLine = 147;
     SP.Register(_SPACEID.ToString(), _SPACENAME.ToString());
 }