private void buttonShow_Click(object sender, EventArgs e) { options = new IntentoMTFormOptions(); options.ApiKey = textBoxApiKey.Text; options.SmartRouting = checkBoxSmartRouting.Checked; options.Routing = textBoxRouting.Text; options.ProviderId = textBoxProviderId.Text; options.Format = textBoxFormat.Text; options.UseCustomAuth = checkBoxAuth.Checked; options.CustomAuth = textBoxAuth.Text; options.UseCustomModel = checkBoxModel.Checked; options.CustomModel = textBoxModel.Text; options.Glossary = checkBoxSmartRouting.Checked ? string.Empty : textBoxGlossary.Text; options.ForbidSaveApikey = checkBoxForbidSaveApikey.Checked; options.FromLanguage = textBoxFrom.Text; options.ToLanguage = textBoxTo.Text; options.UserAgent = "TestForm/1.0.0"; options.Signature = "TestForm"; options.AppName = checkBoxTradosApp.Checked ? "SdlTradosStudioPlugin" : "TestForm"; options.CustomTagParser = checkBoxCustomTagParser.Checked; options.CutTag = CheckBoxCutTag.Checked; options.proxySettings = new IntentoSDK.ProxySettings() { ProxyAddress = textBoxAddress.Text, ProxyPort = textBoxPort.Text, ProxyUserName = textBoxUserName.Text, ProxyPassword = textBoxPassword.Text, ProxyEnabled = checkBoxProxy.Checked }; if (checkBoxForbidSaveApikey.Checked) { options.ForbidSaveApikey = true; } if (checkBoxHideHiddenTextButton.Checked) { options.HideHiddenTextButton = true; } options.TraceEndTime = DateTime.Now.AddMinutes(checkBox1.Checked ? 30 : -40); IntentoTranslationProviderOptionsForm.LangPair[] languagePair = new IntentoTranslationProviderOptionsForm.LangPair[1] { new IntentoTranslationProviderOptionsForm.LangPair( String.IsNullOrWhiteSpace(textBoxFrom.Text) ? "en" : textBoxFrom.Text, String.IsNullOrWhiteSpace(textBoxTo.Text) ? "de" : textBoxTo.Text ) }; IntentoTranslationProviderOptionsForm form = new IntentoTranslationProviderOptionsForm(options, languagePair, Fabric); form.FormClosed += Form_Closed; form.Show(); }
public IntentoFormAdvanced(IntentoTranslationProviderOptionsForm form) { InitializeComponent(); parent = form; LocalizeContent(); }