Beispiel #1
0
        private void MainWindow_TouchDown(object sender, TouchEventArgs e)
        {
            if (TouchDownList.Contains(e.TouchDevice.Id))
            {
                Warn += $"触摸不成对,已经存在 {e.TouchDevice.Id} 按下\r\n";
            }

            TouchDownList.Add(e.TouchDevice.Id);
            WriteToLog($"+++按下 id = {e.TouchDevice.Id}");
            Log();
        }
Beispiel #2
0
        private void MainWindow_TouchMove(object sender, TouchEventArgs e)
        {
            WriteToLog($"id {e.TouchDevice.Id} 移动");

            if (!TouchDownList.Contains(e.TouchDevice.Id))
            {
                Warn += $"移动过程发现 {e.TouchDevice.Id} 丢失";
            }

            Log();
        }
Beispiel #3
0
        private void MainWindow_TouchUp(object sender, TouchEventArgs e)
        {
            WriteToLog($"---抬起 id = {e.TouchDevice.Id}\r\n");

            if (TouchDownList.Contains(e.TouchDevice.Id))
            {
                TouchDownList.Remove(e.TouchDevice.Id);
            }
            else
            {
                Warn += $"触摸不成对,抬起的 {e.TouchDevice.Id} 没有找到按下记录\r\n";
            }

            Log();
        }