private ushort VOLUMEPERCENTTOI (  SplusExecutionContext __context__, CrestronString STR ) 
     { 
     ushort FRACTION = 0;
     
     
     __context__.SourceCodeLine = 214;
     FRACTION = (ushort) ( ((Byte( STR , (int)( 3 ) ) * 256) + Byte( STR , (int)( 4 ) )) ) ; 
     __context__.SourceCodeLine = 215;
     if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( FRACTION > 32767 ))  ) ) 
         { 
         __context__.SourceCodeLine = 216;
         _SplusNVRAM.VOLUME = (ushort) ( (((Byte( STR , (int)( 2 ) ) + 1) * 65535) / 100) ) ; 
         } 
     
     else 
         { 
         __context__.SourceCodeLine = 219;
         _SplusNVRAM.VOLUME = (ushort) ( ((Byte( STR , (int)( 2 ) ) * 65535) / 100) ) ; 
         } 
     
     __context__.SourceCodeLine = 221;
     _SplusNVRAM.RETURNI = (ushort) ( _SplusNVRAM.VOLUME ) ; 
     __context__.SourceCodeLine = 223;
     return (ushort)( _SplusNVRAM.RETURNI) ; 
     
     }
 private CrestronString ITOVOLUMEPERCENT (  SplusExecutionContext __context__, ushort INT ) 
     { 
     
     __context__.SourceCodeLine = 226;
     _SplusNVRAM.VOLUME = (ushort) ( ((INT * 100) / 65535) ) ; 
     __context__.SourceCodeLine = 227;
     _SplusNVRAM.RETURNSTRING  .UpdateValue ( "\u0000" + Functions.Chr (  (int) ( _SplusNVRAM.VOLUME ) ) + "\u0000\u0000"  ) ; 
     __context__.SourceCodeLine = 228;
     return ( _SplusNVRAM.RETURNSTRING ) ; 
     
     }
 private void SEND (  SplusExecutionContext __context__, CrestronString STR1 ) 
     { 
     
     __context__.SourceCodeLine = 126;
     _SplusNVRAM.CHECKSUM = (ushort) ( 0 ) ; 
     __context__.SourceCodeLine = 127;
     _SplusNVRAM.SENDSTRING  .UpdateValue ( ""  ) ; 
     __context__.SourceCodeLine = 128;
     ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
     ushort __FN_FOREND_VAL__1 = (ushort)Functions.Length( STR1 ); 
     int __FN_FORSTEP_VAL__1 = (int)1; 
     for ( _SplusNVRAM.I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (_SplusNVRAM.I  >= __FN_FORSTART_VAL__1) && (_SplusNVRAM.I  <= __FN_FOREND_VAL__1) ) : ( (_SplusNVRAM.I  <= __FN_FORSTART_VAL__1) && (_SplusNVRAM.I  >= __FN_FOREND_VAL__1) ) ; _SplusNVRAM.I  += (ushort)__FN_FORSTEP_VAL__1) 
         { 
         __context__.SourceCodeLine = 130;
         _SplusNVRAM.CHECKSUM = (ushort) ( (_SplusNVRAM.CHECKSUM ^ Byte( STR1 , (int)( _SplusNVRAM.I ) )) ) ; 
         __context__.SourceCodeLine = 131;
         if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (Byte( STR1 , (int)( _SplusNVRAM.I ) ) == 2) ) || Functions.TestForTrue ( Functions.BoolToInt (Byte( STR1 , (int)( _SplusNVRAM.I ) ) == 3) )) ) ) || Functions.TestForTrue ( Functions.BoolToInt (Byte( STR1 , (int)( _SplusNVRAM.I ) ) == 6) )) ) ) || Functions.TestForTrue ( Functions.BoolToInt (Byte( STR1 , (int)( _SplusNVRAM.I ) ) == 21) )) ) ) || Functions.TestForTrue ( Functions.BoolToInt (Byte( STR1 , (int)( _SplusNVRAM.I ) ) == 27) )) ))  ) ) 
             { 
             __context__.SourceCodeLine = 133;
             MakeString ( _SplusNVRAM.SENDSTRING , "{0}\u001B{1}", _SplusNVRAM.SENDSTRING , Functions.Chr (  (int) ( (Byte( STR1 , (int)( _SplusNVRAM.I ) ) + 128) ) ) ) ; 
             } 
         
         else 
             { 
             __context__.SourceCodeLine = 137;
             MakeString ( _SplusNVRAM.SENDSTRING , "{0}{1}", _SplusNVRAM.SENDSTRING , Functions.Chr (  (int) ( Byte( STR1 , (int)( _SplusNVRAM.I ) ) ) ) ) ; 
             } 
         
         __context__.SourceCodeLine = 128;
         } 
     
     __context__.SourceCodeLine = 140;
     if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (_SplusNVRAM.CHECKSUM == 2) ) || Functions.TestForTrue ( Functions.BoolToInt (_SplusNVRAM.CHECKSUM == 3) )) ) ) || Functions.TestForTrue ( Functions.BoolToInt (_SplusNVRAM.CHECKSUM == 6) )) ) ) || Functions.TestForTrue ( Functions.BoolToInt (_SplusNVRAM.CHECKSUM == 21) )) ) ) || Functions.TestForTrue ( Functions.BoolToInt (_SplusNVRAM.CHECKSUM == 27) )) ))  ) ) 
         { 
         __context__.SourceCodeLine = 142;
         MakeString ( COMTX__DOLLAR__ , "\u0002{0}\u001B{1}\u0003", _SplusNVRAM.SENDSTRING , Functions.Chr (  (int) ( (_SplusNVRAM.CHECKSUM + 128) ) ) ) ; 
         } 
     
     else 
         { 
         __context__.SourceCodeLine = 146;
         MakeString ( COMTX__DOLLAR__ , "\u0002{0}{1}\u0003", _SplusNVRAM.SENDSTRING , Functions.Chr (  (int) ( _SplusNVRAM.CHECKSUM ) ) ) ; 
         } 
     
     
     }
 private CrestronString ITOSTRING (  SplusExecutionContext __context__, ushort INT , ushort SIZE ) 
     { 
     
     __context__.SourceCodeLine = 153;
     _SplusNVRAM.RETURNSTRING  .UpdateValue ( ""  ) ; 
     __context__.SourceCodeLine = 154;
     if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( INT <= 255 ))  ) ) 
         { 
         __context__.SourceCodeLine = 156;
         ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
         ushort __FN_FOREND_VAL__1 = (ushort)(SIZE - 1); 
         int __FN_FORSTEP_VAL__1 = (int)1; 
         for ( _SplusNVRAM.I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (_SplusNVRAM.I  >= __FN_FORSTART_VAL__1) && (_SplusNVRAM.I  <= __FN_FOREND_VAL__1) ) : ( (_SplusNVRAM.I  <= __FN_FORSTART_VAL__1) && (_SplusNVRAM.I  >= __FN_FOREND_VAL__1) ) ; _SplusNVRAM.I  += (ushort)__FN_FORSTEP_VAL__1) 
             { 
             __context__.SourceCodeLine = 158;
             _SplusNVRAM.RETURNSTRING  .UpdateValue ( _SplusNVRAM.RETURNSTRING + "\u0000"  ) ; 
             __context__.SourceCodeLine = 156;
             } 
         
         __context__.SourceCodeLine = 160;
         _SplusNVRAM.RETURNSTRING  .UpdateValue ( _SplusNVRAM.RETURNSTRING + Functions.Chr (  (int) ( INT ) )  ) ; 
         } 
     
     else 
         { 
         __context__.SourceCodeLine = 164;
         ushort __FN_FORSTART_VAL__2 = (ushort) ( 1 ) ;
         ushort __FN_FOREND_VAL__2 = (ushort)(SIZE - 2); 
         int __FN_FORSTEP_VAL__2 = (int)1; 
         for ( _SplusNVRAM.I  = __FN_FORSTART_VAL__2; (__FN_FORSTEP_VAL__2 > 0)  ? ( (_SplusNVRAM.I  >= __FN_FORSTART_VAL__2) && (_SplusNVRAM.I  <= __FN_FOREND_VAL__2) ) : ( (_SplusNVRAM.I  <= __FN_FORSTART_VAL__2) && (_SplusNVRAM.I  >= __FN_FOREND_VAL__2) ) ; _SplusNVRAM.I  += (ushort)__FN_FORSTEP_VAL__2) 
             { 
             __context__.SourceCodeLine = 166;
             _SplusNVRAM.RETURNSTRING  .UpdateValue ( _SplusNVRAM.RETURNSTRING + "\u0000"  ) ; 
             __context__.SourceCodeLine = 164;
             } 
         
         __context__.SourceCodeLine = 168;
         _SplusNVRAM.RETURNSTRING  .UpdateValue ( _SplusNVRAM.RETURNSTRING + Functions.Chr (  (int) ( Functions.High( (ushort) INT ) ) ) + Functions.Chr (  (int) ( Functions.Low( (ushort) INT ) ) )  ) ; 
         } 
     
     __context__.SourceCodeLine = 170;
     return ( _SplusNVRAM.RETURNSTRING ) ; 
     
     }
 private CrestronString RECEIVE (  SplusExecutionContext __context__, CrestronString STR2 ) 
     { 
     
     __context__.SourceCodeLine = 153;
     _SplusNVRAM.RECEIVESTRING  .UpdateValue ( ""  ) ; 
     __context__.SourceCodeLine = 154;
     ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
     ushort __FN_FOREND_VAL__1 = (ushort)Functions.Length( STR2 ); 
     int __FN_FORSTEP_VAL__1 = (int)1; 
     for ( _SplusNVRAM.J  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (_SplusNVRAM.J  >= __FN_FORSTART_VAL__1) && (_SplusNVRAM.J  <= __FN_FOREND_VAL__1) ) : ( (_SplusNVRAM.J  <= __FN_FORSTART_VAL__1) && (_SplusNVRAM.J  >= __FN_FOREND_VAL__1) ) ; _SplusNVRAM.J  += (ushort)__FN_FORSTEP_VAL__1) 
         { 
         __context__.SourceCodeLine = 156;
         if ( Functions.TestForTrue  ( ( Functions.BoolToInt (Byte( STR2 , (int)( _SplusNVRAM.J ) ) == 27))  ) ) 
             { 
             __context__.SourceCodeLine = 158;
             _SplusNVRAM.RECEIVESTRING  .UpdateValue ( _SplusNVRAM.RECEIVESTRING + Functions.Chr (  (int) ( (Byte( STR2 , (int)( (_SplusNVRAM.J + 1) ) ) - 128) ) )  ) ; 
             __context__.SourceCodeLine = 159;
             _SplusNVRAM.J = (ushort) ( (_SplusNVRAM.J + 1) ) ; 
             } 
         
         else 
             { 
             __context__.SourceCodeLine = 163;
             _SplusNVRAM.RECEIVESTRING  .UpdateValue ( _SplusNVRAM.RECEIVESTRING + Functions.Chr (  (int) ( Byte( STR2 , (int)( _SplusNVRAM.J ) ) ) )  ) ; 
             } 
         
         __context__.SourceCodeLine = 154;
         } 
     
     __context__.SourceCodeLine = 166;
     while ( Functions.TestForTrue  ( ( Functions.BoolToInt (Byte( _SplusNVRAM.RECEIVESTRING , (int)( 1 ) ) == 6))  ) ) 
         { 
         __context__.SourceCodeLine = 168;
         _SplusNVRAM.RECEIVESTRING  .UpdateValue ( Functions.Right ( _SplusNVRAM.RECEIVESTRING ,  (int) ( (Functions.Length( _SplusNVRAM.RECEIVESTRING ) - 1) ) )  ) ; 
         __context__.SourceCodeLine = 166;
         } 
     
     __context__.SourceCodeLine = 170;
     return ( _SplusNVRAM.RECEIVESTRING ) ; 
     
     }
