/// <summary> /// Swaps the langauges (source and dest) /// </summary> public void SwapLangauges() { LanguageInformation temp = ToLanguage; ToLanguage = FromLanguage; FromLanguage = temp; App.Translator.FromPhrase = String.Empty; App.Translator.ToPhrase = String.Empty; }
/// <summary> /// Given one LanguageInformation, find the first different one in the availible ones. /// </summary> /// <param name="avoid"></param> /// <returns>The LanguageInforation object that does not match the "avoid" specimen</returns> public LanguageInformation FindDifferentLanguage(LanguageInformation avoid) { return (from found in AvailableLangauges where !found.Equals(avoid) select found).FirstOrDefault<LanguageInformation>(); }