Ejemplo n.º 1
0
 /// <summary>
 /// Gets a property on a window via reflection.
 /// </summary>
 public static PropertyInfo Property(this HUMEditorTypes.Data.Window window, string name)
 {
     return(window.window.GetType().GetProperty(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Finds a field within an editor window via reflection.
 /// </summary>
 public static FieldInfo Field(this HUMEditorTypes.Data.Window window, string name)
 {
     return(window.window.GetType().GetField(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets te value of a field via reflection.
 /// </summary>
 public static T FieldValue <T>(this HUMEditorTypes.Data.Window window, string name)
 {
     return((T)window.window.GetType().GetField(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).GetValue(window.window));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Gets the host view of this window.
 /// </summary>
 /// <param name="window"></param>
 /// <returns></returns>
 public static object HostView(this HUMEditorTypes.Data.Window window)
 {
     return(FieldValue(window, "m_Parent"));
 }