| | |
| | | |
| | | namespace HStation.WinFrmUI.Basic |
| | | { |
| | | public partial class SetSysPropForCatalogDlg : Form |
| | | public partial class SetSysPropForCatalogDlg : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | public SetSysPropForCatalogDlg() |
| | | { |
| | | InitializeComponent(); |
| | | // this.treeList1.Columns["GroupName"].; |
| | | /* this.gridView1.Columns["GroupName"].Group(); |
| | | |
| | | */ |
| | | repositoryItemCheckedComboBoxEdit1.DisplayMember = "Name"; |
| | | repositoryItemCheckedComboBoxEdit1.ValueMember = "ID"; |
| | | repositoryItemCheckedComboBoxEdit1.ValueMember = "Name"; |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | private List<SysPropMappingViewModel> _allBindingList = new List<SysPropMappingViewModel>(); |
| | |
| | | model.Inherit = child.Inherit; |
| | | model.ChoiceList = child.ChoiceList; |
| | | model.ChoiceIds = child.ChoiceList.Where(x => x.Have).Select(x => x.ID).ToList(); |
| | | var stringList = child.ChoiceList.Where(x => x.Have == true).ToList().Select(x => x.ID.ToString()).ToList(); |
| | | var stringList = child.ChoiceList.Where(x => x.Have == true).ToList().Select(x => x.Name.ToString()).ToList(); |
| | | string result = string.Join(", ", stringList); |
| | | model.DisplayChoice = result; |
| | | _allBindingList.Add(model); |
| | |
| | | |
| | | private void treeList1_BeforeCheckNode(object sender, DevExpress.XtraTreeList.CheckNodeEventArgs e) |
| | | { |
| | | string isGroup = e.Node.GetValue("Inherit").ToString(); |
| | | if (isGroup == "True") |
| | | string Inherit = e.Node.GetValue("Inherit").ToString(); |
| | | if (Inherit == "True") |
| | | { |
| | | e.State = CheckState.Unchecked; |
| | | e.State = CheckState.Checked; |
| | | } |
| | | else |
| | | { |
| | |
| | | private void treeList1_AfterCheckNode(object sender, DevExpress.XtraTreeList.NodeEventArgs e) |
| | | { |
| | | SetCheckedChildNodes(e.Node, e.Node.CheckState, e); |
| | | } |
| | | } |
| | | |
| | | #region 设置子节点状态 |
| | | |
| | |
| | | { |
| | | node.Nodes[i].CheckState = CheckState.Checked; |
| | | SetCheckedChildNodes(node.Nodes[i], check, e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion 设置子节点状态 |
| | | } |
| | | } |
| | | } |