internal MiniPadForm(PPTcontrol inputController) { InitializeComponent(); pptController = inputController; minioverlay = new InkOverlay(this.Handle); ClearAppGestures(minioverlay); minioverlay.CollectionMode = CollectionMode.InkAndGesture; minioverlay.Gesture += new InkCollectorGestureEventHandler(mo_Gesture); minioverlay.SystemGesture += new InkCollectorSystemGestureEventHandler(mo_SystemGesture); // make it recognize EVERYTHING minioverlay.SetGestureStatus(ApplicationGesture.AllGestures, true); //list of gestures // arrow x4, check, chevronx4 , circle, curlique minioverlay.Enabled = true; minipenpanel = new PenInputPanel(xInput); minipenpanel.AutoShow = true; }// end miniPadForm constructor
public FormManager() { InitializeComponent(); AutoScaleDimensions = new SizeF(AutoScaleDimensions.Width / (AutoScaleDimensions.Width / 4F), AutoScaleDimensions.Height / (AutoScaleDimensions.Height / 8F)); // Se crea un objeto InkOverlay y se pone en el modo ink-and-gesture. // Se coge este modo y no gesture-only porque este ultimo necesita que // transcurra un tiempo para reconocer la gesture. ink_overlay = new InkOverlay(pnlInput.Handle); ink_overlay.CollectionMode = CollectionMode.InkAndGesture; // Se indica al InkOverlay las gestures que queremos reconocer ink_overlay.SetGestureStatus(ApplicationGesture.Scratchout, true); // Se conecta el manejador de eventos con las gesture y los stroke ink_overlay.Gesture += new InkCollectorGestureEventHandler(inkOverlay_Gesture); ink_overlay.Stroke += new InkCollectorStrokeEventHandler(inkOverlay_Stroke); // Se habilita el colector ink_overlay.Enabled = true; strokes_text = ink_overlay.Ink.CreateStrokes(); strokes_shape = ink_overlay.Ink.CreateStrokes(); }
}// end method mo_systemgesture private void ClearAppGestures(InkOverlay minioverlay) { ApplicationGesture nogesture = ApplicationGesture.NoGesture; System.Array gestureIDs = System.Enum.GetValues(nogesture.GetType()); foreach (ApplicationGesture gestureID in gestureIDs) { minioverlay.SetGestureStatus(gestureID, false); } }
void ToDoItemControl_HandleCreated(object sender, EventArgs e) { panel1.BackColor = Color.Transparent; overlay = new InkOverlay(panel1); overlay.Enabled = true; overlay.CollectionMode = CollectionMode.InkAndGesture; overlay.SetGestureStatus(ApplicationGesture.Up, true); overlay.SetGestureStatus(ApplicationGesture.Down, true); overlay.SetGestureStatus(ApplicationGesture.Right, true); overlay.SetGestureStatus(ApplicationGesture.ArrowUp, true); overlay.SetGestureStatus(ApplicationGesture.ArrowDown, true); overlay.SetGestureStatus(ApplicationGesture.Check, true); overlay.SetGestureStatus(ApplicationGesture.Square, true); overlay.SetGestureStatus(ApplicationGesture.Circle, true); //overlay.Gesture += new InkCollectorGestureEventHandler(overlay_Gesture); overlay.Stroke += new InkCollectorStrokeEventHandler(overlay_Stroke); CreateRecognizer(overlay); personFont = new Font(Font, FontStyle.Bold); }
private void Form1_Load(object sender, EventArgs e) { inkOverlay = new InkOverlay(); inkOverlay.Handle = this.Handle; inkOverlay.Enabled = true; inkOverlay.Gesture += new InkCollectorGestureEventHandler(Event_OnApplicationGesture); inkOverlay.CollectionMode = CollectionMode.InkAndGesture; inkOverlay.SetGestureStatus(ApplicationGesture.Left, true); inkOverlay.SetGestureStatus(ApplicationGesture.Right, true); inkOverlay.SetGestureStatus(ApplicationGesture.Up, true); inkOverlay.SetGestureStatus(ApplicationGesture.Down, true); inkOverlay.SetGestureStatus(ApplicationGesture.Check,true); // timer configuration timer1.Interval = 500; this.inkOverlay.Stroke += new InkCollectorStrokeEventHandler(Event_Stroke); }