Beispiel #1
0
 /// <summary>
 /// logs an interaction
 /// </summary>
 /// <param name="parent"> Parent of the container</param>
 /// <param name="Td"></param>
 /// <param name="touched">button that was touched with</param>
 /// <param name="Container">container of the button touched</param>
 public static void Interaction(Object parent,TouchDevice Td,Object touched,Object Container)
 {
     string Device="Interacted with : ";
         if (Td.GetIsFingerRecognized())
         {
             Device+= "TypeOfDevice: Finger";
         }
         else
             if (Td.GetIsTagRecognized())
             {
                 Device+="TypeOfDevice: Tag";
             }
             else
             {
                 Device+="TypeOfDevice: Blob";
             }
         WriteLog(Device + " X=" + Td.GetPosition((SurfaceWindow1)parent).X + ", Y=" + Td.GetPosition((SurfaceWindow1)parent).Y + " Angle=" + Td.GetOrientation((SurfaceWindow1)parent) + " ; " + Container.ToString() + "; " + touched.ToString());
 }
        /// <summary>
        /// Gets a string that describes the type of touch device on the surface
        /// </summary>
        /// <param name="touchDevice">the touch device to be examined</param>
        /// <returns>a string that describes the type of touch device</returns>
        private static string GetTouchDeviceTypeString(TouchDevice touchDevice)
        {
            if (touchDevice.GetTagData() != TagData.None)
            {
                return "Tag";
            }
            if (touchDevice.GetIsFingerRecognized())
            {
                return "Finger";
            }

            return "Blob";
        }