Example #6
0
        object TRANSITION_TIME_OnChange_13(Object __EventInfo__)

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


                __context__.SourceCodeLine = 297;
                ITRTIME = (ushort)(TRANSITION_TIME.UshortValue);
                __context__.SourceCodeLine = 298;
                MakeString(STEMP, "TIM:{0:d}", (short)ITRTIME);
                __context__.SourceCodeLine = 299;
                SENDSTRING(__context__, STEMP);
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Example #7
0
        object TOD__DOLLAR___OnChange_0(Object __EventInfo__)

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


                __context__.SourceCodeLine = 101;
                if (Functions.TestForTrue((Functions.BoolToInt((Functions.TestForTrue(Functions.Find(SWARN, Functions.Mid(TOD__DOLLAR__, (int)(9), (int)(6)))) && Functions.TestForTrue(Functions.BoolToInt(ICANCEL == 0)))))))
                {
                    __context__.SourceCodeLine = 103;
                    Functions.Pulse(10, WARNING);
                }

                __context__.SourceCodeLine = 106;
                if (Functions.TestForTrue((Functions.Find(STIME, Functions.Mid(TOD__DOLLAR__, (int)(9), (int)(6))))))
                {
                    __context__.SourceCodeLine = 108;
                    if (Functions.TestForTrue((Functions.BoolToInt(ICANCEL == 0))))
                    {
                        __context__.SourceCodeLine = 108;
                        Functions.Pulse(10, TRIGGER);
                    }

                    else
                    {
                        __context__.SourceCodeLine = 109;
                        ICANCEL = (short)(0);
                    }
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Example #8
0
        public void __SPLS_TMPVAR__WAITLABEL_14___CallbackFn(object stateInfo)
        {
            try
            {
                Wait __LocalWait__ = (Wait)stateInfo;
                SplusExecutionContext __context__ = SplusThreadStartCode(__LocalWait__);
                __LocalWait__.RemoveFromList();


                __context__.SourceCodeLine = 265;
                if (Functions.TestForTrue((Functions.BoolToInt(NEW_PASSWORD_FB.Value == 0))))
                {
                    __context__.SourceCodeLine = 267;
                    if (Functions.TestForTrue((SHOWASTERISK.Value)))
                    {
                        __context__.SourceCodeLine = 269;
                        PASSWORD_TXT__DOLLAR__.UpdateValue(_SplusNVRAM.PRIVATE_PASSWORD__DOLLAR__);
                    }

                    else
                    {
                        __context__.SourceCodeLine = 273;
                        PASSWORD_TXT__DOLLAR__.UpdateValue(_SplusNVRAM.PASSWORD_ENTERED__DOLLAR__);
                    }
                }

                else
                {
                    __context__.SourceCodeLine = 276;
                    if (Functions.TestForTrue((Functions.BoolToInt((Functions.TestForTrue(Functions.BoolToInt(NEW_PASSWORD_FB.Value == 1)) && Functions.TestForTrue(Functions.BoolToInt(NEW_PASSWORD_REQ.Value == 0)))))))
                    {
                        __context__.SourceCodeLine = 278;
                        PASSWORD_TXT__DOLLAR__.UpdateValue(_SplusNVRAM.NEW_PASSWORD_ENTERED__DOLLAR__);
                    }
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(); }
        }
        object NUMBER_OnChange_0(Object __EventInfo__)

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


                __context__.SourceCodeLine = 17;
                while (Functions.TestForTrue((Functions.BoolToInt(X != NUMBER.UshortValue))))
                {
                    __context__.SourceCodeLine = 19;
                    X = (ushort)(NUMBER.UshortValue);
                    __context__.SourceCodeLine = 21;
                    if (Functions.TestForTrue((LOAD.Value)))
                    {
                        __context__.SourceCodeLine = 23;
                        SNAPSHOT.LoadSnapshot((ushort)(X));
                    }

                    else
                    {
                        __context__.SourceCodeLine = 25;
                        if (Functions.TestForTrue((SAVE.Value)))
                        {
                            __context__.SourceCodeLine = 27;
                            SNAPSHOT.SaveSnapshot((ushort)(X));
                        }
                    }

                    __context__.SourceCodeLine = 17;
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        private void FPROCESSTEXT(SplusExecutionContext __context__, ushort IINDEX, CrestronString STEMP1, CrestronString STEMP2)
        {
            __context__.SourceCodeLine = 66;

            {
                int __SPLS_TMPVAR__SWTCH_1__ = ((int)ICOLUMNS);

                {
                    if (Functions.TestForTrue((__SPLS_TMPVAR__SWTCH_1__ == (1))))
                    {
                        __context__.SourceCodeLine = 68;
                        TX__DOLLAR__1 [IINDEX].UpdateValue(FHTML(__context__, STEMP1, (ushort)(1)));
                    }

                    else if (Functions.TestForTrue((__SPLS_TMPVAR__SWTCH_1__ == (2))))
                    {
                        __context__.SourceCodeLine = 69;
                        TX__DOLLAR__1 [IINDEX].UpdateValue(FHTML(__context__, STEMP1, (ushort)(1)) + "\u000d" + FHTML(__context__, STEMP2, (ushort)(2)));
                    }
                }
            }
        }
Example #11
0
 private void GETINFO(SplusExecutionContext __context__)
 {
     __context__.SourceCodeLine    = 29;
     NEWPROGRAM.Value              = (ushort)(0);
     __context__.SourceCodeLine    = 30;
     EXISTINGPROGRAM.Value         = (ushort)(0);
     __context__.SourceCodeLine    = 31;
     DIFFERENTPROGRAM.Value        = (ushort)(0);
     __context__.SourceCodeLine    = 32;
     DIFFERENTCOMPILEDONDATE.Value = (ushort)(0);
     __context__.SourceCodeLine    = 34;
     DONEFLAG = (ushort)(0);
     __context__.SourceCodeLine = 36;
     Functions.ClearBuffer(CONSOLE_RX__DOLLAR__);
     __context__.SourceCodeLine = 37;
     Functions.ClearBuffer(TEMPSOURCEFILE);
     __context__.SourceCodeLine = 38;
     Functions.ClearBuffer(TEMPCOMPILEDON);
     __context__.SourceCodeLine = 39;
     __context__.SourceCodeLine = 42;
     MakeString(CONSOLE_TX__DOLLAR__, "PROGCOMMENTS:{0:d}\r\n", (short)GetProgramNumber());
 }
 private ushort VOLUMEPERCENTROUND (  SplusExecutionContext __context__, CrestronString STR ) 
     { 
     
     __context__.SourceCodeLine = 189;
     _SplusNVRAM.ROUNDPART = (ushort) ( ((Byte( STR , (int)( 3 ) ) * 256) + Byte( STR , (int)( 4 ) )) ) ; 
     __context__.SourceCodeLine = 190;
     if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( _SplusNVRAM.ROUNDPART > 32767 ))  ) ) 
         { 
         __context__.SourceCodeLine = 191;
         _SplusNVRAM.RETURNI = (ushort) ( (Byte( STR , (int)( 2 ) ) + 1) ) ; 
         } 
     
     else 
         { 
         __context__.SourceCodeLine = 194;
         _SplusNVRAM.RETURNI = (ushort) ( Byte( STR , (int)( 2 ) ) ) ; 
         } 
     
     __context__.SourceCodeLine = 196;
     return (ushort)( _SplusNVRAM.RETURNI) ; 
     
     }
        private void SENDUSAGEEVENTS(SplusExecutionContext __context__)
        {
            ushort I = 0;


            __context__.SourceCodeLine = 94;
            ushort __FN_FORSTART_VAL__1 = (ushort)(1);
            ushort __FN_FOREND_VAL__1   = (ushort)_SplusNVRAM.G_IUSAGETEXTCOUNT;
            int    __FN_FORSTEP_VAL__1  = (int)1;

            for (I = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ((I >= __FN_FORSTART_VAL__1) && (I <= __FN_FOREND_VAL__1)) : ((I <= __FN_FORSTART_VAL__1) && (I >= __FN_FOREND_VAL__1)); I += (ushort)__FN_FORSTEP_VAL__1)
            {
                __context__.SourceCodeLine = 96;
                TO_RV_DEVICE_USAGE__DOLLAR__.UpdateValue(_SplusNVRAM.G_SUSAGETEXT [I]);
                __context__.SourceCodeLine = 94;
            }

            __context__.SourceCodeLine    = 99;
            _SplusNVRAM.G_IUSAGETEXTCOUNT = (ushort)(0);
            __context__.SourceCodeLine    = 100;
            QUE_COUNT.Value = (ushort)(_SplusNVRAM.G_IUSAGETEXTCOUNT);
        }
Example #14
0
        object PST_SELECT_OnChange_11(Object __EventInfo__)

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


                __context__.SourceCodeLine = 281;
                IPST = (ushort)(PST_SELECT.UshortValue);
                __context__.SourceCodeLine = 282;
                MakeString(STEMP, "PST:{0:d}", (short)IPST);
                __context__.SourceCodeLine = 283;
                SENDSTRING(__context__, STEMP);
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Example #15
0
        object RX__DOLLAR___OnChange_12(Object __EventInfo__)

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


                __context__.SourceCodeLine = 615;
                try
                {
                    __context__.SourceCodeLine = 617;
                    while (Functions.TestForTrue((1)))
                    {
                        __context__.SourceCodeLine = 619;
                        STEMP.UpdateValue(Functions.Gather("\u000D\u000A", RX__DOLLAR__));
                        __context__.SourceCodeLine = 620;
                        if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(STEMP) > 0))))
                        {
                            __context__.SourceCodeLine = 621;
                            PARSERESPONSE(__context__, STEMP);
                        }

                        __context__.SourceCodeLine = 617;
                    }
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Example #16
0
        public override object FunctionMain(object __obj__)
        {
            try
            {
                SplusExecutionContext __context__ = SplusFunctionMainStartCode();

                __context__.SourceCodeLine = 135;
                // RegisterDelegate( PROCESSOR , ONISREGISTERED , ONINITIALIZATIONCOMPLETE )
                PROCESSOR.onIsRegistered   = ONINITIALIZATIONCOMPLETE;;
                __context__.SourceCodeLine = 136;
                // RegisterDelegate( FADER , NEWVOLUMECHANGE , ONVOLUMECHANGE )
                FADER.newVolumeChange      = ONVOLUMECHANGE;;
                __context__.SourceCodeLine = 137;
                // RegisterDelegate( FADER , NEWMUTECHANGE , ONMUTECHANGE )
                FADER.newMuteChange        = ONMUTECHANGE;;
                __context__.SourceCodeLine = 138;
                FADER.Initialize(COMPONENTNAME.ToString());
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(); }
            return(__obj__);
        }
        object UI_FIELD_QTY_OnChange_7(Object __EventInfo__)

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

                __context__.SourceCodeLine = 430;
                G_IPAGEQTY = (ushort)((48 / UI_FIELD_QTY.UshortValue));
                __context__.SourceCodeLine = 431;
                G_IBARGRAPHUNIT            = (ushort)((65535 / UI_FIELD_QTY.UshortValue));
                __context__.SourceCodeLine = 433;
                if (Functions.TestForTrue((Mod(48, UI_FIELD_QTY.UshortValue))))
                {
                    __context__.SourceCodeLine = 435;
                    G_IPAGEQTY = (ushort)((G_IPAGEQTY + 1));
                }

                __context__.SourceCodeLine = 438;
                if (Functions.TestForTrue((DEBUG.Value)))
                {
                    __context__.SourceCodeLine = 440;
                    Trace("UI Field Qty Change.\r\n");
                    __context__.SourceCodeLine = 441;
                    Trace("  MaxFields:{0:d}\r\n", (ushort)48);
                    __context__.SourceCodeLine = 442;
                    Trace("  UIFieldQty:{0:d}\r\n", (ushort)UI_FIELD_QTY.UshortValue);
                    __context__.SourceCodeLine = 443;
                    Trace("  PageQty:{0:d}\r\n", (ushort)G_IPAGEQTY);
                }

                __context__.SourceCodeLine = 446;
                SETENABLEBUTTONS(__context__);
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Example #18
0
        object PING_UDP_OnPush_8(Object __EventInfo__)

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

                __context__.SourceCodeLine = 558;
                if (Functions.TestForTrue((Functions.BoolToInt(HASCURRENT == 0))))
                {
                    __context__.SourceCodeLine = 559;
                    GETCURRENT(__context__);
                }

                __context__.SourceCodeLine = 560;
                SENDCOMMAND(__context__, "PN\u000D\0x0A");
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Example #19
0
        private void SETDEFAULTS(SplusExecutionContext __context__)
        {
            ushort I = 0;


            __context__.SourceCodeLine = 113;
            ushort __FN_FORSTART_VAL__1 = (ushort)(1);
            ushort __FN_FOREND_VAL__1   = (ushort)50;
            int    __FN_FORSTEP_VAL__1  = (int)1;

            for (I = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ((I >= __FN_FORSTART_VAL__1) && (I <= __FN_FOREND_VAL__1)) : ((I <= __FN_FORSTART_VAL__1) && (I >= __FN_FOREND_VAL__1)); I += (ushort)__FN_FORSTEP_VAL__1)
            {
                __context__.SourceCodeLine = 115;
                if (Functions.TestForTrue((Functions.BoolToInt(CHANDEFAULTS[I].Value > 0))))
                {
                    __context__.SourceCodeLine = 117;
                    FC.FavsUpdate((ushort)(CHANDEFAULTS[I].Value), (ushort)(I));
                }

                __context__.SourceCodeLine = 113;
            }
        }
