// 文本改变事件 protected override void OnTextChanged(EventArgs e) { // 放入缓存 if (IsEnabledCache) { if (!this.ReadOnly) { TextBoxCache.addCacheFactory(this); } } base.OnTextChanged(e); }
/// <summary> /// 将文本框数据放入缓冲区 /// </summary> /// <param name="t"></param> /// <param name="keys"></param> /// <param name="mouse"></param> public static bool setTextBoxCache(Dictionary <Type, object> data) { TextBox t = (TextBox)data[typeof(TextBox)]; // ControlsUtilsMet.timersEventMet(t, 1000, delegate{ if (!t.ReadOnly) { TextBoxCache.addCacheFactory(t); } // }); return(true); }