public static string GetTranslation(string languageTranslateFrom, string languageTranslateTo, string phraseToTranslate, string GetSet) { string retVal = ""; if (sChromeInstance == null) { sChromeInstance = new SeleniumChrome(); } retVal = sChromeInstance.SpeakTranslation(languageTranslateFrom, languageTranslateTo, phraseToTranslate, GetSet); if (GetSet.Equals("set", StringComparison.OrdinalIgnoreCase)) { if (retVal != null && retVal != string.Empty) { System.Windows.Forms.Clipboard.SetText(retVal); } retVal = ""; } else if (GetSet.Equals("get", StringComparison.OrdinalIgnoreCase)) { if (retVal != null) { Console.WriteLine(retVal); } } return(retVal); }
public static string SpeakTranslation(string languageTranslateFrom, string languageTranslateTo, string phraseToTranslate) { string retVal = ""; if (sChromeInstance == null) { sChromeInstance = new SeleniumChrome(); } sChromeInstance.SpeakTranslation(languageTranslateFrom, languageTranslateTo, phraseToTranslate, ""); return(retVal); }