public void Connect( IHookableWindow targetWindow) { if (IsConnected) { throw new InvalidOperationException( "The clipboard combination mediator is already connected."); } InstallPasteHotkeyInterceptor(); }
public void Connect() { if (IsConnected) { throw new InvalidOperationException( "The window message hook has already been connected."); } if (TargetWindow == null) { throw new InvalidOperationException($"You must first specify the {nameof(TargetWindow)} to connect to."); } connectedWindow = TargetWindow; InstallWindowMessageHook(); InstallInterceptors(); IsConnected = true; }
void InstallPasteCombinationDurationMediator( IHookableWindow targetWindow) { pasteCombinationDurationMediator.PasteCombinationDurationPassed += PasteCombinationDurationMediator_PasteCombinationDurationPassed; pasteCombinationDurationMediator.PasteCombinationReleased += PasteCombinationDurationMediatorPasteCombinationReleased; pasteCombinationDurationMediator.AfterPasteCombinationReleased += AfterPasteCombinationDurationMediatorAfterPasteCombinationReleased; pasteCombinationDurationMediator.Connect(targetWindow); }
public void Connect( IHookableWindow targetWindow) { if (IsConnected) { throw new InvalidOperationException( "The user interface mediator is already connected."); } LoadInitialClipboardData(); InstallClipboardHook(); InstallPasteCombinationDurationMediator(targetWindow); }
public void Connect(IHookableWindow target) { if (IsConnected) { throw new InvalidOperationException( "The window message hook has already been connected."); } connectedWindow = target; InstallWindowMessageHook(); InstallInterceptors(); IsConnected = true; }