Esempio n. 1
0
        /// <summary>
        /// 
        /// </summary>
        public TestConsumer()
            : base()
        {
            _converter = new MovCodeToStringConverter();

            _testControl = new TestControl();
            _testControl.viewModel.testConsumer = this;

            consumerControl = new BaseControl();

            ((BaseControl)consumerControl).viewModel.realtimeConsumer = this;
            ((BaseControl)consumerControl).itemsGrid.Children.Clear();
            ((BaseControl)consumerControl).itemsGrid.Children.Add(_testControl);
        }
Esempio n. 2
0
        public KeyboardConsumer()
            : base()
        {
            singleStroke = false;

            keymappings = new BindingList<Keymapping>();
            InitKeys();
            _converter = new MovCodeToStringConverter();

            _movsToKeyCodes = new Dictionary<int, VirtualKeyCode>();

            _keyboardControl = new KeyboardControl();
            _keyboardControl.viewModel.keyboardConsumer = this;

            consumerControl = new BaseControl();

            ((BaseControl)consumerControl).viewModel.realtimeConsumer = this;
            ((BaseControl)consumerControl).itemsGrid.Children.Clear();
            ((BaseControl)consumerControl).itemsGrid.Children.Add(_keyboardControl);

            _simulator = new InputSimulator();

            //UpdateKeymappings();

            keymappings.ListChanged += keymappings_ListChanged;

            //Configuring a timer that will call the Keystroke method each 100 milliseconds.
            _timer = new FastTimer(3, 100, Keystroke);
        }