using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Text; using Mesnac.Controls.Base; using System.Drawing; namespace Mesnac.Controls.Default { [ToolboxBitmap(typeof(System.Windows.Forms.Timer))] public partial class MCTimer : System.Windows.Forms.Timer, IBaseControl { private bool _isValid = true; //保存有效性 public MCTimer() { InitializeComponent(); } public MCTimer(IContainer container) { container.Add(this); InitializeComponent(); } private List _onTickActionList = new List(); /// /// Ontick事件集合 /// public List OnTickActionList { get { return _onTickActionList; } set { _onTickActionList = value; } } private int _mcinterval; /// /// 计时器定时间隔时间(毫秒) /// public int MCInterval { get { return _mcinterval; } set { _mcinterval = value; } } #region 接口实现 public string MCKey { get; set; } public object MCValue { get { return this.Interval; } set { this.MCValue = 0; } } public bool IsDbControl { get; set; } public IBaseControl MCRoot { get; set; } public string MCDataSourceID { get; set; } public MCDataSource MCDataSource { get; set; } public string InitDataSource { get; set; } public string ActionDataSource { get; set; } public object BindDataSource { get; set; } public DbOptionTypes DbOptionType { get; set; } public bool MCVisible { get; set; } public bool MCEnabled { get { return this.Enabled; } set { this.Enabled = value; } } public bool IsValid { get { return _isValid; } set { _isValid = value; } } #endregion } }