开发者

What to call a class/method for 'waiting till user has stopped clicking'

开发者 https://www.devze.com 2023-01-31 06:00 出处:网络
I have a static class with a single method, which I use for delaying an action until the user has stopped clicking/typing/whatever:

I have a static class with a single method, which I use for delaying an action until the user has stopped clicking/typing/whatever:

public void SomeControl_Click(object sender, EventArgs e)
{
     // DoSomething once user has stopped clicking for 300ms
     MyClass.MyMethod(() => DoSomething(), 300);
}

Currently I've gone for DelayAction.Start开发者_Go百科New, but that doesn't really convey what it does. I wondered about Stabilize, but I'm not sure that's any clearer.


DelayAction.OnIdleUser

Since "being idle" means no activity, I'd go for this naming.


DelayAction.OnTimerExpired()

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号