static void Main() { TAPManager.Instance.SetTapInputMode(TAPInputMode.RawSensor(new RawSensorSensitivity())); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }
//----------------------------------- // RAW MODE //----------------------------------- private void btn_raw_Click(object sender, RoutedEventArgs e) { ///Setup Raw Mode TAPManager.Instance.OnRawSensorDataReceieved += OnRawSensorDataReceieved; ///Setup Sensitivity of the device accelerometre, mouse gyro, mouse accelerometre byte deviceAccelerometerSensitivity = 1; byte imuGyroSensitivity = 2; byte imuAccelerometerSensitivity = 1; TAPManager.Instance.SetTapInputMode(TAPInputMode.RawSensor(new RawSensorSensitivity(deviceAccelerometerSensitivity, imuGyroSensitivity, imuAccelerometerSensitivity))); TAPManager.Instance.Start(); }
private void button2_Click(object sender, EventArgs e) { if (!this.rawMode) { TAPManager.Instance.SetTapInputMode(TAPInputMode.RawSensor(new RawSensorSensitivity())); Console.WriteLine("Turn to RawSensor mode"); this.LogLine("Turn to RawSensor mode"); } else { TAPManager.Instance.SetTapInputMode(TAPInputMode.Text()); Console.WriteLine("Turn to text mode"); this.LogLine("Turn to text mode"); } this.rawMode = !this.rawMode; }
protected override void OnActivated(EventArgs e) { base.OnActivated(e); if (this.once) { this.once = false; TAPManager.Instance.OnMoused += this.OnMoused; TAPManager.Instance.OnTapped += this.OnTapped; TAPManager.Instance.OnTapConnected += this.OnTapConnected; TAPManager.Instance.OnTapDisconnected += this.OnTapDisconnected; TAPManager.Instance.OnAirGestured += this.OnAirGestured; TAPManager.Instance.OnChangedAirGestureState += this.OnChangedAirGestureState; TAPManager.Instance.OnRawSensorDataReceieved += this.OnRawSensorDataReceieved; TAPManager.Instance.SetTapInputMode(TAPInputMode.RawSensor(new RawSensorSensitivity())); counter = 0; //button1.Click += new EventHandler(button1_Click); TAPManager.Instance.Start(); } }
private void OnTapConnected(string identifier, string name, int fw) { this.LogLine(identifier + " connected. (" + name + ", fw " + fw.ToString() + ")"); TAPManager.Instance.SetTapInputMode(TAPInputMode.RawSensor(new RawSensorSensitivity())); }
public Form1() { this.once = true; TAPManager.Instance.SetTapInputMode(TAPInputMode.RawSensor(new RawSensorSensitivity())); InitializeComponent(); }