public static void UnregisterApplications(IEnumerable <string> applications) { foreach (string application in applications) { TrackedApplications.Remove(application); } }
protected void OnTrackedApplicationsChanged(string oldApplications) { if (oldApplications != null) { GlobalTextSelection.UnregisterApplications(oldApplications.Split(",")); } GlobalTextSelection.RegisterApplications(TrackedApplications.Split(",")); }
private async void GlobalTextSelection_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (TrackTextSelections && TrackedApplications.Contains(e.Application, StringComparison.InvariantCultureIgnoreCase)) { string clipboard = e.SelectedText; if (String.IsNullOrWhiteSpace(clipboard) || clipboard.IsUrl()) { return; } if (Word == clipboard) { return; } Word = clipboard; await Search(true); } }