Example #1
0
 private async Task OnTranslationEngineChange(TranslationEngineChangeEventArgs ea)
 {
     await this.UIThreadAsync(() =>
     {
         if (ea.NewEngine != TransaltorComboBox.SelectedIndex)
         {
             TransaltorComboBox.SelectedIndex = ea.NewEngine;
         }
         LoadComboBoxes(ea.SupportedLanguages);
     });
 }
Example #2
0
        private async Task OnTranslationEngineChange(TranslationEngineChangeEventArgs ea)
        {
            var trEng = (TranslationEngine)ea.NewEngine;

            _TranslationEngines = _TranslationEngines.OrderBy(x => x.Value * -1).ToList();

            var ind = _TranslationEngines.FindIndex(x => x.TranslationEngine == trEng);

            _TranslationEngines.Swap(ind, 0);

            _WebTranslator.CurrentTranslationEngine = (WebTranslator.TranslationEngine)ea.NewEngine;
        }