/// <summary>
        /// Initializes the touch panel.
        /// </summary>
        public static void Initialize()
        {
            touchConnection = new TouchConnection();
            Touch.Initialize(touchConnection);

            TouchCollectorConfiguration.CollectionMode    = CollectionMode.InkAndGesture;
            TouchCollectorConfiguration.CollectionMethod  = CollectionMethod.Native;
            TouchCollectorConfiguration.SamplingFrequency = 50;

            calWeakRef          = ExtendedWeakReference.RecoverOrCreate(typeof(GlideCalibration), 0, ExtendedWeakReference.c_SurvivePowerdown);
            calWeakRef.Priority = (Int32)ExtendedWeakReference.PriorityLevel.Important;
            CalSettings         = (CalibrationSettings)calWeakRef.Target;

            if (CalSettings != null)
            {
                Touch.ActiveTouchPanel.SetCalibration(CalSettings.Points.Length, CalSettings.SX, CalSettings.SY, CalSettings.CX, CalSettings.CY);
                Calibrated = true;
            }
        }
Exemple #2
0
        /// <summary>
        /// Initializes the touch panel.
        /// </summary>
        public static void Initialize()
        {
            touchConnection = new TouchConnection();
            Touch.Initialize(touchConnection);
            
            TouchCollectorConfiguration.CollectionMode = CollectionMode.InkAndGesture;
            TouchCollectorConfiguration.CollectionMethod = CollectionMethod.Native;
            TouchCollectorConfiguration.SamplingFrequency = 50;

            //calWeakRef = ExtendedWeakReference.RecoverOrCreate(typeof(GlideCalibration), 0, ExtendedWeakReference.c_SurvivePowerdown);
            //calWeakRef.Priority = (Int32)ExtendedWeakReference.PriorityLevel.Important;
            //CalSettings = (CalibrationSettings)calWeakRef.Target;

            //if (CalSettings != null)
            //{
            //    Touch.ActiveTouchPanel.SetCalibration(CalSettings.Points.Length, CalSettings.SX, CalSettings.SY, CalSettings.CX, CalSettings.CY);
            //    Calibrated = true;
            //}
        }