91 lines
2.2 KiB
C#
91 lines
2.2 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 LabelTextWwwEx : UserControl
|
|
{
|
|
private int padding_right = 7;
|
|
public LabelTextWwwEx()
|
|
{
|
|
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;
|
|
}
|
|
}
|
|
|
|
[Description("提示文本")]
|
|
public string TipMsg { get; set; }
|
|
|
|
[Description("是否允许为空")]
|
|
public bool IsEmpt { get; set; }
|
|
|
|
public TextBoxEx GetTextBox { get { return txtBox; } }
|
|
|
|
private void picQQ_Click(object sender, EventArgs e)
|
|
{
|
|
string url = string.Empty;
|
|
PictureBox pic = (PictureBox)sender;
|
|
url = GetTextBox.Text;
|
|
if (string.IsNullOrEmpty(url))
|
|
{
|
|
MessageBox.Show("请输入您要打开网址", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
return;
|
|
}
|
|
System.Diagnostics.Process.Start("iexplore.exe", url);
|
|
}
|
|
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; }
|
|
}
|
|
}
|
|
}
|