基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,167 @@
|
||||
using DevExpress.XtraEditors;
|
||||
using Lskj.Business.Impl;
|
||||
using Lskj.Control.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Lskj.Control
|
||||
{
|
||||
//文本框带勾选
|
||||
public partial class LabelCheckText : BaseUserControl
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 复选框控件
|
||||
/// </summary>
|
||||
/// <value>The check edit.</value>
|
||||
public CheckEdit CheckEdit { get { return ckCheck; } }
|
||||
/// <summary>
|
||||
/// 自动搜索框控件
|
||||
/// </summary>
|
||||
// public AutoGridLookUp TextEdit { get { return labelTextEdit1.TextEdit; } }
|
||||
/// <summary>
|
||||
/// 自定义文本框
|
||||
/// </summary>
|
||||
/// <value>The automatic text edit.</value>
|
||||
public LabelTextEdit LabelTextEdit { get { return labelTextEdit1; } }
|
||||
|
||||
public LabelCheckText()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <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.LabelTextEdit.LabelText;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.LabelTextEdit.LabelText = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 控件值
|
||||
/// </summary>
|
||||
/// <value>The edit text.</value>
|
||||
public override string EditText
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.EditText;
|
||||
}
|
||||
set
|
||||
{
|
||||
LabelTextEdit.EditText = value;
|
||||
//TextEdit.Enabled = ckCheck.Checked = !string.IsNullOrWhiteSpace(labelAutoTextEdit1.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.LabelTextEdit.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.LabelTextEdit.TextEdit.ForeColor = base.RequiredLabelForceColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:需要单独验证是否修改</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-11-08 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if this instance is update; otherwise, <c>false</c>.</returns>
|
||||
//public override bool IsUpdate()
|
||||
//{
|
||||
// if (this.Model.FieldType == ControlType.LabCheckAutoSeacherValue)
|
||||
// {
|
||||
// return !this.Model.Text.Equals(this.LabelTextEdit.EditValue, StringComparison.OrdinalIgnoreCase);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return base.IsUpdate();
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <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 source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void ckCheck_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
CheckEdit check = sender as CheckEdit;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user