private void WindowUnloaded(object sender, RoutedEventArgs e) { if (HooksAreLoaded) { KeyboardHook.Deactivate(); ClipboardHook.Deactivate(); HooksAreLoaded = false; } }
private void listView_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (listView.SelectedIndex == -1) { return; } ClipboardHook.SetClipboardData(StringContainer.Get(listView.SelectedIndex)); HideWindow(); KeyboardHook.SendPaste(); }
private void WindowLoaded(object sender, RoutedEventArgs e) { if (!HooksAreLoaded) { KeyboardHook.FunPaste = ShowWindow; KeyboardHook.Activate(); ClipboardHook.OnNewData = Add; ClipboardHook.Activate(this); HooksAreLoaded = true; } }