/// <summary> /// Initialize the local translation client /// </summary> private void InitializeTranslationClient() { // create the IPC proxy to the translation service and initialize the panel if (null != Client) { Client.Dispose(); } Client = new TranslationClient(); comboBoxSourceLanguage.DataSource = Client.DataService.AvailableTranslations; comboBoxTargetLanguage.DataSource = Client.DataService.AvailableTranslations; comboBoxSourceLanguage.SelectedItem = "English"; comboBoxTargetLanguage.SelectedItem = "German"; }
/// <summary> /// Creates an instance of the class /// </summary> public TranslationPane() { try { InitializeComponent(); // create the IPC proxy to the translation service and initialize the panel Client = new TranslationClient(); comboBoxSourceLanguage.DataSource = Client.DataService.AvailableTranslations; comboBoxTargetLanguage.DataSource = Client.DataService.AvailableTranslations; comboBoxSourceLanguage.SelectedItem = "English"; comboBoxTargetLanguage.SelectedItem = "German"; } catch (Exception exception) { ShowError(string.Format("An errror occured. Details: {0}", exception.Message)); } }
/// <summary> /// Initialize the local translation client /// </summary> private void InitializeTranslationClient() { // create the IPC proxy to the translation service and initialize the panel if (null != Client) Client.Dispose(); Client = new TranslationClient(); comboBoxSourceLanguage.DataSource = Client.DataService.AvailableTranslations; comboBoxTargetLanguage.DataSource = Client.DataService.AvailableTranslations; comboBoxSourceLanguage.SelectedItem = "English"; comboBoxTargetLanguage.SelectedItem = "German"; }