Action a = () => { i += 1; var timer = new System.Timers.Timer(800) { Interval = 600 }; timer.Elapsed += (sender, e) => { timer.Enabled = false; i = 0; }; timer.Enabled = true; if (i % 2 == 0) { i=0; timer.Enabled = false; //你的代码 } }; name_headChatWin.Dispatcher.Invoke(a);
WPF控件模拟双击事件
时间: 2024-11-02 05:22:09