private static void ContactDown(object sender, ContactEventArgs e) { try { if (deviceDictionary.Keys.Contains(e.Contact.Id)) { return; } SurfaceTouchDevice device = new SurfaceTouchDevice(e.Contact); deviceDictionary.Add(e.Contact.Id, device); device.SetActiveSource(e.Device.ActiveSource); device.Activate(); device.ReportDown(); } //Ignore InvalidOperationException due to race condition on Surface hardware catch (InvalidOperationException) { } }
public ContactBuffer(SurfaceTouchDevice std, Point p) { myDevice = std; startPoint = p; }