コード例 #1
0
        private void GoogleOrMicrosoftTranslate_Shown(object sender, EventArgs e)
        {
            _googleTranslationService    = GoogleTranslationInitializer.Init();
            _microsoftTranslationService = MicrosoftTranslationInitializer.Init(true);

            InitLanguageComboboxes();

            Refresh();
            Translate();
        }
コード例 #2
0
        private void InitTranslationServices()
        {
            AddTranslationService(GoogleTranslationInitializer.Init(this));
            AddTranslationService(MicrosoftTranslationInitializer.Init());
            AddTranslationService(new NikseDkTranslationService());

            if (comboBoxTranslationServices.Items.Count > 0 && comboBoxTranslationServices.SelectedIndex < 0)
            {
                comboBoxTranslationServices.SelectedIndex = 0;
            }
        }