public void Load(HomeSimCockpitSDK.ILog log)
        {
            _log = log;

            _timers = new Timer[50];
            for (int i = 0; i < _timers.Length; i++)
            {
                _timers[i] = new Timer(this, i);
            }

            _functions = new HomeSimCockpitSDK.ModuleFunctionInfo[] {
                new HomeSimCockpitSDK.ModuleFunctionInfo("SetTimer", "Funkcja konfiguruje zdarzenie czasowe, argumenty: identyfikator timer'a, interwał (w ms), ilość zdarzeń (< 1 - nieskończenie wiele), przykład: SetTimer(\"timer_00\", 500, 100) - 100 zdarzeń co pół sekundy (500ms).", 3, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(_SetTimer))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("StartTimer", "Uruchamia wskazany timer, np. StartTimer(\"timer_01\").", 1, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(_StartTimer))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("StopTimer", "Zatrzymuje wskazany timer, np. StopTimer(\"timer_01\").", 1, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(_StopTimer))
            };
        }
Beispiel #2
0
        public override void PrzypiszReferencje(ISlownikFunkcjiModulow slownik)
        {
            base.PrzypiszReferencje(slownik);

            HomeSimCockpitSDK.ModuleFunctionInfo info = slownik.PobierzFunkcje(Modul, Nazwa);
            if (info != null)
            {
                if (info.ArgumentsNumber != -1 && info.ArgumentsNumber != argumenty.Length)
                {
                    throw new CheckingScriptException(string.Format(UI.Language.Instance.GetString(UI.UIStrings.IncorrectArgumentNumber2), Nazwa, Modul, info.ArgumentsNumber));
                }
                _funkcja = info.Function;
            }
            else
            {
                throw new CheckingScriptException(string.Format(UI.Language.Instance.GetString(UI.UIStrings.FunctionNotFoundInModule), Modul, Nazwa));
            }
        }
Beispiel #3
0
        public fsCockpitModule()
        {
            _fcuFunctions = new HomeSimCockpitSDK.ModuleFunctionInfo[]
            {
                new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_Enable", "", 1, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_Enable))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_SetBacklightBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_SetBacklightBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_SetKeyBacklightBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_SetKeyBacklightBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_SetKeyIndicatorsBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_SetKeyIndicatorsBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_SetIndicatorsBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_SetIndicatorsBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_SetDisplayBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_SetDisplayBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_SetSPDDisplay", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_SetSPDDisplay))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_SetHDGDisplay", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_SetHDGDisplay))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_SetALTDisplay", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_SetALTDisplay))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_SetVSDisplay", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_SetVSDisplay))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_SetIndicators", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_SetIndicators))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("FCU_SetKeyIndicators", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(FCU_SetKeyIndicators))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("COMNAV_Enable", "", 1, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(COMNAV_Enable))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("COMNAV_SetBacklightBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(COMNAV_SetBacklightBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("COMNAV_SetLEDsBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(COMNAV_SetLEDsBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("COMNAV_SetDisplaysBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(COMNAV_SetDisplaysBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("COMNAV_SetLeftDisplay", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(COMNAV_SetLeftDisplay))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("COMNAV_SetRightDisplay", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(COMNAV_SetRightDisplay))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("COMNAV_SetLEDs", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(COMNAV_SetLEDs))


                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_Enable", "", 1, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_Enable))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetBacklightBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetBacklightBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetDisplayBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetDisplayBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetBaroQnhIndicatorsBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetBaroQnhIndicatorsBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetKeyIndicatorsBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetKeyIndicatorsBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetKeyBacklightBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetKeyBacklightBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetAutoLandIndicatorBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetAutoLandIndicatorBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetMasterWarningIndicatorBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetMasterWarningIndicatorBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetMasterCautionIndicatorBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetMasterCautionIndicatorBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetArrowIndicatorBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetArrowIndicatorBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetStickPriorityIndicatorBrightness", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetStickPriorityIndicatorBrightness))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetDisplay", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetDisplay))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetIndicators", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetIndicators))
                , new HomeSimCockpitSDK.ModuleFunctionInfo("EFIS_SetKeyIndicators", "", 2, new HomeSimCockpitSDK.ModuleExportedFunctionDelegate(EFIS_SetKeyIndicators))
            };
        }