public TouchManipulationEdit()
        {
            InitializeComponent();
            _handler = Factory.CreateHandler<TouchHandler>(this);
            _processor = new ManipulationProcessor(ProcessorManipulations.TRANSLATE_X);

            _handler.TouchDown += (s, e) => { _processor.ProcessDown((uint)e.Id, e.Location); };
            _handler.TouchUp += (s, e) => { _processor.ProcessUp((uint)e.Id, e.Location); };
            _handler.TouchMove += (s, e) => { _processor.ProcessMove((uint)e.Id, e.Location); };

            _processor.ManipulationStarted += (s, e) => { CaptureStartValue(); };
            _processor.ManipulationDelta += (s, e) => { UpdateValue(e); };
            
        }
示例#2
0
        public MainForm()
        {
            InitializeComponent();
            _touchHandler = Factory.CreateHandler<TouchHandler>(this);
            
            _processor = new ManipulationProcessor(ProcessorManipulations.ALL);

            _objectList = new List<DrawingObject>
                { new DrawingObject(Size),
                    new DrawingObject(Size),
                    new DrawingObject(Size)
                };

            _touchHandler.TouchDown += (s,e ) => { _processor.ProcessDown((uint)e.Id, e.Location); };
            _touchHandler.TouchUp += (s, e) => { _processor.ProcessUp((uint)e.Id, e.Location); };
            _touchHandler.TouchMove += (s, e) => { _processor.ProcessMove((uint)e.Id, e.Location); };

            _processor.ManipulationDelta += ProcessManipulationDelta;
            _processor.PivotRadius = 2;
        }