Exemple #1
0
        object CONFIGSAVE_OnPush_4(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                CentralScheduler.SaveConfig();
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Exemple #2
0
        public override object FunctionMain(object __obj__)
        {
            ushort I = 0;

            ClcScheduler.GlobalActionHelper HELPER;
            HELPER = new ClcScheduler.GlobalActionHelper();

            CentralScheduler.SetStorageBaseDirectory(STORAGEBASEDIRECTORY.ToString());

            try
            {
                SplusExecutionContext __context__ = SplusFunctionMainStartCode();

                __context__.SourceCodeLine = 179;
                HELPER = CentralScheduler.GlobalActionHelper;
                __context__.SourceCodeLine = 180;
                LAT.UpdateValue(LATITUDE);
                __context__.SourceCodeLine = 181;
                LON.UpdateValue(LONGITUDE);
                __context__.SourceCodeLine = 182;
                // RegisterEvent( CentralScheduler , ONCONFIGLOADED , HANDLECONFIGLOADED )
                try { g_criticalSection.Enter(); CentralScheduler.OnConfigLoaded += HANDLECONFIGLOADED; } finally { g_criticalSection.Leave(); }
                ;
                __context__.SourceCodeLine = 183;
                // RegisterEvent( CentralScheduler , ONCONFIGSAVED , HANDLECONFIGSAVED )
                try { g_criticalSection.Enter(); CentralScheduler.OnConfigSaved += HANDLECONFIGSAVED; } finally { g_criticalSection.Leave(); }
                ;
                __context__.SourceCodeLine = 184;
                // RegisterEvent( HELPER , ONGLOBALACTION , HANDLEGLOBALACTIONCHG )
                try { g_criticalSection.Enter(); HELPER.OnGlobalAction += HANDLEGLOBALACTIONCHG; } finally { g_criticalSection.Leave(); }
                ;
                __context__.SourceCodeLine = 185;
                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 = 186;
                    if (Functions.TestForTrue((IsSignalDefined(GLOBALACTION[I]))))
                    {
                        __context__.SourceCodeLine = 187;
                        CentralScheduler.RegisterGlobalAction((ushort)(I), GLOBALACTIONNAME[I].ToString());
                    }

                    __context__.SourceCodeLine = 185;
                }

                __context__.SourceCodeLine = 188;
                WaitForInitializationComplete( );
                __context__.SourceCodeLine = 189;
                Functions.Delay((int)(2000));
                __context__.SourceCodeLine = 190;
                if (Functions.TestForTrue((CONFIGLOAD.Value)))
                {
                    __context__.SourceCodeLine = 191;
                    LOADCONFIG(__context__);
                }

                __context__.SourceCodeLine = 192;
                READY = (ushort)(1);
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(); }
            return(__obj__);
        }
Exemple #3
0
 private void LOADCONFIG(SplusExecutionContext __context__)
 {
     CentralScheduler.LoadConfig();
 }