Exemplo n.º 1
0
        /// <summary>
        /// If the plug-in settings can be changed by the user,
        /// SDL Trados Studio will display a Settings button.
        /// By clicking this button, users raise the plug-in user interface,
        /// in which they can modify any applicable settings
        /// </summary>
        /// <param name="owner"></param>
        /// <param name="translationProvider"></param>
        /// <param name="languagePairs"></param>
        /// <param name="credentialStore"></param>
        /// <returns></returns>
        public bool Edit(IWin32Window owner, ITranslationProvider translationProvider, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore)
        {
            Log.logger.Trace("");
            TranslationProvider editProvider = translationProvider as TranslationProvider;

            if (editProvider == null)
            {
                return(false);
            }

            ProviderConfDialog dialog = new ProviderConfDialog(editProvider.Options, credentialStore, languagePairs);

            if (dialog.ShowDialog(owner) == DialogResult.OK)
            {
                editProvider.Options = dialog.Options;
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
 public TranslationProviderLanguageDirection(TranslationProvider provider, LanguagePair languages)
 {
     Log.Logger.Trace("");
     this.provider     = provider;
     languageDirection = languages;
 }