private void DZEditor_SizeChanged(object sender, EventArgs e) { if (DrawingDevice is InputDevices.Mouse) { InputDevices.Mouse mouse = new Mouse(DZEditor); DrawingDevice = mouse; } }
private void TSCBXInputDevice_SelectedIndexChanged(object sender, EventArgs e) { switch (TSCBXInputDevice.SelectedIndex) { case 0: if (DrawingDevice is LeapMotion) { (DrawingDevice as LeapMotion).Disconect(); } InputDevices.Mouse mouse = new Mouse(DZEditor); DrawingDevice = mouse; break; case 1: DrawingDevice = new NovintFalcon(); break; case 2: InputDevices.LeapMotion leap = new LeapMotion(); if (leap.IsConnected) { DrawingDevice = leap; } else { MessageBox.Show("Leap motion disconected"); } break; case 3: if (DrawingDevice is LeapMotion) { (DrawingDevice as LeapMotion).Disconect(); } InputDevices.TouchScreen touchscreen = new TouchScreen(DZEditor); DrawingDevice = touchscreen; break; } DrawingDevice.StartDrawing += DrawingDevice_StartDrawing; DrawingDevice.StopDrawing += DrawingDevice_StopDrawing; }