Example #1
0
        public ITranslationProvider[] Browse(IWin32Window owner, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore)
        {
            NeurotolgeConfDialog dialog = new NeurotolgeConfDialog(new ListTranslationOptions(), languagePairs);

            if (dialog.ShowDialog(owner) == DialogResult.OK)
            {
                ListTranslationProvider testProvider = new ListTranslationProvider(dialog.Options);
                return(new ITranslationProvider[] { testProvider });
            }
            return(null);
        }
Example #2
0
        public bool Edit(IWin32Window owner, ITranslationProvider translationProvider, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore)
        {
            ListTranslationProvider editProvider = translationProvider as ListTranslationProvider;

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

            NeurotolgeConfDialog dialog = new NeurotolgeConfDialog(editProvider.Options, languagePairs);

            if (dialog.ShowDialog(owner) == DialogResult.OK)
            {
                editProvider.Options = dialog.Options;
                return(true);
            }
            return(false);
        }