Exemplo n.º 1
0
 public static void ColorButtonsClickedHandler(
     NwazetGoImaging.VirtualCanvas canvas,
     NwazetGoDisplayTouchScreen.Widget widget,
     NwazetGoDisplayTouchScreen.TouchEvent touchEvent)
 {
     widget.Dirty = true;
     canvas.DrawFill(((NwazetGoDisplayTouchScreen.ButtonWidget)widget).FillColor);
 }
Exemplo n.º 2
0
        public static void TouchEventHandler(
            object sender,
            NwazetGoDisplayTouchScreen.TouchEvent touchEvent)
        {
            Debug.Print("------------TouchEventHandler------------");
            Debug.Print("X: " + touchEvent.X);
            Debug.Print("Y: " + touchEvent.Y);
            Debug.Print("Pressure: " + touchEvent.Pressure);

            lastTouchX = touchEvent.X;
            lastTouchY = touchEvent.Y;
        }
Exemplo n.º 3
0
 public void OnClickEvent(TouchEvent touchEvent) {
     if (Active) {
         Clicked = Area.IsWithinArea(touchEvent.X, touchEvent.Y);
     }
 }
Exemplo n.º 4
0
 public static void ColorButtonsClickedHandler(VirtualCanvas canvas, Widget widget, TouchEvent touchEvent) {
     widget.Dirty = true;
     canvas.DrawFill(((ButtonWidget)widget).FillColor);
 }
Exemplo n.º 5
0
 public static void WidgetClickedHandler(VirtualCanvas canvas, Widget widget, TouchEvent touchEvent) {
 }
Exemplo n.º 6
0
        public static void TouchEventHandler(VirtualCanvas canvas, TouchEvent touchEvent) {
            Debug.Print("------------TouchEventHandler------------");
            Debug.Print("X: " + touchEvent.X);
            Debug.Print("Y: " + touchEvent.Y);
            Debug.Print("Pressure: " + touchEvent.Pressure);

            lastTouchX = touchEvent.X;
            lastTouchY = touchEvent.Y;
            lastTouchIsValid = touchEvent.IsValid;
        }
Exemplo n.º 7
0
 protected void OnWidgetClicked(Widget widget, TouchEvent touchEvent)
 {
     if (WidgetClicked != null) {
         WidgetClicked(this, widget, touchEvent);
     }
 }
Exemplo n.º 8
0
 protected void OnTouch(TouchEvent touchEvent)
 {
     if (Touch != null) {
         Touch(this, touchEvent);
     }
 }
Exemplo n.º 9
0
 public void TouchscreenWaitForEvent()
 {
     BasicTypeSerializer.Put(SendContext, (byte)Command.TouchscreenWaitForEvent);
     Execute();
     Receive();
     TouchScreenDataType eventType = (TouchScreenDataType)BasicTypeDeSerializer.Get(ReceiveContext);
     if (eventType != TouchScreenDataType.TouchEvent) {
         throw new ApplicationException("eventType");
     }
     var touchEvent = new TouchEvent();
     touchEvent.X = BasicTypeDeSerializer.Get(ReceiveContext, touchEvent.X);
     touchEvent.Y = BasicTypeDeSerializer.Get(ReceiveContext, touchEvent.Y);
     touchEvent.Pressure = BasicTypeDeSerializer.Get(ReceiveContext, touchEvent.Pressure);
     touchEvent.IsValid = BasicTypeDeSerializer.Get(ReceiveContext);
     OnTouch(touchEvent);
     if (WidgetClicked != null) {
         foreach (Widget widget in RegisteredWidgets) {
             widget.OnClickEvent(touchEvent);
             if (widget.Clicked) {
                 WidgetClicked(this, widget, touchEvent);
             }
         }
     }
 }
Exemplo n.º 10
0
 public static void WidgetClickedHandler(
     NwazetGoImaging.VirtualCanvas canvas,
     NwazetGoDisplayTouchScreen.Widget widget,
     NwazetGoDisplayTouchScreen.TouchEvent touchEvent)
 {
 }