void LazyUpdateNotifyText() { if (lazyUpdateNotifyTextTimer == null) { lazyUpdateNotifyTextTimer = new Lib.CancelableTimeout( UpdateNotifierText, 1000); } lazyUpdateNotifyTextTimer.Start(); }
public void LazyStatusBarUpdater() { // create on demand if (lazyStatusBarUpdateTimer == null) { lazyStatusBarUpdateTimer = new Lib.CancelableTimeout( UpdateStatusBar, 300); } lazyStatusBarUpdateTimer.Start(); }
public void LazyGC() { // Create on demand. if (lazyGCTimer == null) { var delay = Lib.Utils.Str2Int(StrConst("LazyGCDelay")); lazyGCTimer = new Lib.CancelableTimeout( () => { System.GC.Collect(); }, delay * 1000); } lazyGCTimer.Start(); }
void LazySaveServerList() { // create on demand if (lazySaveServerListTimer == null) { var delay = Lib.Utils.Str2Int(StrConst("LazySaveServerListDelay")); lazySaveServerListTimer = new Lib.CancelableTimeout( () => setting.SaveServerList(serverList), delay * 1000); } lazySaveServerListTimer.Start(); LazyUpdateNotifyText(); }
void LazyShowSearchResult() { // create on demand if (lazyShowSearchResultTimer == null) { var delay = Lib.Utils.Str2Int(StrConst("LazySaveServerListDelay")); lazyShowSearchResultTimer = new Lib.CancelableTimeout( () => { // 如果不RemoveAll会乱序 RemoveAllServersConrol(); // 修改搜索项时应该清除选择,否则会有可显示列表外的选中项 servers.SetAllServerIsSelected(false); RefreshUI(); }, 600); } lazyShowSearchResultTimer.Start(); }