Пример #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));
 }