MtEnhancedTradosPlugin.MtTranslationOptions.GetProviderTypeDescription C# (CSharp) 메소드

GetProviderTypeDescription() 공개 정적인 메소드

public static GetProviderTypeDescription ( ProviderType type ) : string
type ProviderType
리턴 string
        public static string GetProviderTypeDescription(ProviderType type)
        {
            if (type == ProviderType.GoogleTranslate)
                return gTranslateString; //these strings should not be localized and are therefore hard-coded
            else if (type == ProviderType.MicrosoftTranslator)
                return msTranslatorString; //these strings should not be localized and are therefore hard-coded
            else
                return "";
        }

Usage Example

        private void UpdateDialog()
        {
            showcredsloc             = groupBoxMT.Location; //holds our location of where to place the group box we are showing
            textApiKey.Text          = Options.apiKey;
            txtClientId.Text         = Options.ClientID;
            txtClientSecret.Text     = Options.ClientSecret;
            chkSaveKey.Checked       = Options.persistGoogleKey;
            chkSaveCred.Checked      = Options.persistMicrosoftCreds;
            chkPlainTextOnly.Checked = Options.SendPlainTextOnly;
            comboProvider.Text       = MtTranslationOptions.GetProviderTypeDescription(Options.SelectedProvider);
            chkCatId.Checked         = Options.UseCatID;
            txtCatId.Text            = Options.CatID;
            chkResendDrafts.Checked  = Options.ResendDrafts;
            chkUsePreEdit.Checked    = Options.UsePreEdit;
            chkUsePostEdit.Checked   = Options.UsePostEdit;
            txtPreEditFileName.Text  = Options.PreLookupFilename;
            txtPostEditFileName.Text = Options.PostLookupFilename;


            //enable/disable controls
            groupBoxPostedit.Enabled = chkUsePostEdit.Checked;
            groupBoxPreedit.Enabled  = chkUsePreEdit.Checked;
            txtCatId.Enabled         = chkCatId.Checked;

            this.Icon = MtProviderConfDialogResources.form_Icon;

            ShowCredBox();
            try
            {
                LoadResources();
            }
            catch { }
        }