You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

166 lines
3.1 KiB
C#

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
{
#region 字段定义
private bool _isValid = true; //保存有效性
private bool _isEventValid = true; //保存事件有效性
private List<DesignAction> _onTickActionList = new List<DesignAction>();
private int _mcinterval;
#endregion
#region 构造方法
public MCTimer()
{
InitializeComponent();
}
public MCTimer(IContainer container)
{
container.Add(this);
InitializeComponent();
}
#endregion
#region 事件定义
/// <summary>
/// Ontick事件集合
/// </summary>
public List<DesignAction> OnTickActionList
{
get { return _onTickActionList; }
set { _onTickActionList = value; }
}
#endregion
#region 属性定义
/// <summary>
/// 计时器定时间隔时间(毫秒)
/// </summary>
public int MCInterval
{
get { return _mcinterval; }
set { _mcinterval = value; }
}
#endregion
#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; }
}
public bool IsEventValid
{
get { return this._isEventValid; }
set { this._isEventValid = value; }
}
#endregion
}
}