Example #1
0
        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)
            { }
        }
Example #2
0
 public ContactBuffer(SurfaceTouchDevice std, Point p)
 {
     myDevice = std;
     startPoint = p;
 }