public ITranslationProvider[] Browse(IWin32Window owner, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore)
        {
            var translationProviders = FileBasedTranslationProviderUi.Browse(owner, languagePairs, credentialStore);
            if (translationProviders.Length == 0) return null;
            var translationProvider = translationProviders[0];
            using (var sourceConfigurationForm = new SourceTmConfiguration(translationProvider.Uri))
            {
                sourceConfigurationForm.ShowDialog();
            }
            

            return new ITranslationProvider[] {new RecordSourceTuTmTranslationProvider(translationProvider)};
        }
        public bool Edit(IWin32Window owner, ITranslationProvider translationProvider, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore)
        {
            var tProvider = translationProvider as RecordSourceTuTmTranslationProvider;
            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;
        }
Ejemplo n.º 3
0
        public bool Edit(IWin32Window owner, ITranslationProvider translationProvider, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore)
        {
            var  tProvider = translationProvider as RecordSourceTuTmTranslationProvider;
            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);
        }
Ejemplo n.º 4
0
        public ITranslationProvider[] Browse(IWin32Window owner, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore)
        {
            var translationProviders = FileBasedTranslationProviderUi.Browse(owner, languagePairs, credentialStore);

            if (translationProviders.Length == 0)
            {
                return(null);
            }
            var translationProvider = translationProviders[0];

            using (var sourceConfigurationForm = new SourceTmConfiguration(translationProvider.Uri))
            {
                sourceConfigurationForm.ShowDialog();
            }


            return(new ITranslationProvider[] { new RecordSourceTuTmTranslationProvider(translationProvider) });
        }