public bool Edit(IWin32Window owner, ITranslationProvider translationProvider, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore)
        {
            var editProvider = translationProvider as DeepLMtTranslationProvider;

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

            //get saved key if there is one and put it into options
            var savedCredentials = GetCredentials(credentialStore, "deeplprovider:///");

            if (savedCredentials != null)
            {
                editProvider.Options.ApiKey = savedCredentials.Credential;
            }

            var dialog = new DeepLMtDialog(editProvider.Options, credentialStore);

            if (dialog.ShowDialog(owner) == DialogResult.OK)
            {
                editProvider.Options = dialog.Options;
                var apiKey = editProvider.Options.ApiKey;
                SetDeeplCredentials(credentialStore, apiKey, true);
                return(true);
            }
            return(false);
        }
        public ITranslationProvider[] Browse(IWin32Window owner, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore)
        {
            var options = new DeepLTranslationOptions();

            //get credentials
            var getCredGt = GetCredentials(credentialStore, "deeplprovider:///");
            var dialog    = new DeepLMtDialog(options, credentialStore);

            if (dialog.ShowDialog(owner) == DialogResult.OK)
            {
                var provider = new DeepLMtTranslationProvider(options);
                var apiKey   = dialog.Options.ApiKey;
                SetDeeplCredentials(credentialStore, apiKey, true);
                return(new ITranslationProvider[] { provider });
            }
            return(null);
        }