Example #20
0
        object KEYIN__POUND___OnChange_1(Object __EventInfo__)

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

                __context__.SourceCodeLine = 177;
                if (Functions.TestForTrue((Functions.BoolToInt(FC.UpdaterConnected == 1))))
                {
                    __context__.SourceCodeLine = 179;
                    if (Functions.TestForTrue((Functions.BoolToInt((Functions.TestForTrue(Functions.BoolToInt(FAVINEDIT > 0)) && Functions.TestForTrue(Functions.BoolToInt(EDITOR == 1)))))))
                    {
                        __context__.SourceCodeLine = 181;
                        KEYIN.UpdateValue(Functions.ItoA((int)(KEYIN__POUND__.UshortValue)));
                        __context__.SourceCodeLine = 182;
                        KEYSTATUS.UpdateValue(Functions.ItoA((int)(KEYIN__POUND__.UshortValue)));
                        __context__.SourceCodeLine = 183;
                        KEYSTATUS__POUND__.Value   = (ushort)(KEYIN__POUND__.UshortValue);
                        __context__.SourceCodeLine = 185;
                        FC.FavsUpdate((ushort)(Functions.Atoi(KEYIN)), (ushort)(FAVINEDIT));
                        __context__.SourceCodeLine = 186;
                        RESETALL(__context__);
                    }
                }

                else
                {
                    __context__.SourceCodeLine = 189;
                    /* Trace( "[{0:d}]Not attatched to fav... no update possible", (short)FAVID  .Value) */;
                    __context__.SourceCodeLine = 190;
                    RESETALL(__context__);
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Example #21
0
        public override object FunctionMain(object __obj__)
        {
            try
            {
                SplusExecutionContext __context__ = SplusFunctionMainStartCode();

                __context__.SourceCodeLine = 203;
                WaitForInitializationComplete( );
                __context__.SourceCodeLine = 204;
                while (Functions.TestForTrue((1)))
                {
                    __context__.SourceCodeLine = 205;
                    UPDATE_TIMES(__context__);
                    __context__.SourceCodeLine = 206;
                    Functions.Delay((int)(200));
                    __context__.SourceCodeLine = 204;
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(); }
            return(__obj__);
        }
        private short CYCLELOG(SplusExecutionContext __context__, short IFILEHANDLE)
        {
            short IARCHHANDLE = 0;
            short COUNT       = 0;

            CrestronString READBUF;

            READBUF = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 500, this);


            __context__.SourceCodeLine = 65;
            FileDelete(G_ARCHIVEFILE);
            __context__.SourceCodeLine = 68;
            FileSeek((short)(IFILEHANDLE), (uint)(0), (ushort)(0));
            __context__.SourceCodeLine = 70;
            IARCHHANDLE = (short)(FileOpen(G_ARCHIVEFILE, (ushort)((256 | 1) | 16384)));
            __context__.SourceCodeLine = 72;
            while (Functions.TestForTrue((Functions.BoolToInt((Functions.TestForTrue(Functions.BoolToInt(FileEOF((short)(IFILEHANDLE)) == 0)) && Functions.TestForTrue(Functions.BoolToInt(IARCHHANDLE > 0)))))))
            {
                __context__.SourceCodeLine = 74;
                COUNT = (short)(FileRead((short)(IFILEHANDLE), READBUF, (ushort)(500)));
                __context__.SourceCodeLine = 75;
                FileWrite((short)(IARCHHANDLE), READBUF, (ushort)(COUNT));
                __context__.SourceCodeLine = 72;
            }

            __context__.SourceCodeLine = 78;
            FileClose((short)(IFILEHANDLE));
            __context__.SourceCodeLine = 79;
            FileClose((short)(IARCHHANDLE));
            __context__.SourceCodeLine = 81;
            FileDelete(G_FILENAME);
            __context__.SourceCodeLine = 83;
            IFILEHANDLE = (short)(FileOpen(G_FILENAME, (ushort)((256 | 1) | 16384)));
            __context__.SourceCodeLine = 85;
            FileWrite((short)(IFILEHANDLE), "PREVIOUS DATA IN ARCHIVE FILE\r\n", (ushort)(31));
            __context__.SourceCodeLine = 87;
            return((short)(IFILEHANDLE));
        }
        object CONNECTTO_OnChange_0(Object __EventInfo__)

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

                __context__.SourceCodeLine = 19;
                if (Functions.TestForTrue((Functions.BoolToInt(CONNECTTO.UshortValue != GNCURRENTCONNECTION))))
                {
                    __context__.SourceCodeLine = 22;
                    if (Functions.TestForTrue((GNCURRENTCONNECTION)))
                    {
                        __context__.SourceCodeLine = 25;
                        EQUIPMENTID.Value          = (ushort)(GNCURRENTCONNECTION);
                        __context__.SourceCodeLine = 26;
                        Functions.Pulse(1, DISCEC);
                        __context__.SourceCodeLine = 27;
                        GNCURRENTCONNECTION        = (ushort)(0);
                    }

                    __context__.SourceCodeLine = 30;
                    if (Functions.TestForTrue((CONNECTTO.UshortValue)))
                    {
                        __context__.SourceCodeLine = 32;
                        EQUIPMENTID.Value          = (ushort)(CONNECTTO.UshortValue);
                        __context__.SourceCodeLine = 33;
                        Functions.Pulse(1, CONNECT);
                        __context__.SourceCodeLine = 34;
                        GNCURRENTCONNECTION        = (ushort)(CONNECTTO.UshortValue);
                    }
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        object SERIAL_OnChange_0(Object __EventInfo__)

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

                __context__.SourceCodeLine = 18;
                B = (ushort)(1);
                __context__.SourceCodeLine = 19;
                ushort __FN_FORSTART_VAL__1 = (ushort)(1);
                ushort __FN_FOREND_VAL__1   = (ushort)200;
                int    __FN_FORSTEP_VAL__1  = (int)1;
                for (I = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ((I >= __FN_FORSTART_VAL__1) && (I <= __FN_FOREND_VAL__1)) : ((I <= __FN_FORSTART_VAL__1) && (I >= __FN_FOREND_VAL__1)); I += (ushort)__FN_FORSTEP_VAL__1)
                {
                    __context__.SourceCodeLine = 21;
                    A = (ushort)(Functions.Find("-", SERIAL, B));
                    __context__.SourceCodeLine = 22;
                    TEMP.UpdateValue(Functions.Mid(SERIAL, (int)(B), (int)((A - B))));
                    __context__.SourceCodeLine = 23;
                    ANALOG [I].Value           = (ushort)(Functions.Atoi(TEMP));
                    __context__.SourceCodeLine = 24;
                    B = (ushort)((A + 1));
                    __context__.SourceCodeLine = 25;
                    if (Functions.TestForTrue((Functions.BoolToInt(A == 0))))
                    {
                        __context__.SourceCodeLine = 26;
                        break;
                    }

                    __context__.SourceCodeLine = 19;
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        object FROMQUEUEMODULE_OnChange_11(Object __EventInfo__)

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


                __context__.SourceCodeLine = 353;
                while (Functions.TestForTrue((1)))
                {
                    __context__.SourceCodeLine = 355;
                    TEMPSEND.UpdateValue("");
                    __context__.SourceCodeLine = 356;
                    TEMPDATA.UpdateValue(Functions.Gather("\u000D\u000A", FROMQUEUEMODULE));
                    __context__.SourceCodeLine = 357;
                    TEMPSEND.UpdateValue(PROCESSDATA(__context__, TEMPDATA));
                    __context__.SourceCodeLine = 358;
                    if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(TEMPSEND) > 0))))
                    {
                        __context__.SourceCodeLine = 360;
                        TOQUEUEMODULE.UpdateValue(TEMPSEND);
                    }

                    __context__.SourceCodeLine = 362;
                    TEMPDATA.UpdateValue("");
                    __context__.SourceCodeLine = 353;
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        private void WRITESETPOINTS(SplusExecutionContext __context__)
        {
            short FILEHANDLE = 0;

            FILE_INFO FILEINFO;

            FILEINFO = new FILE_INFO();
            FILEINFO.PopulateDefaults();


            __context__.SourceCodeLine = 92;
            StartFileOperations( );
            __context__.SourceCodeLine = 94;
            FILEHANDLE = (short)(FileOpen(FILENAME, (ushort)(((1 | 256) | 512) | 32768)));
            __context__.SourceCodeLine = 96;
            if (Functions.TestForTrue((Functions.BoolToInt(FILEHANDLE >= 0))))
            {
                __context__.SourceCodeLine = 99;
                WriteInteger((short)(FILEHANDLE), (ushort)(HEAT));
                __context__.SourceCodeLine = 100;
                WriteInteger((short)(FILEHANDLE), (ushort)(COOL));
                __context__.SourceCodeLine = 101;
                WriteInteger((short)(FILEHANDLE), (ushort)(AUTO1PT));
                __context__.SourceCodeLine = 102;
                WriteInteger((short)(FILEHANDLE), (ushort)(SETBKENABLED));
                __context__.SourceCodeLine = 104;
            }

            else
            {
                __context__.SourceCodeLine = 110;
            }

            __context__.SourceCodeLine = 114;
            FileClose((short)(FILEHANDLE));
            __context__.SourceCodeLine = 116;
            EndFileOperations( );
        }
        public override object FunctionMain(object __obj__)
        {
            ushort X = 0;

            try
            {
                SplusExecutionContext __context__ = SplusFunctionMainStartCode();

                __context__.SourceCodeLine = 101;
                WaitForInitializationComplete( );
                __context__.SourceCodeLine = 103;
                IOUTPUTCOUNT = (ushort)(0);
                __context__.SourceCodeLine = 105;
                ushort __FN_FORSTART_VAL__1 = (ushort)(1);
                ushort __FN_FOREND_VAL__1   = (ushort)200;
                int    __FN_FORSTEP_VAL__1  = (int)1;
                for (X = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ((X >= __FN_FORSTART_VAL__1) && (X <= __FN_FOREND_VAL__1)) : ((X <= __FN_FORSTART_VAL__1) && (X >= __FN_FOREND_VAL__1)); X += (ushort)__FN_FORSTEP_VAL__1)
                {
                    __context__.SourceCodeLine = 107;
                    if (Functions.TestForTrue((IsSignalDefined(OUTPUT__DOLLAR__[X]))))
                    {
                        __context__.SourceCodeLine = 109;
                        IOUTPUTCOUNT = (ushort)((IOUTPUTCOUNT + 1));
                    }

                    else
                    {
                        __context__.SourceCodeLine = 112;
                        break;
                    }

                    __context__.SourceCodeLine = 105;
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(); }
            return(__obj__);
        }
        object CONVERT_OnPush_0(Object __EventInfo__)

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

                __context__.SourceCodeLine = 17;
                NO = (ushort)(Functions.Atoi(SERIAL));
                __context__.SourceCodeLine = 18;
                NO = (ushort)((NO + 1));
                __context__.SourceCodeLine = 19;
                ushort __FN_FORSTART_VAL__1 = (ushort)(1);
                ushort __FN_FOREND_VAL__1   = (ushort)NO;
                int    __FN_FORSTEP_VAL__1  = (int)1;
                for (I = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ((I >= __FN_FORSTART_VAL__1) && (I <= __FN_FOREND_VAL__1)) : ((I <= __FN_FORSTART_VAL__1) && (I >= __FN_FOREND_VAL__1)); I += (ushort)__FN_FORSTEP_VAL__1)
                {
                    __context__.SourceCodeLine = 21;
                    DIGITAL [I].Value          = (ushort)(1);
                    __context__.SourceCodeLine = 19;
                }

                __context__.SourceCodeLine = 23;
                ushort __FN_FORSTART_VAL__2 = (ushort)(NO);
                ushort __FN_FOREND_VAL__2   = (ushort)200;
                int    __FN_FORSTEP_VAL__2  = (int)1;
                for (I = __FN_FORSTART_VAL__2; (__FN_FORSTEP_VAL__2 > 0)  ? ((I >= __FN_FORSTART_VAL__2) && (I <= __FN_FOREND_VAL__2)) : ((I <= __FN_FORSTART_VAL__2) && (I >= __FN_FOREND_VAL__2)); I += (ushort)__FN_FORSTEP_VAL__2)
                {
                    __context__.SourceCodeLine = 25;
                    DIGITAL [I].Value          = (ushort)(0);
                    __context__.SourceCodeLine = 23;
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Example #29
0
        private void SENDCOMMAND(SplusExecutionContext __context__)
        {
            CrestronString TEMPSEND;

            TEMPSEND = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 25, this);


            __context__.SourceCodeLine = 160;
            TEMPSEND.UpdateValue("");
            __context__.SourceCodeLine = 161;
            if (Functions.TestForTrue((Functions.BoolToInt(COMMANDSTOSEND > 0))))
            {
                __context__.SourceCodeLine = 163;
                TEMPSEND.UpdateValue(GETNEXTCOMMAND(__context__));
            }

            else
            {
                __context__.SourceCodeLine = 165;
                if (Functions.TestForTrue((Functions.BoolToInt(QUERIESTOSEND > 0))))
                {
                    __context__.SourceCodeLine = 167;
                    TEMPSEND.UpdateValue(GETNEXTQUERY(__context__));
                }
            }

            __context__.SourceCodeLine = 169;
            if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(TEMPSEND) > 0))))
            {
                __context__.SourceCodeLine = 171;
                TODEVICE.UpdateValue(TEMPSEND);
                __context__.SourceCodeLine = 172;
                TEMPSEND.UpdateValue("");
            }

            __context__.SourceCodeLine = 174;
            CreateWait("__SPLS_TMPVAR__WAITLABEL_10__", 20, __SPLS_TMPVAR__WAITLABEL_10___Callback);
        }
        object SEND_OnPush_0(Object __EventInfo__)

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


                __context__.SourceCodeLine = 79;
                if (Functions.TestForTrue((Functions.BoolToInt(G_IBUSY == 0))))
                {
                    __context__.SourceCodeLine = 82;
                    G_IBUSY = (ushort)(1);
                    __context__.SourceCodeLine = 85;
                    MakeString(G_SOUTPUT, "S:0000:1000:{0:X4}:{1:X4}{2:X4}", ((G_INUMCHANNELS * 2) + 8), START_CHANNEL__POUND__.UshortValue, END_CHANNEL__POUND__.UshortValue);
                    __context__.SourceCodeLine = 88;
                    ushort __FN_FORSTART_VAL__1 = (ushort)(1);
                    ushort __FN_FOREND_VAL__1   = (ushort)G_INUMCHANNELS;
                    int    __FN_FORSTEP_VAL__1  = (int)1;
                    for (I = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ((I >= __FN_FORSTART_VAL__1) && (I <= __FN_FOREND_VAL__1)) : ((I <= __FN_FORSTART_VAL__1) && (I >= __FN_FOREND_VAL__1)); I += (ushort)__FN_FORSTEP_VAL__1)
                    {
                        __context__.SourceCodeLine = 91;
                        MakeString(G_SOUTPUT, "{0}{1:X2}", G_SOUTPUT, (CHANNEL[I].UshortValue / 256));
                        __context__.SourceCodeLine = 88;
                    }

                    __context__.SourceCodeLine = 95;
                    OUT__DOLLAR__.UpdateValue(G_SOUTPUT);
                    __context__.SourceCodeLine = 98;
                    G_IBUSY = (ushort)(0);
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        public void ONNOTICE(SimplSharpString MESSAGE)
        {
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();

                __context__.SourceCodeLine = 53;
                if (Functions.TestForTrue((Functions.BoolToInt(MESSAGE.ToString() == PD_Const.cAllowNextProgram))))
                {
                    __context__.SourceCodeLine = 53;
                    PROGRAMREADY.Value         = (ushort)(1);
                }

                else
                {
                    __context__.SourceCodeLine = 54;
                    if (Functions.TestForTrue((Functions.BoolToInt(MESSAGE.ToString() == PD_Const.cLoadingFilesEndMessage))))
                    {
                        __context__.SourceCodeLine = 54;
                        LOADINGFILES.Value         = (ushort)(0);
                    }

                    else
                    {
                        __context__.SourceCodeLine = 55;
                        if (Functions.TestForTrue((Functions.BoolToInt(MESSAGE.ToString() == PD_Const.cLoadingFilesStartMessage))))
                        {
                            __context__.SourceCodeLine = 55;
                            LOADINGFILES.Value         = (ushort)(1);
                        }
                    }
                }

                __context__.SourceCodeLine = 57;
                COREMESSAGES__DOLLAR__.UpdateValue(MESSAGE.ToString());
            }
            finally { ObjectFinallyHandler(); }
        }
