private void OnStartup(object sender, StartupEventArgs e) { var clipboard = new Domain.Clipboard(new Clipboard()); var clipboardHistoryManager = new ClipboardHistoryManager(10); var clipboardBindingManager = new ClipboardBindingManager(); var keyTracker = new KeyTracker(); var ctrlCHotkey = new Hotkey(keyTracker, new KeyCombo(ModifierKeys.Control, Key.C)); var ctrlVHotkey = new Hotkey(keyTracker, new KeyCombo(ModifierKeys.Control, Key.V)); var escHotkey = new Hotkey(keyTracker, new KeyCombo(Key.Escape)); var inputSimulator = new InputSimulator(); var notificationDispatcher = new NotificationDispatcher(); var historyMenuViewModel = new HistoryMenuViewModel(clipboardHistoryManager); var copypasta = new CopypastaController(clipboard, clipboardHistoryManager, clipboardBindingManager, ctrlVHotkey, ctrlCHotkey, escHotkey, keyTracker, inputSimulator, notificationDispatcher); var notifyIconWindow = new NotifyIconWindow(notificationDispatcher, historyMenuViewModel); }
public Task <IViewComponentResult> InvokeAsync(HistoryMenuViewModel model) { return(Task.FromResult((IViewComponentResult)View(model))); }