public ITranslationProvider[] Browse(IWin32Window owner, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore) { var translationProviders = FileBasedTranslationProviderUi.Browse(owner, languagePairs, credentialStore); var translationProvider = translationProviders[0]; using (var sourceConfigurationForm = new SourceTmConfiguration(translationProvider.Uri)) { sourceConfigurationForm.ShowDialog(); } return(new ITranslationProvider[] { new AddSourceTmTranslationProvider(translationProvider) }); }
public bool Edit(IWin32Window owner, ITranslationProvider translationProvider, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore) { var tProvider = translationProvider as AddSourceTmTranslationProvider; bool result = false; if (tProvider != null) { result = FileBasedTranslationProviderUi.Edit(owner, tProvider.FileBasedTranslationProvider, languagePairs, credentialStore); } using (var sourceConfigurationForm = new SourceTmConfiguration(translationProvider.Uri)) { sourceConfigurationForm.ShowDialog(); } return(result); }