* UIEditForm:代码生成增加ComboCheckedListBox类型
This commit is contained in:
parent
51f7a3c6af
commit
3194ade098
Binary file not shown.
Binary file not shown.
@ -82,7 +82,7 @@ namespace Sunny.UI.Demo
|
||||
option.AddCombobox("Info", "关联", infoList, "Name", "Id", "2");
|
||||
option.AddSwitch("Switch", "选择", false, "打开", "关闭");
|
||||
option.AddComboTreeView("ComboTree", "选择", nodes, nodes[1].Nodes[1]);
|
||||
option.AddComboCheckedListBox("checkedList", "选择", checkedItems);
|
||||
option.AddComboCheckedListBox("checkedList", "选择", checkedItems, "CCC");
|
||||
|
||||
UIEditForm frm = new UIEditForm(option);
|
||||
frm.CheckedData += Frm_CheckedData;
|
||||
|
@ -200,6 +200,7 @@ namespace Sunny.UI
|
||||
edit.CheckBoxes = true;
|
||||
edit.DropDownStyle = UIDropDownStyle.DropDownList;
|
||||
edit.TreeView.Nodes.Clear();
|
||||
edit.Text = info.Value?.ToString();
|
||||
var obj = (ComboCheckedListBoxItem[])info.DataSource;
|
||||
foreach (var item in obj)
|
||||
{
|
||||
|
@ -312,7 +312,7 @@ namespace Sunny.UI
|
||||
Dictionary.TryAdd(info.DataPropertyName, info);
|
||||
}
|
||||
|
||||
public void AddComboCheckedListBox(string dataPropertyName, string text, ComboCheckedListBoxItem[] nodes, bool enabled = true, bool halfWidth = false)
|
||||
public void AddComboCheckedListBox(string dataPropertyName, string text, ComboCheckedListBoxItem[] nodes, string value, bool enabled = true, bool halfWidth = false)
|
||||
{
|
||||
if (Dictionary.ContainsKey(dataPropertyName))
|
||||
throw new DuplicateNameException(dataPropertyName + ": 已经存在");
|
||||
@ -322,7 +322,7 @@ namespace Sunny.UI
|
||||
DataPropertyName = dataPropertyName,
|
||||
EditType = EditType.ComboCheckedListBox,
|
||||
Text = text,
|
||||
Value = nodes,
|
||||
Value = value,
|
||||
Enabled = enabled,
|
||||
HalfWidth = halfWidth,
|
||||
DataSource = nodes
|
||||
|
Loading…
x
Reference in New Issue
Block a user