private void Highlight_Click(object sender, RoutedEventArgs e) { HighlightImage.Source = Extensions.GetImageSourceFromResource(".x.png"); string SelectorString = plugin.Selector; var selector = new JavaSelector(SelectorString); var elements = JavaSelector.GetElementsWithuiSelector(selector, null, 10); if (elements.Count() > 0) { HighlightImage.Source = Extensions.GetImageSourceFromResource("check.png"); } foreach (var ele in elements) ele.Highlight(false, System.Drawing.Color.Red, TimeSpan.FromSeconds(1)); }
private void Open_Selector_Click(object sender, RoutedEventArgs e) { string SelectorString = plugin.Selector; Interfaces.Selector.SelectorWindow selectors; if (!string.IsNullOrEmpty(SelectorString)) { var selector = new JavaSelector(SelectorString); selectors = new Interfaces.Selector.SelectorWindow("Java", selector, null, 10); } else { var selector = new JavaSelector("[{Selector: 'Java'}]"); selectors = new Interfaces.Selector.SelectorWindow("Java", selector, null, 10); } if (selectors.ShowDialog() == true) { plugin.Selector = selectors.vm.json; NotifyPropertyChanged("Selector"); } }