Esempio n. 1
0
        /// <summary>
        /// Find the element in widget
        /// </summary>
        /// <param name="widgetId"></param>
        /// <returns></returns>
        protected Widget FindWidget(string widgetId)
        {
            WidgetCollection wc = ControlPanel.GetScreenInfo().Widgets;

            try
            {
                return(wc.First(n => StringMatcher.IsMatch(widgetId, n.Id, StringMatch.Exact, true)));
            }
            catch
            {
                return(null);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Find the element in widget
        /// </summary>
        /// <param name="device"></param>
        /// <param name="widgetId"></param>
        /// <returns></returns>
        private static Widget WidgetFind(SiriusUIv2Device device, string widgetId)
        {
            WidgetCollection wc = device.ControlPanel.GetScreenInfo().Widgets;

            try
            {
                return(wc.First(n => StringMatcher.IsMatch(widgetId, n.Id, StringMatch.Exact, true)));
            }
            catch
            {
                return(null);
            }
        }