Example #32
0
        private ushort ISLEAPYEAR(SplusExecutionContext __context__, ushort YEAR)
        {
            __context__.SourceCodeLine = 145;
            if (Functions.TestForTrue((Functions.BoolToInt(Mod(YEAR, 400) == 0))))
            {
                __context__.SourceCodeLine = 146;
                return((ushort)(1));
            }

            else
            {
                __context__.SourceCodeLine = 148;
                if (Functions.TestForTrue((Functions.BoolToInt(Mod(YEAR, 100) == 0))))
                {
                    __context__.SourceCodeLine = 149;
                    return((ushort)(0));
                }

                else
                {
                    __context__.SourceCodeLine = 151;
                    if (Functions.TestForTrue((Functions.BoolToInt(Mod(YEAR, 4) == 0))))
                    {
                        __context__.SourceCodeLine = 152;
                        return((ushort)(1));
                    }

                    else
                    {
                        __context__.SourceCodeLine = 155;
                        return((ushort)(0));
                    }
                }
            }


            return(0); // default return value (none specified in module)
        }
Example #33
0
        object FILELOCATION_OnChange_1(Object __EventInfo__)

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

                __context__.SourceCodeLine = 354;
                G_FILELOCATION.UpdateValue(FILELOCATION);
                __context__.SourceCodeLine = 356;
                if (Functions.TestForTrue((Functions.BoolToInt(G_FILELOCATION == "\\CF0\\"))))
                {
                    __context__.SourceCodeLine = 358;
                    G_FILE_LOCATION_TYPE       = (ushort)(1);
                }

                else
                {
                    __context__.SourceCodeLine = 362;
                    G_FILE_LOCATION_TYPE       = (ushort)(0);
                }

                __context__.SourceCodeLine = 365;
                if (Functions.TestForTrue((G_DEBUG)))
                {
                    __context__.SourceCodeLine = 367;
                    Print("g_FileLocation = {0}\r\n", G_FILELOCATION);
                    __context__.SourceCodeLine = 368;
                    Print("g_TotalFile = {0}\r\n", G_TOTALFILE);
                    __context__.SourceCodeLine = 369;
                    Print("g_File_Location_Type = {0:d}\r\n", (ushort)G_FILE_LOCATION_TYPE);
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Example #34
0
        private ushort DAYSINMONTH(SplusExecutionContext __context__, ushort MON, ushort YEAR)
        {
            __context__.SourceCodeLine = 164;
            if (Functions.TestForTrue((Functions.BoolToInt((Functions.TestForTrue(Functions.BoolToInt((Functions.TestForTrue(Functions.BoolToInt((Functions.TestForTrue(Functions.BoolToInt(MON == 4)) || Functions.TestForTrue(Functions.BoolToInt(MON == 6))))) || Functions.TestForTrue(Functions.BoolToInt(MON == 9))))) || Functions.TestForTrue(Functions.BoolToInt(MON == 11)))))))
            {
                __context__.SourceCodeLine = 165;
                return((ushort)(30));
            }

            else
            {
                __context__.SourceCodeLine = 168;
                if (Functions.TestForTrue((Functions.BoolToInt(MON == 2))))
                {
                    __context__.SourceCodeLine = 169;
                    if (Functions.TestForTrue((ISLEAPYEAR(__context__, (ushort)(YEAR)))))
                    {
                        __context__.SourceCodeLine = 170;
                        return((ushort)(29));
                    }

                    else
                    {
                        __context__.SourceCodeLine = 172;
                        return((ushort)(28));
                    }
                }

                else
                {
                    __context__.SourceCodeLine = 176;
                    return((ushort)(31));
                }
            }


            return(0); // default return value (none specified in module)
        }
        object SOURCE_OFF_OnPush_2(Object __EventInfo__)

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

                __context__.SourceCodeLine = 141;
                CUR_EQUIP_ID = (ushort)(0);
                __context__.SourceCodeLine = 142;
                EQUIP_ID_OUT.Value         = (ushort)(0);
                __context__.SourceCodeLine = 143;
                CUR_EQUIP_ID = (ushort)(800);
                __context__.SourceCodeLine = 144;
                EQUIP_ID_OUT.Value         = (ushort)(800);
                __context__.SourceCodeLine = 145;
                UPDATEFEEDBACK(__context__, (ushort)(800));
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Example #36
0
        object FRIENDLYNAMEUPDATE_OnChange_5(Object __EventInfo__)

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


                __context__.SourceCodeLine = 140;
                STATUS = (ushort)(ZHELP.SaveName(FRIENDLYNAMEUPDATE.ToString(), ZONEID.ToString()));
                __context__.SourceCodeLine = 142;
                if (Functions.TestForTrue((Functions.BoolToInt(STATUS == 1))))
                {
                    __context__.SourceCodeLine = 144;
                    Functions.Pulse(200, FRIENDLYNAMESAVED);
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
 private ushort WORDTOI (  SplusExecutionContext __context__, CrestronString SSOURCESTRING , ushort IHIGHBYTE , ushort ILOWBYTE ) 
     { 
     ushort IWORD = 0;
     
     
     __context__.SourceCodeLine = 250;
     if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (Byte( SSOURCESTRING , (int)( IHIGHBYTE ) ) != 65535) ) && Functions.TestForTrue ( Functions.BoolToInt (Byte( SSOURCESTRING , (int)( ILOWBYTE ) ) != 65535) )) ))  ) ) 
         {
         __context__.SourceCodeLine = 251;
         IWORD = (ushort) ( ((Byte( SSOURCESTRING , (int)( IHIGHBYTE ) ) * 256) + Byte( SSOURCESTRING , (int)( ILOWBYTE ) )) ) ; 
         }
     
     else 
         {
         __context__.SourceCodeLine = 253;
         IWORD = (ushort) ( 65535 ) ; 
         }
     
     __context__.SourceCodeLine = 254;
     return (ushort)( IWORD) ; 
     
     }
        private void GENERATEOPTIONSMENUMAP(  SplusExecutionContext __context__ )
        {
            __context__.SourceCodeLine = 341;
            OPTIONSITEMCOUNT = (ushort) ( 0 ) ;
            __context__.SourceCodeLine = 344;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (ACTIVESOURCE  .UshortValue != 0))  ) )
                {
                __context__.SourceCodeLine = 346;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (SOURCELISTHASONEITEM  .Value == 0) ) || Functions.TestForTrue ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (SOURCELISTHASONEITEM  .Value == 1) ) && Functions.TestForTrue ( Functions.BoolToInt (SINGLESOURCE  .UshortValue != ACTIVESOURCE  .UshortValue) )) ) )) ))  ) )
                    {
                    __context__.SourceCodeLine = 348;
                    OPTIONSITEMCOUNT = (ushort) ( (OPTIONSITEMCOUNT + 1) ) ;
                    __context__.SourceCodeLine = 349;
                    OPTIONSMENUMAP [ OPTIONSITEMCOUNT] = (ushort) ( 1 ) ;
                    }

                }

            __context__.SourceCodeLine = 353;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (HASSOURCES  .Value == 1) ) && Functions.TestForTrue ( Functions.BoolToInt (SOURCELISTHASONEITEM  .Value == 0) )) ))  ) )
                {
                __context__.SourceCodeLine = 355;
                OPTIONSITEMCOUNT = (ushort) ( (OPTIONSITEMCOUNT + 1) ) ;
                __context__.SourceCodeLine = 356;
                OPTIONSMENUMAP [ OPTIONSITEMCOUNT] = (ushort) ( 2 ) ;
                }

            __context__.SourceCodeLine = 359;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (SOURCELISTHASONEITEM  .Value == 1))  ) )
                {
                __context__.SourceCodeLine = 361;
                OPTIONSITEMCOUNT = (ushort) ( (OPTIONSITEMCOUNT + 1) ) ;
                __context__.SourceCodeLine = 362;
                OPTIONSMENUMAP [ OPTIONSITEMCOUNT] = (ushort) ( 101 ) ;
                }

            __context__.SourceCodeLine = 365;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (SOURCESHAREAVAILABLE  .Value == 1))  ) )
                {
                __context__.SourceCodeLine = 367;
                OPTIONSITEMCOUNT = (ushort) ( (OPTIONSITEMCOUNT + 1) ) ;
                __context__.SourceCodeLine = 368;
                OPTIONSMENUMAP [ OPTIONSITEMCOUNT] = (ushort) ( 3 ) ;
                }

            __context__.SourceCodeLine = 371;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (HASROOMS  .Value == 1))  ) )
                {
                __context__.SourceCodeLine = 373;
                OPTIONSITEMCOUNT = (ushort) ( (OPTIONSITEMCOUNT + 1) ) ;
                __context__.SourceCodeLine = 374;
                OPTIONSMENUMAP [ OPTIONSITEMCOUNT] = (ushort) ( 4 ) ;
                }

            __context__.SourceCodeLine = 377;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (HASSLEEP  .Value == 1) ) && Functions.TestForTrue ( Functions.BoolToInt (ACTIVESOURCE  .UshortValue != 0) )) ))  ) )
                {
                __context__.SourceCodeLine = 379;
                OPTIONSITEMCOUNT = (ushort) ( (OPTIONSITEMCOUNT + 1) ) ;
                __context__.SourceCodeLine = 380;
                OPTIONSMENUMAP [ OPTIONSITEMCOUNT] = (ushort) ( 5 ) ;
                __context__.SourceCodeLine = 381;
                SLEEPMENUPOSITION = (ushort) ( OPTIONSITEMCOUNT ) ;
                }

            __context__.SourceCodeLine = 384;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (TOOLSMENUENABLED  .Value == 1) ) && Functions.TestForTrue ( Functions.BoolToInt (ACTIVESOURCE  .UshortValue != 0) )) ))  ) )
                {
                __context__.SourceCodeLine = 386;
                OPTIONSITEMCOUNT = (ushort) ( (OPTIONSITEMCOUNT + 1) ) ;
                __context__.SourceCodeLine = 387;
                OPTIONSMENUMAP [ OPTIONSITEMCOUNT] = (ushort) ( 6 ) ;
                }

            __context__.SourceCodeLine = 390;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (HASGROUPS  .Value == 1) ) && Functions.TestForTrue ( Functions.BoolToInt (GROUPSMENUENABLED  .Value == 1) )) ))  ) )
                {
                __context__.SourceCodeLine = 392;
                OPTIONSITEMCOUNT = (ushort) ( (OPTIONSITEMCOUNT + 1) ) ;
                __context__.SourceCodeLine = 393;
                OPTIONSMENUMAP [ OPTIONSITEMCOUNT] = (ushort) ( 7 ) ;
                }

            __context__.SourceCodeLine = 397;
            GENERATEOPTIONSMENU (  __context__  ) ;
        }
        private void GENERATETOOLSMENU(  SplusExecutionContext __context__ )
        {
            __context__.SourceCodeLine = 285;
            TOOLSLABEL__DOLLAR__  .UpdateValue ( "Tools"  ) ;
            __context__.SourceCodeLine = 286;
            TOOLSITEMCOUNTOUT  .Value = (ushort) ( 5 ) ;
            __context__.SourceCodeLine = 288;
            SIGNEDBASS = (short) ( BASS_DB  .ShortValue ) ;
            __context__.SourceCodeLine = 289;
            SIGNEDTREBLE = (short) ( TREBLE_DB  .ShortValue ) ;
            __context__.SourceCodeLine = 290;
            SIGNEDBALANCE = (short) ( BALANCE  .ShortValue ) ;
            __context__.SourceCodeLine = 292;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt ( Functions.ToSignedLongInteger( -( 10 ) ) < SIGNEDBASS ) ) && Functions.TestForTrue ( Functions.BoolToInt ( SIGNEDBASS < 0 ) )) ))  ) )
                {
                __context__.SourceCodeLine = 293;
                MakeString ( TOOLSITEMS__DOLLAR__ [ 1] , "Bass: -0.{0:d} dB", (short)Functions.Abs( Mod( SIGNEDBASS , 10 ) )) ;
                }

            else
                {
                __context__.SourceCodeLine = 295;
                MakeString ( TOOLSITEMS__DOLLAR__ [ 1] , "Bass: {0:d}.{1:d} dB", (short)(SIGNEDBASS / 10), (short)Functions.Abs( Mod( SIGNEDBASS , 10 ) )) ;
                }

            __context__.SourceCodeLine = 297;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt ( Functions.ToSignedLongInteger( -( 10 ) ) < SIGNEDTREBLE ) ) && Functions.TestForTrue ( Functions.BoolToInt ( SIGNEDTREBLE < 0 ) )) ))  ) )
                {
                __context__.SourceCodeLine = 298;
                MakeString ( TOOLSITEMS__DOLLAR__ [ 2] , "Treble: -0.{0:d} dB", (short)Functions.Abs( Mod( SIGNEDTREBLE , 10 ) )) ;
                }

            else
                {
                __context__.SourceCodeLine = 300;
                MakeString ( TOOLSITEMS__DOLLAR__ [ 2] , "Treble: {0:d}.{1:d} dB", (short)(SIGNEDTREBLE / 10), (short)Functions.Abs( Mod( SIGNEDTREBLE , 10 ) )) ;
                }

            __context__.SourceCodeLine = 302;
            MakeString ( TOOLSITEMS__DOLLAR__ [ 3] , "EQ: {0}", EQPRESETNAMES__DOLLAR__ [ EQPRESET  .UshortValue ] ) ;
            __context__.SourceCodeLine = 304;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (SIGNEDBALANCE == 0))  ) )
                {
                __context__.SourceCodeLine = 305;
                MakeString ( TOOLSITEMS__DOLLAR__ [ 4] , "Balance: Center") ;
                }

            else
                {
                __context__.SourceCodeLine = 306;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( SIGNEDBALANCE < 0 ))  ) )
                    {
                    __context__.SourceCodeLine = 307;
                    MakeString ( TOOLSITEMS__DOLLAR__ [ 4] , "Balance: Left     {0:d}", (short)Functions.Abs( SIGNEDBALANCE )) ;
                    }

                else
                    {
                    __context__.SourceCodeLine = 308;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( SIGNEDBALANCE > 0 ))  ) )
                        {
                        __context__.SourceCodeLine = 309;
                        MakeString ( TOOLSITEMS__DOLLAR__ [ 4] , "Balance: Right   {0:d}", (short)Functions.Abs( SIGNEDBALANCE )) ;
                        }

                    }

                }

            __context__.SourceCodeLine = 311;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (LOUDNESSISON  .Value == 1))  ) )
                {
                __context__.SourceCodeLine = 312;
                TOOLSITEMS__DOLLAR__ [ 5]  .UpdateValue ( "Loudness: On"  ) ;
                }

            else
                {
                __context__.SourceCodeLine = 313;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (LOUDNESSISOFF  .Value == 1))  ) )
                    {
                    __context__.SourceCodeLine = 314;
                    TOOLSITEMS__DOLLAR__ [ 5]  .UpdateValue ( "Loudness: Off"  ) ;
                    }

                }
        }
 private void REGISTERDELEGATES(  SplusExecutionContext __context__ )
 {
     __context__.SourceCodeLine = 73;
     // RegisterDelegate( SLAVE , READSACN , READJOINS )
     SLAVE .ReadSacn  = READJOINS; ;
 }
        private void TRYTOCONNECT(  SplusExecutionContext __context__ )
        {
            __context__.SourceCodeLine = 135;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (DEBUG  .Value == 1))  ) )
                {
                __context__.SourceCodeLine = 137;
                Print( "S+:Request new Connection sent to C# function\r\n") ;
                }

            __context__.SourceCodeLine = 139;
            AFFINITYCONTROL . EnableConnection ( ) ;
        }
        private void REFRESHSOURCESHARINGPAGE(  SplusExecutionContext __context__ )
        {
            ushort I = 0;

            ushort ROOMNUMBERFROMINDEX = 0;

            __context__.SourceCodeLine = 91;
            ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__1 = (ushort)SOURCESHARESCROLLMAX  .Value;
            int __FN_FORSTEP_VAL__1 = (int)1;
            for ( I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (I  >= __FN_FORSTART_VAL__1) && (I  <= __FN_FOREND_VAL__1) ) : ( (I  <= __FN_FORSTART_VAL__1) && (I  >= __FN_FOREND_VAL__1) ) ; I  += (ushort)__FN_FORSTEP_VAL__1)
                {
                __context__.SourceCodeLine = 93;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (ONSOURCESHARINGPAGE  .Value == 1))  ) )
                    {
                    __context__.SourceCodeLine = 95;
                    ROOMNUMBERFROMINDEX = (ushort) ( SOURCESHAREROOMMAP[ I ] ) ;
                    __context__.SourceCodeLine = 97;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt ( ROOMNUMBERFROMINDEX > 0 ) ) && Functions.TestForTrue ( Functions.BoolToInt (ROOMDISABLED[ ROOMNUMBERFROMINDEX ] .Value == 0) )) ))  ) )
                        {
                        __context__.SourceCodeLine = 99;
                        SOURCESHAREROOMNAMEOUT__DOLLAR__ [ I]  .UpdateValue ( ROOMNAMEIN__DOLLAR__ [ ROOMNUMBERFROMINDEX ]  ) ;
                        __context__.SourceCodeLine = 101;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (ROOMSOURCE[ ROOMNUMBERFROMINDEX ] .UshortValue == ROOMSOURCE[ SELECTEDROOM  .UshortValue ] .UshortValue) ) && Functions.TestForTrue ( Functions.BoolToInt (ROOMSOURCE[ SELECTEDROOM  .UshortValue ] .UshortValue != 0) )) ))  ) )
                            {
                            __context__.SourceCodeLine = 103;
                            LINECHECKEDFB [ I]  .Value = (ushort) ( 1 ) ;
                            __context__.SourceCodeLine = 104;
                            SOURCESHAREICONSOUT [ I]  .Value = (ushort) ( 3 ) ;
                            }

                        else
                            {
                            __context__.SourceCodeLine = 108;
                            LINECHECKEDFB [ I]  .Value = (ushort) ( 0 ) ;
                            __context__.SourceCodeLine = 109;
                            SOURCESHAREICONSOUT [ I]  .Value = (ushort) ( 0 ) ;
                            }

                        }

                    else
                        {
                        __context__.SourceCodeLine = 114;
                        SOURCESHAREROOMNAMEOUT__DOLLAR__ [ I]  .UpdateValue ( "(Room Disabled)"  ) ;
                        __context__.SourceCodeLine = 115;
                        LINECHECKEDFB [ I]  .Value = (ushort) ( 0 ) ;
                        }

                    }

                __context__.SourceCodeLine = 91;
                }
        }
        private void GENERATESLEEPMENU(  SplusExecutionContext __context__ )
        {
            __context__.SourceCodeLine = 271;
            SLEEPLABEL__DOLLAR__  .UpdateValue ( "Sleep"  ) ;
            __context__.SourceCodeLine = 272;
            SLEEPITEMCOUNTOUT  .Value = (ushort) ( 2 ) ;
            __context__.SourceCodeLine = 274;
            MakeString ( SLEEPITEMS__DOLLAR__ [ 2] , "Time: {0:d} minutes", (short)SLEEPTIME  .UshortValue) ;
            __context__.SourceCodeLine = 276;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (SLEEPISON  .Value == 1))  ) )
                {
                __context__.SourceCodeLine = 277;
                SLEEPITEMS__DOLLAR__ [ 1]  .UpdateValue ( "Sleep: On"  ) ;
                }

            else
                {
                __context__.SourceCodeLine = 278;
                if ( Functions.TestForTrue  ( ( SLEEPISOFF  .Value)  ) )
                    {
                    __context__.SourceCodeLine = 279;
                    SLEEPITEMS__DOLLAR__ [ 1]  .UpdateValue ( "Sleep: Off"  ) ;
                    }

                }
        }
        private void SAVEINDEXANDHIGHLIGHT(  SplusExecutionContext __context__ )
        {
            __context__.SourceCodeLine = 351;
            if ( Functions.TestForTrue  ( ( ONROOMSELECTPAGE  .Value)  ) )
                {
                __context__.SourceCodeLine = 353;
                ROOMINDEX = (ushort) ( INDEX ) ;
                __context__.SourceCodeLine = 354;
                ROOMHIGHLIGHT = (ushort) ( HIGHLIGHT ) ;
                }

            else
                {
                __context__.SourceCodeLine = 356;
                if ( Functions.TestForTrue  ( ( ONSOURCESHARINGPAGE  .Value)  ) )
                    {
                    __context__.SourceCodeLine = 358;
                    SOURCESHAREINDEX = (ushort) ( INDEX ) ;
                    __context__.SourceCodeLine = 359;
                    SOURCESHAREHIGHLIGHT = (ushort) ( HIGHLIGHT ) ;
                    }

                }
        }
        private void CALCULATESCROLLBAR(  SplusExecutionContext __context__, ushort TOTAL , ushort INDEX )
        {
            __context__.SourceCodeLine = 119;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( INDEX <= 1 ))  ) )
                {
                __context__.SourceCodeLine = 120;
                SCROLLBAR  .Value = (ushort) ( 65535 ) ;
                }

            else
                {
                __context__.SourceCodeLine = 121;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( ((INDEX + SCROLLPAGESIZE  .UshortValue) - 1) >= TOTAL ))  ) )
                    {
                    __context__.SourceCodeLine = 122;
                    SCROLLBAR  .Value = (ushort) ( 0 ) ;
                    }

                else
                    {
                    __context__.SourceCodeLine = 124;
                    SCROLLBAR  .Value = (ushort) ( Functions.ToInteger( -( ((65535 / (TOTAL - SCROLLPAGESIZE  .UshortValue)) * (INDEX - 1)) ) ) ) ;
                    }

                }
        }
        private void REFRESHPAGE(  SplusExecutionContext __context__ )
        {
            ushort I = 0;

            ushort LISTINDEX = 0;

            ushort ROOMNUMBERFROMINDEX = 0;

            __context__.SourceCodeLine = 154;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( SCROLLPAGESIZE  .UshortValue > 0 ))  ) )
                {
                __context__.SourceCodeLine = 156;
                ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
                ushort __FN_FOREND_VAL__1 = (ushort)SCROLLPAGESIZE  .UshortValue;
                int __FN_FORSTEP_VAL__1 = (int)1;
                for ( I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (I  >= __FN_FORSTART_VAL__1) && (I  <= __FN_FOREND_VAL__1) ) : ( (I  <= __FN_FORSTART_VAL__1) && (I  >= __FN_FOREND_VAL__1) ) ; I  += (ushort)__FN_FORSTEP_VAL__1)
                    {
                    __context__.SourceCodeLine = 158;
                    LISTINDEX = (ushort) ( ((INDEX + I) - 1) ) ;
                    __context__.SourceCodeLine = 160;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( LISTINDEX <= SCROLLMAX ))  ) )
                        {
                        __context__.SourceCodeLine = 162;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt (ONSOURCESHARINGPAGE  .Value == 1))  ) )
                            {
                            __context__.SourceCodeLine = 164;
                            ROOMNUMBERFROMINDEX = (ushort) ( SOURCESHAREROOMMAP[ LISTINDEX ] ) ;
                            __context__.SourceCodeLine = 166;
                            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( ROOMNUMBERFROMINDEX > 0 ))  ) )
                                {
                                __context__.SourceCodeLine = 168;
                                if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (ROOMSOURCE[ ROOMNUMBERFROMINDEX ] .UshortValue == ROOMSOURCE[ SELECTEDROOM  .UshortValue ] .UshortValue) ) && Functions.TestForTrue ( Functions.BoolToInt (ROOMSOURCE[ SELECTEDROOM  .UshortValue ] .UshortValue != 0) )) ))  ) )
                                    {
                                    __context__.SourceCodeLine = 169;
                                    LINECHECKEDFB [ I]  .Value = (ushort) ( 1 ) ;
                                    }

                                else
                                    {
                                    __context__.SourceCodeLine = 171;
                                    LINECHECKEDFB [ I]  .Value = (ushort) ( 0 ) ;
                                    }

                                }

                            else
                                {
                                __context__.SourceCodeLine = 174;
                                LINECHECKEDFB [ I]  .Value = (ushort) ( 0 ) ;
                                }

                            }

                        else
                            {
                            __context__.SourceCodeLine = 178;
                            ROOMNUMBERFROMINDEX = (ushort) ( LISTPOSITION[ LISTINDEX ] .UshortValue ) ;
                            __context__.SourceCodeLine = 179;
                            LINECHECKEDFB [ I]  .Value = (ushort) ( 0 ) ;
                            __context__.SourceCodeLine = 181;
                            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (OMNIVOLUMEACTIVE  .Value == 1))  ) )
                                {
                                __context__.SourceCodeLine = 183;
                                if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( ROOMNUMBERFROMINDEX > 0 ))  ) )
                                    {
                                    __context__.SourceCodeLine = 185;
                                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt (ROOMDISABLED[ ROOMNUMBERFROMINDEX ] .Value == 0))  ) )
                                        {
                                        __context__.SourceCodeLine = 187;
                                        LINEVOLUMEFB [ I]  .Value = (ushort) ( ROOMVOLUMEFB[ ROOMNUMBERFROMINDEX ] .UshortValue ) ;
                                        __context__.SourceCodeLine = 189;
                                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt ( 0 < ROOMSOURCE[ ROOMNUMBERFROMINDEX ] .UshortValue ) ) && Functions.TestForTrue ( Functions.BoolToInt (ROOMFIXEDMODEON[ ROOMNUMBERFROMINDEX ] .Value == 0) )) ))  ) )
                                            {
                                            __context__.SourceCodeLine = 190;
                                            SHOWLINEOMNIVOLUME [ I]  .Value = (ushort) ( 1 ) ;
                                            }

                                        else
                                            {
                                            __context__.SourceCodeLine = 192;
                                            SHOWLINEOMNIVOLUME [ I]  .Value = (ushort) ( 0 ) ;
                                            }

                                        }

                                    else
                                        {
                                        __context__.SourceCodeLine = 196;
                                        LINEVOLUMEFB [ I]  .Value = (ushort) ( 0 ) ;
                                        __context__.SourceCodeLine = 197;
                                        SHOWLINEOMNIVOLUME [ I]  .Value = (ushort) ( 0 ) ;
                                        }

                                    }

                                else
                                    {
                                    __context__.SourceCodeLine = 201;
                                    LINEVOLUMEFB [ I]  .Value = (ushort) ( 0 ) ;
                                    }

                                }

                            }

                        __context__.SourceCodeLine = 205;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt (ROOMNUMBERFROMINDEX == 0))  ) )
                            {
                            __context__.SourceCodeLine = 207;
                            ROOMNAMEOUT__DOLLAR__ [ I]  .UpdateValue ( "(Room Disabled)"  ) ;
                            __context__.SourceCodeLine = 208;
                            SOURCENAMEOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                            __context__.SourceCodeLine = 209;
                            NOWPLAYINGLINE1OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                            __context__.SourceCodeLine = 210;
                            NOWPLAYINGLINE2OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                            __context__.SourceCodeLine = 211;
                            NOWPLAYINGTRANSPORTOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                            __context__.SourceCodeLine = 212;
                            ROOMICONSOUT [ I]  .Value = (ushort) ( 0 ) ;
                            }

                        else
                            {
                            __context__.SourceCodeLine = 216;
                            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (ROOMDISABLED[ ROOMNUMBERFROMINDEX ] .Value == 0))  ) )
                                {
                                __context__.SourceCodeLine = 218;
                                if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (COMBINEROOMANDSOURCENAMES  .Value == 1) ) && Functions.TestForTrue ( Functions.BoolToInt (ROOMSOURCE[ ROOMNUMBERFROMINDEX ] .UshortValue != 0) )) ))  ) )
                                    {
                                    __context__.SourceCodeLine = 219;
                                    MakeString ( ROOMNAMEOUT__DOLLAR__ [ I] , "{0} ({1})", ROOMNAMEIN__DOLLAR__ [ ROOMNUMBERFROMINDEX ] , SOURCENAMEIN__DOLLAR__ [ ROOMSOURCE[ ROOMNUMBERFROMINDEX ] .UshortValue ] ) ;
                                    }

                                else
                                    {
                                    __context__.SourceCodeLine = 221;
                                    ROOMNAMEOUT__DOLLAR__ [ I]  .UpdateValue ( ROOMNAMEIN__DOLLAR__ [ ROOMNUMBERFROMINDEX ]  ) ;
                                    }

                                __context__.SourceCodeLine = 223;
                                ROOMICONSOUT [ I]  .Value = (ushort) ( ROOMICONSIN[ ROOMNUMBERFROMINDEX ] .UshortValue ) ;
                                __context__.SourceCodeLine = 225;
                                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (ROOMSOURCE[ ROOMNUMBERFROMINDEX ] .UshortValue != 0))  ) )
                                    {
                                    __context__.SourceCodeLine = 227;
                                    SOURCENAMEOUT__DOLLAR__ [ I]  .UpdateValue ( SOURCENAMEIN__DOLLAR__ [ ROOMSOURCE[ ROOMNUMBERFROMINDEX ] .UshortValue ]  ) ;
                                    __context__.SourceCodeLine = 229;
                                    NOWPLAYINGLINE1OUT__DOLLAR__ [ I]  .UpdateValue ( NOWPLAYINGLINE1IN__DOLLAR__ [ ROOMSOURCE[ ROOMNUMBERFROMINDEX ] .UshortValue ]  ) ;
                                    __context__.SourceCodeLine = 230;
                                    NOWPLAYINGLINE2OUT__DOLLAR__ [ I]  .UpdateValue ( NOWPLAYINGLINE2IN__DOLLAR__ [ ROOMSOURCE[ ROOMNUMBERFROMINDEX ] .UshortValue ]  ) ;
                                    __context__.SourceCodeLine = 231;
                                    NOWPLAYINGTRANSPORTOUT__DOLLAR__ [ I]  .UpdateValue ( NOWPLAYINGTRANSPORTIN__DOLLAR__ [ ROOMSOURCE[ ROOMNUMBERFROMINDEX ] .UshortValue ]  ) ;
                                    }

                                else
                                    {
                                    __context__.SourceCodeLine = 235;
                                    SOURCENAMEOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                                    __context__.SourceCodeLine = 237;
                                    NOWPLAYINGLINE1OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                                    __context__.SourceCodeLine = 238;
                                    NOWPLAYINGLINE2OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                                    __context__.SourceCodeLine = 239;
                                    NOWPLAYINGTRANSPORTOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                                    }

                                }

                            else
                                {
                                __context__.SourceCodeLine = 245;
                                ROOMNAMEOUT__DOLLAR__ [ I]  .UpdateValue ( "(Room Disabled)"  ) ;
                                __context__.SourceCodeLine = 246;
                                SOURCENAMEOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                                __context__.SourceCodeLine = 247;
                                NOWPLAYINGLINE1OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                                __context__.SourceCodeLine = 248;
                                NOWPLAYINGLINE2OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                                __context__.SourceCodeLine = 249;
                                NOWPLAYINGTRANSPORTOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                                __context__.SourceCodeLine = 250;
                                ROOMICONSOUT [ I]  .Value = (ushort) ( 0 ) ;
                                }

                            }

                        __context__.SourceCodeLine = 256;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (SELECTEDROOM  .UshortValue == ROOMNUMBERFROMINDEX) ) && Functions.TestForTrue ( Functions.BoolToInt (ROOMDISABLED[ ROOMNUMBERFROMINDEX ] .Value == 0) )) ))  ) )
                            {
                            __context__.SourceCodeLine = 258;
                            ITEMSELECTEDFB [ I]  .Value = (ushort) ( 1 ) ;
                            }

                        else
                            {
                            __context__.SourceCodeLine = 263;
                            ITEMSELECTEDFB [ I]  .Value = (ushort) ( 0 ) ;
                            }

                        __context__.SourceCodeLine = 266;
                        LINEVALID [ I]  .Value = (ushort) ( 1 ) ;
                        __context__.SourceCodeLine = 267;
                        SHOWLINE [ I]  .Value = (ushort) ( 1 ) ;
                        }

                    else
                        {
                        __context__.SourceCodeLine = 272;
                        ROOMNAMEOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                        __context__.SourceCodeLine = 273;
                        SOURCENAMEOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                        __context__.SourceCodeLine = 274;
                        NOWPLAYINGLINE1OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                        __context__.SourceCodeLine = 275;
                        NOWPLAYINGLINE2OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                        __context__.SourceCodeLine = 276;
                        NOWPLAYINGTRANSPORTOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                        __context__.SourceCodeLine = 277;
                        ITEMSELECTEDFB [ I]  .Value = (ushort) ( 0 ) ;
                        __context__.SourceCodeLine = 278;
                        LINEVALID [ I]  .Value = (ushort) ( 0 ) ;
                        __context__.SourceCodeLine = 279;
                        ROOMICONSOUT [ I]  .Value = (ushort) ( 0 ) ;
                        __context__.SourceCodeLine = 281;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt (ONSOURCESHARINGPAGE  .Value == 1))  ) )
                            {
                            __context__.SourceCodeLine = 282;
                            LINECHECKEDFB [ I]  .Value = (ushort) ( 0 ) ;
                            }

                        __context__.SourceCodeLine = 284;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt (SHOWSCROLLCONTROLS  .Value == 1))  ) )
                            {
                            __context__.SourceCodeLine = 285;
                            SHOWLINE [ I]  .Value = (ushort) ( 1 ) ;
                            }

                        else
                            {
                            __context__.SourceCodeLine = 287;
                            SHOWLINE [ I]  .Value = (ushort) ( 0 ) ;
                            }

                        }

                    __context__.SourceCodeLine = 156;
                    }

                }

            __context__.SourceCodeLine = 292;
            Functions.ProcessLogic ( ) ;
            __context__.SourceCodeLine = 293;
            SHOWSECONDARYSUBPAGES  .Value = (ushort) ( 1 ) ;
            __context__.SourceCodeLine = 295;
            CALCULATESCROLLBAR (  __context__ , (ushort)( SCROLLMAX ), (ushort)( INDEX )) ;
        }
        private void REDRAWHIGHLIGHT(  SplusExecutionContext __context__, ushort INDEX , ushort HIGHLIGHT , ushort PAGESIZE )
        {
            ushort I = 0;

            __context__.SourceCodeLine = 131;
            ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__1 = (ushort)PAGESIZE;
            int __FN_FORSTEP_VAL__1 = (int)1;
            for ( I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (I  >= __FN_FORSTART_VAL__1) && (I  <= __FN_FOREND_VAL__1) ) : ( (I  <= __FN_FORSTART_VAL__1) && (I  >= __FN_FOREND_VAL__1) ) ; I  += (ushort)__FN_FORSTEP_VAL__1)
                {
                __context__.SourceCodeLine = 133;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (((INDEX + I) - 1) == HIGHLIGHT))  ) )
                    {
                    __context__.SourceCodeLine = 135;
                    SCROLLHIGHLIGHTFB [ I]  .Value = (ushort) ( 1 ) ;
                    __context__.SourceCodeLine = 136;
                    ACTIVEBUTTONMODE [ I]  .Value = (ushort) ( 1 ) ;
                    __context__.SourceCodeLine = 137;
                    INACTIVEBUTTONMODE [ I]  .Value = (ushort) ( 1 ) ;
                    }

                else
                    {
                    __context__.SourceCodeLine = 141;
                    SCROLLHIGHLIGHTFB [ I]  .Value = (ushort) ( 0 ) ;
                    __context__.SourceCodeLine = 142;
                    ACTIVEBUTTONMODE [ I]  .Value = (ushort) ( 0 ) ;
                    __context__.SourceCodeLine = 143;
                    INACTIVEBUTTONMODE [ I]  .Value = (ushort) ( 0 ) ;
                    }

                __context__.SourceCodeLine = 131;
                }
        }
        private void REFRESHPAGE(  SplusExecutionContext __context__ )
        {
            ushort I = 0;

            __context__.SourceCodeLine = 120;
            ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__1 = (ushort)SCROLLPAGESIZE  .UshortValue;
            int __FN_FORSTEP_VAL__1 = (int)1;
            for ( I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (I  >= __FN_FORSTART_VAL__1) && (I  <= __FN_FOREND_VAL__1) ) : ( (I  <= __FN_FORSTART_VAL__1) && (I  >= __FN_FOREND_VAL__1) ) ; I  += (ushort)__FN_FORSTEP_VAL__1)
                {
                __context__.SourceCodeLine = 122;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( ((INDEX + I) - 1) <= SCROLLMAX ))  ) )
                    {
                    __context__.SourceCodeLine = 124;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt (LISTPOSITION[ ((INDEX + I) - 1) ] .UshortValue == 0))  ) )
                        {
                        __context__.SourceCodeLine = 126;
                        NAMEOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                        __context__.SourceCodeLine = 127;
                        SOURCEICONSOUT [ I]  .Value = (ushort) ( 0 ) ;
                        __context__.SourceCodeLine = 128;
                        NOWPLAYINGLINE1OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                        __context__.SourceCodeLine = 129;
                        NOWPLAYINGLINE2OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                        __context__.SourceCodeLine = 130;
                        NOWPLAYINGTRANSPORTOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                        }

                    else
                        {
                        __context__.SourceCodeLine = 134;
                        NAMEOUT__DOLLAR__ [ I]  .UpdateValue ( NAMEIN__DOLLAR__ [ LISTPOSITION[ ((INDEX + I) - 1) ] .UshortValue ]  ) ;
                        __context__.SourceCodeLine = 135;
                        SOURCEICONSOUT [ I]  .Value = (ushort) ( SOURCEICONSIN[ LISTPOSITION[ ((INDEX + I) - 1) ] .UshortValue ] .UshortValue ) ;
                        __context__.SourceCodeLine = 137;
                        NOWPLAYINGLINE1OUT__DOLLAR__ [ I]  .UpdateValue ( NOWPLAYINGLINE1IN__DOLLAR__ [ LISTPOSITION[ ((INDEX + I) - 1) ] .UshortValue ]  ) ;
                        __context__.SourceCodeLine = 138;
                        NOWPLAYINGLINE2OUT__DOLLAR__ [ I]  .UpdateValue ( NOWPLAYINGLINE2IN__DOLLAR__ [ LISTPOSITION[ ((INDEX + I) - 1) ] .UshortValue ]  ) ;
                        __context__.SourceCodeLine = 139;
                        NOWPLAYINGTRANSPORTOUT__DOLLAR__ [ I]  .UpdateValue ( NOWPLAYINGTRANSPORTIN__DOLLAR__ [ LISTPOSITION[ ((INDEX + I) - 1) ] .UshortValue ]  ) ;
                        }

                    __context__.SourceCodeLine = 142;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (SOURCEACTIVEIN  .UshortValue == LISTPOSITION[ ((INDEX + I) - 1) ] .UshortValue) ) && Functions.TestForTrue ( Functions.BoolToInt (SOURCEACTIVEIN  .UshortValue != 0) )) ))  ) )
                        {
                        __context__.SourceCodeLine = 144;
                        SELECTFB [ I]  .Value = (ushort) ( 1 ) ;
                        }

                    else
                        {
                        __context__.SourceCodeLine = 148;
                        SELECTFB [ I]  .Value = (ushort) ( 0 ) ;
                        }

                    __context__.SourceCodeLine = 151;
                    SHOWLINE [ I]  .Value = (ushort) ( 1 ) ;
                    }

                else
                    {
                    __context__.SourceCodeLine = 155;
                    NAMEOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                    __context__.SourceCodeLine = 156;
                    NOWPLAYINGLINE1OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                    __context__.SourceCodeLine = 157;
                    NOWPLAYINGLINE2OUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                    __context__.SourceCodeLine = 158;
                    NOWPLAYINGTRANSPORTOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                    __context__.SourceCodeLine = 159;
                    SELECTFB [ I]  .Value = (ushort) ( 0 ) ;
                    __context__.SourceCodeLine = 160;
                    SOURCEICONSOUT [ I]  .Value = (ushort) ( 0 ) ;
                    __context__.SourceCodeLine = 162;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt (SHOWSCROLLCONTROLS  .Value == 1))  ) )
                        {
                        __context__.SourceCodeLine = 163;
                        SHOWLINE [ I]  .Value = (ushort) ( 1 ) ;
                        }

                    else
                        {
                        __context__.SourceCodeLine = 165;
                        SHOWLINE [ I]  .Value = (ushort) ( 0 ) ;
                        }

                    }

                __context__.SourceCodeLine = 120;
                }

            __context__.SourceCodeLine = 169;
            CALCULATESCROLLBAR (  __context__ , (ushort)( SCROLLMAX ), (ushort)( INDEX )) ;
        }
 private CrestronString BYTETOSTRING (  SplusExecutionContext __context__, ushort CONVERT ) 
     { 
     CrestronString NUMBER;
     NUMBER  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 1, this );
     
     
     __context__.SourceCodeLine = 259;
     NUMBER  .UpdateValue ( ""  ) ; 
     __context__.SourceCodeLine = 260;
     switch ((int)CONVERT)
     
         { 
         case 0 : 
         
             { 
             __context__.SourceCodeLine = 262;
             NUMBER  .UpdateValue ( "0"  ) ; 
             __context__.SourceCodeLine = 263;
             break ; 
             } 
         
         goto case 1 ;
         case 1 : 
         
             { 
             __context__.SourceCodeLine = 266;
             NUMBER  .UpdateValue ( "1"  ) ; 
             __context__.SourceCodeLine = 267;
             break ; 
             } 
         
         goto case 2 ;
         case 2 : 
         
             { 
             __context__.SourceCodeLine = 270;
             NUMBER  .UpdateValue ( "2"  ) ; 
             __context__.SourceCodeLine = 271;
             break ; 
             } 
         
         goto case 3 ;
         case 3 : 
         
             { 
             __context__.SourceCodeLine = 274;
             NUMBER  .UpdateValue ( "3"  ) ; 
             __context__.SourceCodeLine = 275;
             break ; 
             } 
         
         goto case 4 ;
         case 4 : 
         
             { 
             __context__.SourceCodeLine = 278;
             NUMBER  .UpdateValue ( "4"  ) ; 
             __context__.SourceCodeLine = 279;
             break ; 
             } 
         
         goto case 5 ;
         case 5 : 
         
             { 
             __context__.SourceCodeLine = 282;
             NUMBER  .UpdateValue ( "5"  ) ; 
             __context__.SourceCodeLine = 283;
             break ; 
             } 
         
         goto case 6 ;
         case 6 : 
         
             { 
             __context__.SourceCodeLine = 286;
             NUMBER  .UpdateValue ( "6"  ) ; 
             __context__.SourceCodeLine = 287;
             break ; 
             } 
         
         goto case 7 ;
         case 7 : 
         
             { 
             __context__.SourceCodeLine = 290;
             NUMBER  .UpdateValue ( "7"  ) ; 
             __context__.SourceCodeLine = 291;
             break ; 
             } 
         
         goto case 8 ;
         case 8 : 
         
             { 
             __context__.SourceCodeLine = 294;
             NUMBER  .UpdateValue ( "8"  ) ; 
             __context__.SourceCodeLine = 295;
             break ; 
             } 
         
         goto case 9 ;
         case 9 : 
         
             { 
             __context__.SourceCodeLine = 298;
             NUMBER  .UpdateValue ( "9"  ) ; 
             __context__.SourceCodeLine = 299;
             break ; 
             } 
         
         goto case 10 ;
         case 10 : 
         
             { 
             __context__.SourceCodeLine = 302;
             NUMBER  .UpdateValue ( "#"  ) ; 
             __context__.SourceCodeLine = 303;
             break ; 
             } 
         
         goto case 11 ;
         case 11 : 
         
             { 
             __context__.SourceCodeLine = 306;
             NUMBER  .UpdateValue ( "*"  ) ; 
             __context__.SourceCodeLine = 307;
             break ; 
             } 
         
         goto case 12 ;
         case 12 : 
         
             { 
             __context__.SourceCodeLine = 310;
             NUMBER  .UpdateValue ( ","  ) ; 
             __context__.SourceCodeLine = 311;
             break ; 
             } 
         
         goto case 13 ;
         case 13 : 
         
             { 
             __context__.SourceCodeLine = 314;
             NUMBER  .UpdateValue ( "+"  ) ; 
             __context__.SourceCodeLine = 315;
             break ; 
             } 
         
         goto case 14 ;
         case 14 : 
         
             { 
             __context__.SourceCodeLine = 318;
             NUMBER  .UpdateValue ( ""  ) ; 
             __context__.SourceCodeLine = 319;
             break ; 
             } 
         
         goto case 15 ;
         case 15 : 
         
             { 
             __context__.SourceCodeLine = 322;
             NUMBER  .UpdateValue ( ""  ) ; 
             __context__.SourceCodeLine = 323;
             break ; 
             } 
         
         break;
         } 
         
     
     __context__.SourceCodeLine = 326;
     return ( NUMBER ) ; 
     
     }
        private void PROCESSSIGNALNAMES(  SplusExecutionContext __context__ )
        {
            ushort X = 0;

            __context__.SourceCodeLine = 172;
            ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__1 = (ushort)20;
            int __FN_FORSTEP_VAL__1 = (int)1;
            for ( X  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (X  >= __FN_FORSTART_VAL__1) && (X  <= __FN_FOREND_VAL__1) ) : ( (X  <= __FN_FORSTART_VAL__1) && (X  >= __FN_FOREND_VAL__1) ) ; X  += (ushort)__FN_FORSTEP_VAL__1)
            {
            __context__.SourceCodeLine = 174;
            AFFINITYCONTROL . SetSignalNameFromSymbolList ( (ushort)( X ), SIGNALNAME[ X ] .ToString()) ;
            __context__.SourceCodeLine = 175;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (DEBUG  .Value == 1))  ) )
                {
                __context__.SourceCodeLine = 177;
                Print( "S+:Scene Index Send to C# = {0:d}, Name = {1}\r\n", (short)X, SIGNALNAME [ X ] ) ;
                }

            __context__.SourceCodeLine = 172;
            }
        }
 private CrestronString BYTESTOSTRING (  SplusExecutionContext __context__, ushort INTHIGH , ushort INTLOW ) 
     { 
     ushort MASK = 0;
     
     CrestronString NUMBER;
     NUMBER  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 8, this );
     
     
     __context__.SourceCodeLine = 332;
     MASK = (ushort) ( 15 ) ; 
     __context__.SourceCodeLine = 334;
     MakeString ( NUMBER , "{0}{1}{2}{3}{4}{5}{6}{7}", BYTETOSTRING (  __context__ , (ushort)( (Crestron.Logos.SplusLibrary.Functions.RotateRight( (ushort)INTHIGH , 12 ) & MASK) )) , BYTETOSTRING (  __context__ , (ushort)( (Crestron.Logos.SplusLibrary.Functions.RotateRight( (ushort)INTHIGH , 8 ) & MASK) )) , BYTETOSTRING (  __context__ , (ushort)( (Crestron.Logos.SplusLibrary.Functions.RotateRight( (ushort)INTHIGH , 4 ) & MASK) )) , BYTETOSTRING (  __context__ , (ushort)( (INTHIGH & MASK) )) , BYTETOSTRING (  __context__ , (ushort)( (Crestron.Logos.SplusLibrary.Functions.RotateRight( (ushort)INTLOW , 12 ) & MASK) )) , BYTETOSTRING (  __context__ , (ushort)( (Crestron.Logos.SplusLibrary.Functions.RotateRight( (ushort)INTLOW , 8 ) & MASK) )) , BYTETOSTRING (  __context__ , (ushort)( (Crestron.Logos.SplusLibrary.Functions.RotateRight( (ushort)INTLOW , 4 ) & MASK) )) , BYTETOSTRING (  __context__ , (ushort)( (INTLOW & MASK) )) ) ; 
     __context__.SourceCodeLine = 335;
     return ( NUMBER ) ; 
     
     }
        private void GENERATEGROUPSMENUMAP(  SplusExecutionContext __context__ )
        {
            ushort I = 0;

            __context__.SourceCodeLine = 405;
            GROUPSITEMCOUNT = (ushort) ( 0 ) ;
            __context__.SourceCodeLine = 407;
            ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__1 = (ushort)6;
            int __FN_FORSTEP_VAL__1 = (int)1;
            for ( I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (I  >= __FN_FORSTART_VAL__1) && (I  <= __FN_FOREND_VAL__1) ) : ( (I  <= __FN_FORSTART_VAL__1) && (I  >= __FN_FOREND_VAL__1) ) ; I  += (ushort)__FN_FORSTEP_VAL__1)
                {
                __context__.SourceCodeLine = 409;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (GROUPSCONFIGURED[ I ] .Value == 1))  ) )
                    {
                    __context__.SourceCodeLine = 411;
                    GROUPSITEMCOUNT = (ushort) ( (GROUPSITEMCOUNT + 1) ) ;
                    __context__.SourceCodeLine = 412;
                    GROUPSMENUMAP [ GROUPSITEMCOUNT] = (ushort) ( I ) ;
                    }

                __context__.SourceCodeLine = 407;
                }

            __context__.SourceCodeLine = 416;
            GENERATEGROUPSMENU (  __context__  ) ;
        }
        private CrestronString SENDSTRING(  SplusExecutionContext __context__, CrestronString STRINGSEND )
        {
            ushort A = 0;
            ushort ICS = 0;

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

            __context__.SourceCodeLine = 136;
            ICS = (ushort) ( 0 ) ;
            __context__.SourceCodeLine = 137;
            ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__1 = (ushort)Functions.Length( STRINGSEND );
            int __FN_FORSTEP_VAL__1 = (int)1;
            for ( A  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (A  >= __FN_FORSTART_VAL__1) && (A  <= __FN_FOREND_VAL__1) ) : ( (A  <= __FN_FORSTART_VAL__1) && (A  >= __FN_FOREND_VAL__1) ) ; A  += (ushort)__FN_FORSTEP_VAL__1)
                {
                __context__.SourceCodeLine = 139;
                ICS = (ushort) ( (ICS + Byte( STRINGSEND , (int)( A ) )) ) ;
                __context__.SourceCodeLine = 137;
                }

            __context__.SourceCodeLine = 141;
            ICS = (ushort) ( (256 - ICS) ) ;
            __context__.SourceCodeLine = 142;
            SSTRINGFINAL  .UpdateValue ( STRINGSEND + Functions.Chr (  (int) ( ICS ) )  ) ;
            __context__.SourceCodeLine = 143;
            return ( SSTRINGFINAL ) ;
        }
        private void GENERATEGROUPSMENU(  SplusExecutionContext __context__ )
        {
            ushort I = 0;

            __context__.SourceCodeLine = 322;
            ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__1 = (ushort)GROUPSITEMCOUNT;
            int __FN_FORSTEP_VAL__1 = (int)1;
            for ( I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (I  >= __FN_FORSTART_VAL__1) && (I  <= __FN_FOREND_VAL__1) ) : ( (I  <= __FN_FORSTART_VAL__1) && (I  >= __FN_FOREND_VAL__1) ) ; I  += (ushort)__FN_FORSTEP_VAL__1)
                {
                __context__.SourceCodeLine = 324;
                GROUPSITEMS__DOLLAR__ [ I]  .UpdateValue ( GROUPSNAMES [ GROUPSMENUMAP[ I ] ]  ) ;
                __context__.SourceCodeLine = 326;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (GROUPSACTIVE[ GROUPSMENUMAP[ I ] ] .Value == 1))  ) )
                    {
                    __context__.SourceCodeLine = 327;
                    GROUPSICONSOUT [ I]  .Value = (ushort) ( 3 ) ;
                    }

                else
                    {
                    __context__.SourceCodeLine = 329;
                    GROUPSICONSOUT [ I]  .Value = (ushort) ( 0 ) ;
                    }

                __context__.SourceCodeLine = 322;
                }

            __context__.SourceCodeLine = 332;
            GROUPSITEMCOUNTOUT  .Value = (ushort) ( GROUPSITEMCOUNT ) ;
            __context__.SourceCodeLine = 334;
            GROUPSLABEL__DOLLAR__  .UpdateValue ( "Groups"  ) ;
        }
        private void GENERATESOURCESHAREROOMMAP(  SplusExecutionContext __context__ )
        {
            ushort I = 0;

            ushort COUNTER = 0;

            __context__.SourceCodeLine = 127;
            COUNTER = (ushort) ( 0 ) ;
            __context__.SourceCodeLine = 128;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( ROOMSCROLLMAX  .Value > 0 ))  ) )
                {
                __context__.SourceCodeLine = 130;
                ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
                ushort __FN_FOREND_VAL__1 = (ushort)ROOMSCROLLMAX  .Value;
                int __FN_FORSTEP_VAL__1 = (int)1;
                for ( I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (I  >= __FN_FORSTART_VAL__1) && (I  <= __FN_FOREND_VAL__1) ) : ( (I  <= __FN_FORSTART_VAL__1) && (I  >= __FN_FOREND_VAL__1) ) ; I  += (ushort)__FN_FORSTEP_VAL__1)
                    {
                    __context__.SourceCodeLine = 132;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (LISTPOSITION[ I ] .UshortValue != SELECTEDROOM  .UshortValue) ) && Functions.TestForTrue ( Functions.BoolToInt (LISTPOSITION[ I ] .UshortValue != SOURCESHAREEXCLUDEDROOM  .UshortValue) )) ))  ) )
                        {
                        __context__.SourceCodeLine = 134;
                        COUNTER = (ushort) ( (COUNTER + 1) ) ;
                        __context__.SourceCodeLine = 135;
                        SOURCESHAREROOMMAP [ COUNTER] = (ushort) ( LISTPOSITION[ I ] .UshortValue ) ;
                        }

                    __context__.SourceCodeLine = 130;
                    }

                __context__.SourceCodeLine = 139;
                SOURCESHARESCROLLMAX  .Value = (ushort) ( COUNTER ) ;
                __context__.SourceCodeLine = 141;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( SOURCESHARESCROLLMAX  .Value < 24 ))  ) )
                    {
                    __context__.SourceCodeLine = 143;
                    ushort __FN_FORSTART_VAL__2 = (ushort) ( (SOURCESHARESCROLLMAX  .Value + 1) ) ;
                    ushort __FN_FOREND_VAL__2 = (ushort)24;
                    int __FN_FORSTEP_VAL__2 = (int)1;
                    for ( I  = __FN_FORSTART_VAL__2; (__FN_FORSTEP_VAL__2 > 0)  ? ( (I  >= __FN_FORSTART_VAL__2) && (I  <= __FN_FOREND_VAL__2) ) : ( (I  <= __FN_FORSTART_VAL__2) && (I  >= __FN_FOREND_VAL__2) ) ; I  += (ushort)__FN_FORSTEP_VAL__2)
                        {
                        __context__.SourceCodeLine = 145;
                        SOURCESHAREROOMMAP [ I] = (ushort) ( 0 ) ;
                        __context__.SourceCodeLine = 143;
                        }

                    }

                }
        }
        private void GENERATEOPTIONSMENU(  SplusExecutionContext __context__ )
        {
            ushort I = 0;

            __context__.SourceCodeLine = 212;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( 0 < OPTIONSITEMCOUNT ))  ) )
                {
                __context__.SourceCodeLine = 214;
                ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
                ushort __FN_FOREND_VAL__1 = (ushort)OPTIONSITEMCOUNT;
                int __FN_FORSTEP_VAL__1 = (int)1;
                for ( I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (I  >= __FN_FORSTART_VAL__1) && (I  <= __FN_FOREND_VAL__1) ) : ( (I  <= __FN_FORSTART_VAL__1) && (I  >= __FN_FOREND_VAL__1) ) ; I  += (ushort)__FN_FORSTEP_VAL__1)
                    {
                    __context__.SourceCodeLine = 216;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt (OPTIONSMENUMAP[ I ] == 1))  ) )
                        {
                        __context__.SourceCodeLine = 218;
                        OPTIONSITEMS__DOLLAR__ [ I]  .UpdateValue ( OPTIONSMENU__DOLLAR__ [ 1 ]  ) ;
                        __context__.SourceCodeLine = 219;
                        OPTIONSICONSOUT [ I]  .Value = (ushort) ( ACTIVESOURCEICON  .UshortValue ) ;
                        }

                    else
                        {
                        __context__.SourceCodeLine = 221;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt (OPTIONSMENUMAP[ I ] == 2))  ) )
                            {
                            __context__.SourceCodeLine = 223;
                            OPTIONSITEMS__DOLLAR__ [ I]  .UpdateValue ( OPTIONSMENU__DOLLAR__ [ 2 ]  ) ;
                            __context__.SourceCodeLine = 224;
                            OPTIONSICONSOUT [ I]  .Value = (ushort) ( 200 ) ;
                            }

                        else
                            {
                            __context__.SourceCodeLine = 226;
                            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (OPTIONSMENUMAP[ I ] == 3))  ) )
                                {
                                __context__.SourceCodeLine = 228;
                                OPTIONSITEMS__DOLLAR__ [ I]  .UpdateValue ( OPTIONSMENU__DOLLAR__ [ 3 ]  ) ;
                                __context__.SourceCodeLine = 229;
                                OPTIONSICONSOUT [ I]  .Value = (ushort) ( 201 ) ;
                                }

                            else
                                {
                                __context__.SourceCodeLine = 231;
                                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (OPTIONSMENUMAP[ I ] == 4))  ) )
                                    {
                                    __context__.SourceCodeLine = 233;
                                    OPTIONSITEMS__DOLLAR__ [ I]  .UpdateValue ( OPTIONSMENU__DOLLAR__ [ 4 ]  ) ;
                                    __context__.SourceCodeLine = 234;
                                    OPTIONSICONSOUT [ I]  .Value = (ushort) ( 202 ) ;
                                    }

                                else
                                    {
                                    __context__.SourceCodeLine = 236;
                                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt (OPTIONSMENUMAP[ I ] == 5))  ) )
                                        {
                                        __context__.SourceCodeLine = 238;
                                        OPTIONSITEMS__DOLLAR__ [ I]  .UpdateValue ( OPTIONSMENU__DOLLAR__ [ 5 ]  ) ;
                                        __context__.SourceCodeLine = 239;
                                        OPTIONSICONSOUT [ I]  .Value = (ushort) ( 203 ) ;
                                        }

                                    else
                                        {
                                        __context__.SourceCodeLine = 241;
                                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt (OPTIONSMENUMAP[ I ] == 6))  ) )
                                            {
                                            __context__.SourceCodeLine = 243;
                                            OPTIONSITEMS__DOLLAR__ [ I]  .UpdateValue ( OPTIONSMENU__DOLLAR__ [ 6 ]  ) ;
                                            __context__.SourceCodeLine = 244;
                                            OPTIONSICONSOUT [ I]  .Value = (ushort) ( 204 ) ;
                                            }

                                        else
                                            {
                                            __context__.SourceCodeLine = 246;
                                            if ( Functions.TestForTrue  ( ( Functions.BoolToInt (OPTIONSMENUMAP[ I ] == 7))  ) )
                                                {
                                                __context__.SourceCodeLine = 248;
                                                OPTIONSITEMS__DOLLAR__ [ I]  .UpdateValue ( OPTIONSMENU__DOLLAR__ [ 7 ]  ) ;
                                                __context__.SourceCodeLine = 249;
                                                OPTIONSICONSOUT [ I]  .Value = (ushort) ( 206 ) ;
                                                }

                                            else
                                                {
                                                __context__.SourceCodeLine = 251;
                                                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (OPTIONSMENUMAP[ I ] == 101))  ) )
                                                    {
                                                    __context__.SourceCodeLine = 253;
                                                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (ACTIVESOURCE  .UshortValue != 0) ) && Functions.TestForTrue ( Functions.BoolToInt (SINGLESOURCE  .UshortValue == ACTIVESOURCE  .UshortValue) )) ))  ) )
                                                        {
                                                        __context__.SourceCodeLine = 254;
                                                        OPTIONSITEMS__DOLLAR__ [ I]  .UpdateValue ( OPTIONSMENU__DOLLAR__ [ 1 ]  ) ;
                                                        }

                                                    else
                                                        {
                                                        __context__.SourceCodeLine = 256;
                                                        OPTIONSITEMS__DOLLAR__ [ I]  .UpdateValue ( SINGLESOURCENAME  ) ;
                                                        }

                                                    __context__.SourceCodeLine = 258;
                                                    OPTIONSICONSOUT [ I]  .Value = (ushort) ( SINGLESOURCEICON  .UshortValue ) ;
                                                    }

                                                }

                                            }

                                        }

                                    }

                                }

                            }

                        }

                    __context__.SourceCodeLine = 214;
                    }

                }

            __context__.SourceCodeLine = 263;
            OPTIONSITEMCOUNTOUT  .Value = (ushort) ( OPTIONSITEMCOUNT ) ;
            __context__.SourceCodeLine = 265;
            OPTIONSLABEL__DOLLAR__  .UpdateValue ( "Media"  ) ;
        }
        private void GENERATESOURCESHAREROOMMAP(  SplusExecutionContext __context__ )
        {
            ushort I = 0;

            ushort COUNTER = 0;

            __context__.SourceCodeLine = 303;
            SOURCESHAREHIGHLIGHT = (ushort) ( 0 ) ;
            __context__.SourceCodeLine = 305;
            COUNTER = (ushort) ( 0 ) ;
            __context__.SourceCodeLine = 306;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( ROOMSCROLLMAX > 0 ))  ) )
                {
                __context__.SourceCodeLine = 308;
                ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
                ushort __FN_FOREND_VAL__1 = (ushort)ROOMSCROLLMAX;
                int __FN_FORSTEP_VAL__1 = (int)1;
                for ( I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (I  >= __FN_FORSTART_VAL__1) && (I  <= __FN_FOREND_VAL__1) ) : ( (I  <= __FN_FORSTART_VAL__1) && (I  >= __FN_FOREND_VAL__1) ) ; I  += (ushort)__FN_FORSTEP_VAL__1)
                    {
                    __context__.SourceCodeLine = 310;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (LISTPOSITION[ I ] .UshortValue != SELECTEDROOM  .UshortValue) ) && Functions.TestForTrue ( Functions.BoolToInt (LISTPOSITION[ I ] .UshortValue != SOURCESHAREEXCLUDEDROOM  .UshortValue) )) ))  ) )
                        {
                        __context__.SourceCodeLine = 312;
                        COUNTER = (ushort) ( (COUNTER + 1) ) ;
                        __context__.SourceCodeLine = 313;
                        SOURCESHAREROOMMAP [ COUNTER] = (ushort) ( LISTPOSITION[ I ] .UshortValue ) ;
                        }

                    __context__.SourceCodeLine = 308;
                    }

                __context__.SourceCodeLine = 317;
                SOURCESHARESCROLLMAX = (ushort) ( COUNTER ) ;
                __context__.SourceCodeLine = 319;
                SOURCESHAREHIGHLIGHT = (ushort) ( 1 ) ;
                __context__.SourceCodeLine = 321;
                ushort __FN_FORSTART_VAL__2 = (ushort) ( (SOURCESHARESCROLLMAX + 1) ) ;
                ushort __FN_FOREND_VAL__2 = (ushort)24;
                int __FN_FORSTEP_VAL__2 = (int)1;
                for ( I  = __FN_FORSTART_VAL__2; (__FN_FORSTEP_VAL__2 > 0)  ? ( (I  >= __FN_FORSTART_VAL__2) && (I  <= __FN_FOREND_VAL__2) ) : ( (I  <= __FN_FORSTART_VAL__2) && (I  >= __FN_FOREND_VAL__2) ) ; I  += (ushort)__FN_FORSTEP_VAL__2)
                    {
                    __context__.SourceCodeLine = 323;
                    SOURCESHAREROOMMAP [ I] = (ushort) ( 0 ) ;
                    __context__.SourceCodeLine = 321;
                    }

                }
        }
 private void INITIALIZESACN(  SplusExecutionContext __context__ )
 {
     __context__.SourceCodeLine = 78;
     SLAVE . InitializeFields ( (ushort)( UNIVERSE  .Value )) ;
 }
        private void HALTLINEVOLUMEADJUST(  SplusExecutionContext __context__ )
        {
            ushort I = 0;

            ushort ROOMNUMBERFROMINDEX = 0;

            __context__.SourceCodeLine = 334;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( SCROLLPAGESIZE  .UshortValue > 0 ))  ) )
                {
                __context__.SourceCodeLine = 336;
                ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
                ushort __FN_FOREND_VAL__1 = (ushort)SCROLLPAGESIZE  .UshortValue;
                int __FN_FORSTEP_VAL__1 = (int)1;
                for ( I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (I  >= __FN_FORSTART_VAL__1) && (I  <= __FN_FOREND_VAL__1) ) : ( (I  <= __FN_FORSTART_VAL__1) && (I  >= __FN_FOREND_VAL__1) ) ; I  += (ushort)__FN_FORSTEP_VAL__1)
                    {
                    __context__.SourceCodeLine = 338;
                    ROOMNUMBERFROMINDEX = (ushort) ( LISTPOSITION[ ((INDEX + I) - 1) ] .UshortValue ) ;
                    __context__.SourceCodeLine = 340;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt (ROOMNUMBERFROMINDEX != 0))  ) )
                        {
                        __context__.SourceCodeLine = 342;
                        OMNIVOLUMEUP [ ROOMNUMBERFROMINDEX]  .Value = (ushort) ( 0 ) ;
                        __context__.SourceCodeLine = 343;
                        OMNIVOLUMEDOWN [ ROOMNUMBERFROMINDEX]  .Value = (ushort) ( 0 ) ;
                        }

                    __context__.SourceCodeLine = 336;
                    }

                }
        }
        private void REFRESHPAGE(  SplusExecutionContext __context__ )
        {
            ushort I = 0;

            __context__.SourceCodeLine = 88;
            if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( 0 < SOURCESCROLLMAX  .Value ))  ) )
                {
                __context__.SourceCodeLine = 90;
                ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
                ushort __FN_FOREND_VAL__1 = (ushort)SOURCESCROLLMAX  .Value;
                int __FN_FORSTEP_VAL__1 = (int)1;
                for ( I  = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ( (I  >= __FN_FORSTART_VAL__1) && (I  <= __FN_FOREND_VAL__1) ) : ( (I  <= __FN_FORSTART_VAL__1) && (I  >= __FN_FOREND_VAL__1) ) ; I  += (ushort)__FN_FORSTEP_VAL__1)
                    {
                    __context__.SourceCodeLine = 92;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt (LISTPOSITION[ I ] .UshortValue == 0))  ) )
                        {
                        __context__.SourceCodeLine = 94;
                        NAMEOUT__DOLLAR__ [ I]  .UpdateValue ( ""  ) ;
                        __context__.SourceCodeLine = 95;
                        SOURCEICONSOUT [ I]  .Value = (ushort) ( 0 ) ;
                        }

                    else
                        {
                        __context__.SourceCodeLine = 99;
                        NAMEOUT__DOLLAR__ [ I]  .UpdateValue ( NAMEIN__DOLLAR__ [ LISTPOSITION[ I ] .UshortValue ]  ) ;
                        __context__.SourceCodeLine = 100;
                        SOURCEICONSOUT [ I]  .Value = (ushort) ( SOURCEICONSIN[ LISTPOSITION[ I ] .UshortValue ] .UshortValue ) ;
                        __context__.SourceCodeLine = 102;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt (SOURCEACTIVEIN  .UshortValue == LISTPOSITION[ I ] .UshortValue) ) && Functions.TestForTrue ( Functions.BoolToInt (SOURCEACTIVEIN  .UshortValue != 0) )) ))  ) )
                            {
                            __context__.SourceCodeLine = 104;
                            SOURCEICONSOUT [ I]  .Value = (ushort) ( (SOURCEICONSIN[ LISTPOSITION[ I ] .UshortValue ] .UshortValue + 100) ) ;
                            }

                        else
                            {
                            __context__.SourceCodeLine = 108;
                            SOURCEICONSOUT [ I]  .Value = (ushort) ( SOURCEICONSIN[ LISTPOSITION[ I ] .UshortValue ] .UshortValue ) ;
                            }

                        }

                    __context__.SourceCodeLine = 90;
                    }

                __context__.SourceCodeLine = 113;
                SOURCEHIGHLIGHTOUT  .Value = (ushort) ( 1 ) ;
                __context__.SourceCodeLine = 114;
                Functions.ProcessLogic ( ) ;
                __context__.SourceCodeLine = 116;
                SHIFTSOURCEHIGHLIGHTTOTOP  .Value = (ushort) ( 1 ) ;
                __context__.SourceCodeLine = 117;
                SHIFTSOURCEHIGHLIGHTTOTOP  .Value = (ushort) ( 0 ) ;
                }
        }