public bool Edit(IWin32Window owner, ITranslationProvider translationProvider, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore) { TmxMallTranslationProvider tmxMallTranslationProvider = translationProvider as TmxMallTranslationProvider; bool flag = tmxMallTranslationProvider != null; bool result; if (flag) { TmxMallOptions tmxMallOptions = TmxMallOptions.FromCredentialStore(credentialStore); TmxMallConfDialog tmxMallConfDialog = new TmxMallConfDialog(tmxMallOptions); bool flag2 = tmxMallConfDialog.ShowDialog() == DialogResult.OK; if (flag2) { tmxMallTranslationProvider.UpdateOptions(tmxMallOptions); tmxMallOptions.ToCredentialStore(credentialStore); result = true; return(result); } } result = false; return(result); }
public ITranslationProvider[] Browse(IWin32Window owner, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore) { TmxMallOptions tmxMallOptions = TmxMallOptions.FromCredentialStore(credentialStore); TmxMallConfDialog tmxMallConfDialog = new TmxMallConfDialog(tmxMallOptions); bool flag = tmxMallConfDialog.ShowDialog(owner) == DialogResult.OK; ITranslationProvider[] result; if (flag) { TmxMallTranslationProvider tmxMallTranslationProvider = new TmxMallTranslationProvider(tmxMallConfDialog.Options); tmxMallTranslationProvider.UpdateOptions(tmxMallOptions); tmxMallOptions.ToCredentialStore(credentialStore); result = new ITranslationProvider[] { tmxMallTranslationProvider }; } else { result = null; } return(result); }