public ClipboardListViewModel(
            IAction[] allActions,
            IClipboardUserInterfaceMediator clipboardUserInterfaceMediator,

            // ReSharper disable once SuggestBaseTypeForParameter
            IKeyInterceptor hotkeyInterceptor,
            IAsyncListDictionaryBinder <IClipboardDataControlPackage, IAction> packageActionBinder,
            IAsyncFilter asyncFilter,
            IPerformanceHandleFactory performanceHandleFactory,
            IUserInterfaceThread userInterfaceThread)
        {
            Elements = new ObservableCollection <IClipboardDataControlPackage>();
            Actions  = new ObservableCollection <IAction>();

            Actions.CollectionChanged += Actions_CollectionChanged;

            var pasteAction = allActions.OfType <IPasteAction>()
                              .Single();

            this.allActions = allActions.Where(x => x != pasteAction)
                              .ToArray();
            this.clipboardUserInterfaceMediator = clipboardUserInterfaceMediator;
            this.packageActionBinder            = packageActionBinder;
            this.asyncFilter = asyncFilter;
            this.performanceHandleFactory = performanceHandleFactory;
            this.userInterfaceThread      = userInterfaceThread;

            PreparePackageBinder(pasteAction);

            RegisterMediatorEvents(clipboardUserInterfaceMediator);
            RegisterKeyEvents(hotkeyInterceptor);
        }
 public WindowThreadMerger(
     IWindowNativeApi windowNativeApi,
     IUserInterfaceThread userInterfaceThread)
 {
     this.windowNativeApi     = windowNativeApi;
     this.userInterfaceThread = userInterfaceThread;
 }
Ejemplo n.º 3
0
        public KeyInterceptor(
            IHotkeyInterceptionFactory hotkeyInterceptionFactory,
            IUserInterfaceThread userInterfaceThread)
        {
            this.hotkeyInterceptionFactory = hotkeyInterceptionFactory;
            this.userInterfaceThread       = userInterfaceThread;

            keyInterceptions = new Dictionary <Key, IHotkeyInterception>();
        }
Ejemplo n.º 4
0
        public KeyInterceptor(
            IHotkeyInterceptionFactory hotkeyInterceptionFactory,
            IUserInterfaceThread userInterfaceThread)
        {
            this.hotkeyInterceptionFactory = hotkeyInterceptionFactory;
            this.userInterfaceThread = userInterfaceThread;

            keyInterceptions = new Dictionary<int, IHotkeyInterception>();
        }
 public ClipboardDataControlPackageFactory(
     IEnumerable<IClipboardDataControlFactory> dataFactories,
     IEnumerable<IMemoryUnwrapper> memoryUnwrappers,
     IClipboardHandleFactory clipboardSessionFactory,
     IUserInterfaceThread userInterfaceThread)
 {
     this.dataFactories = dataFactories;
     this.memoryUnwrappers = memoryUnwrappers;
     this.clipboardSessionFactory = clipboardSessionFactory;
     this.userInterfaceThread = userInterfaceThread;
 }
Ejemplo n.º 6
0
 public ClipboardDataControlPackageFactory(
     IEnumerable <IClipboardDataControlFactory> dataFactories,
     IEnumerable <IMemoryUnwrapper> memoryUnwrappers,
     IKeyValueCache <uint, byte[]> clipboardCache,
     IClipboardHandleFactory clipboardSessionFactory,
     IUserInterfaceThread userInterfaceThread)
 {
     this.dataFactories           = dataFactories;
     this.memoryUnwrappers        = memoryUnwrappers;
     this.clipboardCache          = clipboardCache;
     this.clipboardSessionFactory = clipboardSessionFactory;
     this.userInterfaceThread     = userInterfaceThread;
 }
Ejemplo n.º 7
0
        public ClipboardUserInterfaceMediator(
            IClipboardCopyInterceptor clipboardCopyInterceptor,
            IPasteCombinationDurationMediator pasteCombinationDurationMediator,
            IClipboardDataControlPackageFactory clipboardDataControlPackageFactory,
            IUserInterfaceThread userInterfaceThread)
        {
            this.clipboardCopyInterceptor           = clipboardCopyInterceptor;
            this.pasteCombinationDurationMediator   = pasteCombinationDurationMediator;
            this.clipboardDataControlPackageFactory = clipboardDataControlPackageFactory;
            this.userInterfaceThread = userInterfaceThread;

            clipboardPackages = new List <IClipboardDataControlPackage>();
        }
        public ClipboardUserInterfaceMediator(
            IClipboardCopyInterceptor clipboardCopyInterceptor,
            IPasteCombinationDurationMediator pasteCombinationDurationMediator,
            IClipboardDataControlPackageFactory clipboardDataControlPackageFactory,
            IUserInterfaceThread userInterfaceThread)
        {
            this.clipboardCopyInterceptor = clipboardCopyInterceptor;
            this.pasteCombinationDurationMediator = pasteCombinationDurationMediator;
            this.clipboardDataControlPackageFactory = clipboardDataControlPackageFactory;
            this.userInterfaceThread = userInterfaceThread;

            clipboardPackages = new List<IClipboardDataControlPackage>();
        }