예제 #1
0
 /// <summary>
 /// Gets a field on a host view window via reflection.
 /// </summary>
 public static T FieldValue <T>(this HUMEditorTypes.Data.GetHostView window, string name)
 {
     return((T)window.window.GetType().GetField(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).GetValue(window.window));
 }
예제 #2
0
 /// <summary>
 /// Gets a field on a host view window via reflection.
 /// </summary>
 public static object FieldValue(this HUMEditorTypes.Data.GetHostView hostView, string name)
 {
     return(hostView.window.GetType().GetField(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).GetValue(hostView.window));
 }
예제 #3
0
 /// <summary>
 /// Gets a properties value on a host view window via reflection.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="hostView"></param>
 /// <param name="name"></param>
 /// <returns></returns>
 public static T PropertyValue <T>(this HUMEditorTypes.Data.GetHostView hostView, string name)
 {
     return((T)hostView.window.GetType().GetProperty(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).GetValue(hostView.window));
 }
예제 #4
0
 /// <summary>
 /// The inner view of the window. For instance, inside tab window, its below the tab area.
 /// </summary>
 public static object ActualView(this HUMEditorTypes.Data.GetHostView hostView)
 {
     return(PropertyValue(hostView, "m_ActualView"));
 }
예제 #5
0
 /// <summary>
 /// Gets a property on a host view window via reflection.
 /// </summary>
 public static PropertyInfo Property(this HUMEditorTypes.Data.GetHostView hostView, string name)
 {
     return(hostView.window.GetType().GetProperty(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic));
 }