/// <summary> /// Initializes the dialog's widgets. /// </summary> private void InitializeWidgets() { Config.RecognizerConfig config = Config.RecognizerConfig.Instance; this.outSettingsShowOutputCheck.Active = config.ShowOutputConversion; if (config.ShowOutputConversion) { this.outSettingsCommandEntry.Text = config.OutputConversionCommand; } }
private void OnOutSettingsOkBtnClicked(object sender, EventArgs args) { if (HasErrors()) { outputSettingsDialog.Respond(ResponseType.None); } else { Config.RecognizerConfig config = Config.RecognizerConfig.Instance; config.ShowOutputConversion = outSettingsShowOutputCheck.Active; config.OutputConversionCommand = config.ShowOutputConversion?this.outSettingsCommandEntry.Text.Trim():""; config.Save(); outputSettingsDialog.Respond(ResponseType.Ok); } }