コード例 #1
0
        public void Run(string programid, string optionstring)
        {
            //TODO: improve locking for single instance run only
            ProgramBlock pb = _homegenie.ProgramEngine.Programs.Find(p => p.Address.ToString() == programid || p.Name == programid);

            pb.IsRunning = true;
            if (pb.Type.ToLower() == "csharp")
            {
                pb.RunScript(_homegenie, optionstring);
            }
            else
            {
                _homegenie.ProgramEngine.ExecuteWizardScript(pb);
            }
            pb.IsRunning = false;
        }