Files
lserp_cs_5.0/插件库/Lskj.MyControl/LabelDateEx.cs
T
2026-07-10 15:25:05 +08:00

83 lines
2.0 KiB
C#

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;
namespace Lskj.MyControl
{
public partial class LabelDateEx : UserControl
{
private int padding_right = 7;
public LabelDateEx()
{
InitializeComponent();
}
private string labelText;
[Description("Label值")]
public string LabelText
{
get { return labelText; }
set
{
labelText = value;
lbMsg.Text = value;
pl_left.Width = lbMsg.Width + padding_right;
}
}
private string text;
[Description("文本框值")]
public override string Text
{
get
{
return txtBox.Text;
}
set
{
text = value;
txtBox.Text = text;
txtBox.CustomFormat = string.IsNullOrEmpty(text)
? " "
: FormatType;
}
}
[Description("提示文本")]
public string TipMsg { get; set; }
public string FormatType { get; set; } // 是否包含日期
public DateTimePicker GetDateTimePicker { get { return txtBox; } }
private string defaultString;
public string DefaultString
{
get { return defaultString; }
set { defaultString = value; }
}
private string unionFields;
public string UnionFields
{
get { return unionFields; }
set { unionFields = value; }
}
private string unionValue;
public string UnionValue
{
get { return unionValue; }
set { unionValue = value; }
}
public DateTimePicker getTextBox
{
get { return txtBox; }
}
}
}