public MainScreen() { InitializeComponent(); // Setup Api Stuff LoggingApiProvider loggingApiProvider = new LoggingApiProvider(); TextToSpeechApiProvider textToSpeechApiProvider = new TextToSpeechApiProvider(); // Setup Api Stuff that needs Text to speech support ProcessApiProvider processApiProvider = new ProcessApiProvider(textToSpeechApiProvider); RecognizerApiProvider p_Brain = new RecognizerApiProvider(textToSpeechApiProvider); // Setup Language Provider m_Brain = p_Brain; // HAHAHAHA science..... SetupLanguageProvider(); // Setup the Api Listing IDictionary<string, ApiProvider> apiListing = new ApiDictionary<string, ApiProvider>(); apiListing.Add("TextToSpeechApi", textToSpeechApiProvider); apiListing.Add("ProcessApi", processApiProvider); apiListing.Add("LoggingApi", loggingApiProvider); apiListing.Add("LoreiApi", m_Brain); // Setup Scripting Languages m_Brain.LoadScriptProcessor(new LuaScriptProcessor(apiListing)); m_Brain.LoadScriptProcessor(new IronPythonScriptProcessor(apiListing)); }
public AllProgramsProcessor(RecognizerApiProvider p_owner, IDictionary<string, ApiProvider> apiListing) { m_owner = p_owner; m_ProcApi = (ProcessApiProvider)apiListing["ProcessApi"]; //Get the list of programs. Returns a List with keyvalue pairs of just the shortcut name, Full path m_ListOfPrograms = GetAllShortcuts(); //Register them. RegisterAllProgramsWithLorei(m_ListOfPrograms); }