private void pgConditionElement_PropertyValueChanged(object s, PropertyValueChangedEventArgs e) { TreeNode node = null; ListView lv = null; TreeView tv = null; VelixianForm tab = null; node = tvIConditionDetail.SelectedNode; lv = lvIConditions; tv = tvIConditionDetail; tab = Global._VelixianForms.FindForm("ITEMCONDITION"); if (node.Tag.GetType() == typeof(SHConditions)) { SHConditions conds = (SHConditions)node.Tag; node.Text = conds.GetString(xmlCore); } else if (node.Tag.GetType() == typeof(SHCondition)) { SHCondition cond = (SHCondition)node.Tag; node.Text = cond.GetString(xmlCore); } else if (node.Tag.GetType() == typeof(SHAnd)) { SHAnd and = (SHAnd)node.Tag; node.Text = and.GetString(xmlCore); } else if (node.Tag.GetType() == typeof(SHOr)) { SHOr or = (SHOr)node.Tag; node.Text = or.GetString(xmlCore); } if (node.Tag != null) { if (lv.SelectedItems[0].Tag == tv.TopNode.Tag) { SHConditions conds = (SHConditions)tv.Nodes[0].Tag; m_ListViewController.SetListText(lv.SelectedItems[0], conds); } } tab.Touch(); }
/// <param name="lvTarget">구체적인 조건들이 명시될 리스트뷰를 지정한다.</param> /// <param name="conds">조건들의 목록</param> public TreeNode ProcessConditions(SHXmlCore xmlCore, TreeView tvList, SHConditions conds) { if (conds == null) { return(null); } TreeNode nodeRoot = new TreeNode(conds.GetString(xmlCore)); nodeRoot.ImageIndex = 4; nodeRoot.SelectedImageIndex = 4; nodeRoot.Tag = conds; if (conds.and != null) { ProcessAnd(xmlCore, nodeRoot, conds.and); } if (conds.or != null) { ProcessOr(xmlCore, nodeRoot, conds.or); } for (int i = 0; i < conds.dataList.Count; i++) { SHCondition cond = conds.dataList[i] as SHCondition; ProcessCondition(xmlCore, nodeRoot, cond); } tvList.Tag = conds; tvList.Nodes.Clear(); tvList.Nodes.Add(nodeRoot); tvList.ExpandAll(); tvList.SelectedNode = nodeRoot; return(nodeRoot); }