SVN r654
SVN-Revision: r654
This commit is contained in:
@@ -20,20 +20,34 @@ namespace Lskj.Control
|
||||
public string ShowValue, ShowText;
|
||||
public MyControl ControlObj;
|
||||
public ControlModel mControlModel;
|
||||
public int ListBoxFontSize = 0;
|
||||
|
||||
public FrmComboxPopup()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public FrmComboxPopup(ControlModel model, MyControl controlObj)
|
||||
public FrmComboxPopup(ControlModel model, MyControl controlObj, int FontSize = 0)
|
||||
{
|
||||
try {
|
||||
InitializeComponent();
|
||||
|
||||
this.ListBoxFontSize = FontSize;
|
||||
this.mControlModel = model;
|
||||
this.ControlObj = controlObj;
|
||||
this.Text = model.LabelText + "选择";
|
||||
if (this.ListBoxFontSize > 0)
|
||||
{
|
||||
foreach (System.Windows.Forms.Control ctrol in this.panel3.Controls)
|
||||
{
|
||||
if (ctrol is SimpleButton)
|
||||
{
|
||||
SimpleButton simpleButton = ctrol as SimpleButton;
|
||||
Font oldFont = simpleButton.Font;
|
||||
simpleButton.Font = new Font(oldFont.Name, ListBoxFontSize);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
this.OnLoad();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -79,7 +93,16 @@ namespace Lskj.Control
|
||||
btn.Tag = rowItem;
|
||||
//text.Length > 6 ? text.Substring(0, 6) + "\n" + text.Substring(6) :
|
||||
btn.Text = text;
|
||||
btn.Font = new Font("微软雅黑", 12);
|
||||
if (ListBoxFontSize > 0)
|
||||
{
|
||||
btn.Font = new Font("微软雅黑", ListBoxFontSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
btn.Font = new Font("微软雅黑", 12);
|
||||
}
|
||||
|
||||
|
||||
btn.Click -= new EventHandler(btn_Click);
|
||||
btn.Click += new EventHandler(btn_Click);
|
||||
}
|
||||
@@ -140,41 +163,4 @@ namespace Lskj.Control
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message,ex.Message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void simpleButton24_Click(object sender, EventArgs e)
|
||||
{
|
||||
try {
|
||||
if (this.mPage < this.mMaxPage)
|
||||
{
|
||||
this.mPage += 1;
|
||||
this.InitControl();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message,ex.Message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void simpleButton25_Click(object sender, EventArgs e)
|
||||
{
|
||||
try {
|
||||
if (this.mPage == this.mMaxPage) return;
|
||||
this.mPage = this.mMaxPage;
|
||||
this.InitControl();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message,ex.Message);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
MessageUtil.Show(Message,ex.Messa
|
||||
Reference in New Issue
Block a user