private static bool initEventEnabled(string name) { Script script = null; SpeechResponderConfiguration config = SpeechResponderConfiguration.FromFile(); if (config != null) { Personality personality = Personality.FromName(config.Personality); personality.Scripts.TryGetValue(name, out script); } return(script == null ? false : script.Enabled); }