f6192b8086
SVN-Revision: r1211
127 lines
3.6 KiB
C#
127 lines
3.6 KiB
C#
/******************************
|
|
* 说明:自定义带复选框日期控件
|
|
* 创建人:龚宇超
|
|
* 创建日期:2017-08-07
|
|
* 修改人:
|
|
* 修改日期:
|
|
* 修改备注:
|
|
* 版本:1.0.0.0
|
|
******************************/
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using DevExpress.XtraEditors;
|
|
using Lskj.Business.Impl;
|
|
|
|
namespace Lskj.Control
|
|
{
|
|
/// <summary>
|
|
/// 带复选框日期控件
|
|
/// </summary>
|
|
public partial class LabelCheckDateEdit : BaseUserControl
|
|
{
|
|
/// <summary>
|
|
/// 复选框控件
|
|
/// </summary>
|
|
/// <value>The check edit.</value>
|
|
public CheckEdit CheckEdit { get { return ckCheck; } }
|
|
|
|
public LabelDateEdit LabelDateEditObj { get { return labelDateEdit1; } }
|
|
/// <summary>
|
|
/// 复选框日期控件
|
|
/// </summary>
|
|
public DateEdit TextEdit { get { return labelDateEdit1.TextEdit; } }
|
|
|
|
public LabelCheckDateEdit()
|
|
{
|
|
InitializeComponent();
|
|
this.TextEdit.Enabled = false;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>说明:设置控件显示文本</para>
|
|
/// <para>创建人:龚宇超</para>
|
|
/// <para>创建日期:2017-08-07 </para>
|
|
/// <para>修改人:</para>
|
|
/// <para>修改日期:</para>
|
|
/// <para>修改备注:</para>
|
|
/// <para>版本:1.0</para>
|
|
/// </summary>
|
|
/// <param name="text">显示Lebel文本</param>
|
|
public override string LabelText
|
|
{
|
|
get
|
|
{
|
|
return this.LabelDateEditObj.LabelText;
|
|
}
|
|
set
|
|
{
|
|
this.LabelDateEditObj.LabelText = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 控件值
|
|
/// </summary>
|
|
/// <value>The edit text.</value>
|
|
public override string EditText
|
|
{
|
|
get
|
|
{
|
|
return base.EditText;
|
|
}
|
|
set
|
|
{
|
|
labelDateEdit1.EditText = value;
|
|
TextEdit.Enabled = ckCheck.Checked = !string.IsNullOrWhiteSpace(labelDateEdit1.EditText);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 只读文本颜色
|
|
/// </summary>
|
|
/// <value>The color of the read only label.</value>
|
|
public override bool ReadOnly
|
|
{
|
|
get
|
|
{
|
|
return base.ReadOnly;
|
|
}
|
|
set
|
|
{
|
|
base.ReadOnly = value;
|
|
this.labelDateEdit1.ReadOnly = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 必填文本颜色
|
|
/// </summary>
|
|
/// <value>The color of the required label.</value>
|
|
public override bool Required
|
|
{
|
|
get
|
|
{
|
|
return base.Required;
|
|
}
|
|
set
|
|
{
|
|
base.Required = value;
|
|
if (value)
|
|
{
|
|
this.labelDateEdit1.Label.ForeColor = base.RequiredLabelForceColor;
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// <para>说明:选中改变状态</para>
|
|
/// <para>创建人:龚宇超</para>
|
|
/// <para>创建日期:2017-08-07 </para>
|
|
/// <para>修改人:</para>
|
|
/// <para>修改日期:</para>
|
|
/// <para>修改备注:</para>
|
|
/// <para>版本:1.0</para>
|
|
/// </summary>
|
|
/// <param name="sender">The sou |