Ejemplo n.º 1
0
		private LcdCalibrationView(ITouchDevice device)
		{
			this.device = device;
			this.InitializeComponent();
			_LoadTask = new TaskCompletionSource<object>();
			this.Loaded += (s, e) => _LoadTask.SetResult(null);
		}
Ejemplo n.º 2
0
 private LcdCalibrationView(ITouchDevice device)
 {
     this.device = device;
     this.InitializeComponent();
     _LoadTask    = new TaskCompletionSource <object>();
     this.Loaded += (s, e) => _LoadTask.SetResult(null);
 }
Ejemplo n.º 3
0
 public TouchProcessor(ITouchDevice device)
 {
     if (device == null)
     {
         throw new ArgumentNullException(nameof(device));
     }
     this.device = device;
 }
Ejemplo n.º 4
0
        private TouchProcessor InitializeTouchProcessor(ITouchDevice touchDevice)
        {
            var processor = new TouchProcessor(touchDevice);

            processor.PointerDown += TouchedDown;
            processor.PointerUp   += TouchedUp;

            return(processor);
        }
Ejemplo n.º 5
0
        public TouchSensor(ITouchDevice device)
        {
            _grid = device.GetScreenState();

            _orientations = new[] {
                new Orientation(0, 1),
                new Orientation(0, -1),
                new Orientation(1, 0),
                new Orientation(-1, 0),
            };
        }
Ejemplo n.º 6
0
        public static async Task<AffineTransformationParameters> CalibrateScreenAsync(ITouchDevice device, CalibrationStyle style = CalibrationStyle.CornersAndCenter)
		{
			var bounds = Windows.UI.Core.CoreWindow.GetForCurrentThread().Bounds;
			LcdCalibrationView view = new LcdCalibrationView(device);
			view.Width = bounds.Width;
			view.Height = bounds.Height;

			Popup p = new Popup() { Child = view, Margin = new Thickness(0), IsOpen = true };
            try
			{
				return await view.CalibrateAsync(style);
			}
			finally
			{
				p.IsOpen = false;
			}
		}
Ejemplo n.º 7
0
        public static async Task <AffineTransformationParameters> CalibrateScreenAsync(ITouchDevice device, CalibrationStyle style = CalibrationStyle.CornersAndCenter)
        {
            var bounds = Windows.UI.Core.CoreWindow.GetForCurrentThread().Bounds;
            LcdCalibrationView view = new LcdCalibrationView(device);

            view.Width  = bounds.Width;
            view.Height = bounds.Height;

            var p = new Popup {
                Child = view, Margin = new Thickness(0), IsOpen = true
            };

            try
            {
                return(await view.CalibrateAsync(style));
            }
            finally
            {
                p.IsOpen = false;
            }
        }
Ejemplo n.º 8
0
 public TouchPointWrapper(Point position, TouchAction action, int id)
 {
     _position = position;
     _action = action;
     _device = new TouchDeviceWrapper(id);
 }
Ejemplo n.º 9
0
		public TouchProcessor(ITouchDevice device)
		{
            if (device == null)
                throw new ArgumentNullException(nameof(device));
			this.device = device;
		}
Ejemplo n.º 10
0
 public TouchPointWrapper(Point position, TouchAction action, int id)
 {
     _position = position;
     _action   = action;
     _device   = new TouchDeviceWrapper(id);
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Initialize a new <see cref="BasicTouchDeviceTracker"/> class.
 /// </summary>
 /// <param name="touchDevice"></param>
 public BasicTouchDeviceTracker(ITouchDevice touchDevice)
     : base(touchDevice)
 {
 }
 public TouchProcessor(ITouchDevice touchDevice, CoreDispatcher dispatcher)
 {
     _touchDevice = touchDevice;
     _dispatcher  = dispatcher;
     _penPressed  = false;
 }