//MainWindow Constructor public MainWindow() { InitializeComponent(); //Controller init Controller = new DictController(".\\Resources\\data.xml"); //Speech synthesizer init speechController = new SpeechSynthesizer(); //Populating 'to' and 'from' comboboxes defaultPopulateToAndFromComboBoxes(); }
//Reinstantiating default controller public void reinstantiateController(string url) { Controller = new DictController(url); defaultPopulateToAndFromComboBoxes(); this.ShowMessageAsync(String.Format("File \"{0}\" imported", url), "You can now use the new word set"); }