public Color GetTextColor(AppQuery baseQuery, int index = 0) { int colorValue = Convert.ToInt32(App.Query(x => baseQuery.Invoke("getCurrentTextColor"))[index]); var color = Color.FromArgb(colorValue); return(color); }
public List <Color> GetTextColors(AppQuery baseQuery) { var colors = App.Query(x => baseQuery.Invoke("getCurrentTextColor")) .Select(value => Color.FromArgb(Convert.ToInt32(value))) .ToList(); return(colors); }
public List <Color> GetBackgroundColors(AppQuery baseQuery) { var colorValues = App.Query(x => baseQuery.Invoke("getBackground").Invoke("getColor")) .Select(value => Convert.ToInt32(value)) .ToList(); var colors = new List <Color>(); foreach (var colorValue in colorValues) { var color = Color.FromArgb(colorValue); colors.Add(color); } return(colors); }
/// <summary> /// Invokes a method on the object returned by the query, using the <see cref="AppQuery.Invoke(string, object)"/> method. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="query"></param> /// <param name="methodName"></param> /// <param name="arg1"></param> /// <returns></returns> public static AppTypedSelector <object> InvokeGeneric(this AppQuery query, string methodName, object arg1) => query.Invoke(FormatBackdoorMethodName(methodName), arg1);
public static AppTypedSelector <object> GetDependencyPropertyValue(this AppQuery query, string dependencyPropertyName) { return(query .Invoke(FormatBackdoorMethodName("GetDependencyPropertyValue"), dependencyPropertyName)); }