public static string FrameworkId(this WindowsFramework framework)
        {
            var type        = typeof(WindowsFramework);
            var frameworkId = framework.ToString();
            var memInfo     = type.GetMember(frameworkId);

            if (memInfo.Length <= 0)
            {
                return(frameworkId);
            }
            var attrs = memInfo[0].GetCustomAttributes(typeof(FrameworkIdAttribute), false);

            return(attrs.Length > 0 ? ((FrameworkIdAttribute)attrs[0]).FrameworkId : frameworkId);
        }
예제 #2
0
        internal static SearchCriteria ForMenuBar(WindowsFramework framework)
        {
            var searchCriteria =
                new SearchCriteria(SearchConditionFactory.CreateForControlType(typeof(MenuBar), framework.ToString()));

            return(searchCriteria.NotIdentifiedByText("System Menu Bar"));
        }
예제 #3
0
 internal static SearchCriteria ForMenuBar(WindowsFramework framework)
 {
     var searchCriteria =
         new SearchCriteria(SearchConditionFactory.CreateForControlType(typeof (MenuBar), framework.ToString()));
     return searchCriteria.NotIdentifiedByText("System Menu Bar");
 }