Exemplo n.º 1
0
 public static string GetHelpUrl(this Type type)
 {
     object[] objArray = AttributeUtility.GetCustomAttributes(type);
     for (int i = 0; i < (int)objArray.Length; i++)
     {
         HelpUrlAttribute infoAttribute = objArray[i] as HelpUrlAttribute;
         if (infoAttribute != null)
         {
             return(infoAttribute.Url);
         }
     }
     return(string.Empty);
 }
Exemplo n.º 2
0
        public static void OpenWikiPage(SkillStateAction action)
        {
            HelpUrlAttribute attribute = CustomAttributeHelpers.GetAttribute <HelpUrlAttribute>(action.GetType());

            if (attribute != null)
            {
                Application.OpenURL(attribute.get_Url());
                return;
            }
            string topic = Labels.StripNamespace(action.ToString());

            if (!EditorCommands.OpenWikiPage(topic))
            {
                EditorCommands.SearchWikiHelp(action);
            }
        }