public override void SetSearchLabel(string displayName)
            {
                var labelProperty = _findReferencesWindow.GetType().GetProperty("Label");

                if (labelProperty != null)
                {
                    labelProperty.SetValue(_findReferencesWindow, displayName);
                }
            }
Exemplo n.º 2
0
 public override void SetSearchTitle(string title)
 {
     try
     {
         // Editor renamed their property from Label to Title, and made it public.
         // However, we don't have access to that property yet until they publish
         // their next SDK.  In the meantime, use reflection to get at the right
         // property.
         var titleProperty = _findReferencesWindow.GetType().GetProperty(
             "Title", BindingFlags.Public | BindingFlags.Instance);
         if (titleProperty != null)
         {
             titleProperty.SetValue(_findReferencesWindow, title);
         }
     }
     catch (Exception)
     {
     }
 }