foreach (Control cont in laycontrol.Controls)
{
//数值类型为负判断
Console.WriteLine(cont.Name);
if (cont is DevExpress.XtraEditors.TextEdit)
{
DevExpress.XtraEditors.TextEdit temptx = cont as DevExpress.XtraEditors.TextEdit;
if (temptx.Properties.Mask.MaskType == DevExpress.XtraEditors.Mask.MaskType.Numeric)
{
temptx.KeyUp += new System.Windows.Forms.KeyEventHandler(Common.CheckNegative);
}
}
//日期类型格式转换
else if (cont is DevExpress.XtraEditors.DateEdit)
{
DevExpress.XtraEditors.DateEdit temptx = cont as DevExpress.XtraEditors.DateEdit;
//UpdateDateStringEvent(co
Winform Dev 控件 DateEdit 和 TextEdit 类型相同
最新推荐文章于 2021-06-04 01:17:45 发布