SVN r654
SVN-Revision: r654
This commit is contained in:
@@ -20,22 +20,35 @@ namespace Lskj.Control
|
||||
public string ShowValue = "", ShowText = "";
|
||||
public MyControl ControlObj;
|
||||
public ControlModel mControlModel;
|
||||
|
||||
public int ListBoxFontSize = 0;
|
||||
public FrmComboxMutilPopup()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public FrmComboxMutilPopup(ControlModel model, string showValue, string showText, MyControl ControlObj)
|
||||
public FrmComboxMutilPopup(ControlModel model, string showValue, string showText, MyControl ControlObj,int FontSize= 0)
|
||||
{
|
||||
try {
|
||||
InitializeComponent();
|
||||
|
||||
this.ListBoxFontSize = FontSize;
|
||||
this.ShowValue = showValue;
|
||||
this.ShowText = showText;
|
||||
this.mControlModel = model;
|
||||
this.ControlObj = ControlObj;
|
||||
this.Text = model.LabelText + "选择";
|
||||
if (this.ListBoxFontSize>0)
|
||||
{
|
||||
foreach (System.Windows.Forms.Control ctrol in this.panel2.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)
|
||||
@@ -82,6 +95,14 @@ namespace Lskj.Control
|
||||
btn.Text = text.Length > 6 ? text.Substring(0, 6) + "\n" + text.Substring(6) : text;
|
||||
btn.Click -= new EventHandler(btn_Click);
|
||||
btn.Click += new EventHandler(btn_Click);
|
||||
|
||||
if (ListBoxFontSize>0)
|
||||
{
|
||||
Font oldFont = btn.Font;
|
||||
btn.Font = new Font(oldFont.Name, ListBoxFontSize);
|
||||
}
|
||||
|
||||
|
||||
this.SetSelect(btn, this.ShowValue.Contains(rowItem[this.mControlModel.ValueMember] + ","));
|
||||
}
|
||||
controlIndex++;
|
||||
@@ -184,41 +205,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.Messag
|
||||
Reference in New Issue
Block a user