Ejemplo n.º 1
0
        private void CreateBindingContainerRec(ValidatorCoreLib.ConvertionTree convertionTree, string sBuiltKey, Dictionary <string, string> referenceBinding)
        {
            if (!convertionTree.convertionPath.Equals(ConvertionClassItem.sIgnoredString))
            {
                referenceBinding[convertionTree.convertionPath] = sBuiltKey;
            }

            foreach (ValidatorCoreLib.ConvertionTree chiled_convertionTree in convertionTree.convertionItems)
            {
                string sNewKey = "";
                if (!sBuiltKey.Equals(""))
                {
                    sNewKey  = sBuiltKey;
                    sNewKey += ".";
                }
                sNewKey += chiled_convertionTree.convertionAttribute;

                CreateBindingContainerRec(chiled_convertionTree, sNewKey, referenceBinding);
            }
        }
Ejemplo n.º 2
0
        private void AddConvertionRec(ValidatorCoreLib.ConvertionTree vci, TreeViewItem tvi, Boolean bHead)
        {
            ConvertionClassItem cci = new ConvertionClassItem(vci.convertionPath, vci.convertionAttribute, tvi);

            if (bHead)
            {
                cci.convertionAttributeTB.Visibility = Visibility.Hidden;
                cci.convertionAttribute.Visibility   = Visibility.Hidden;
                cci.convertionAttribute.Text         = "";
            }
            tvi.Header     = cci;
            tvi.IsExpanded = true;

            foreach (ValidatorCoreLib.ConvertionTree chiled_vci in vci.convertionItems)
            {
                TreeViewItem Newitem = new TreeViewItem();
                Newitem.IsExpanded = true;
                AddConvertionRec(chiled_vci, Newitem, false);
                tvi.Items.Add(Newitem);
            }
        }
Ejemplo n.º 3
0
        private bool GetValidationConvertionTreeItemFromTreeHelper(ValidatorCoreLib.ConvertionTree convertionItem, TreeViewItem tvi)
        {
            if (tvi.Header == null)
            {
                return(false);
            }

            ValidatorCoreLib.ConvertionTree copiedConvertionItem = (((ConvertionClassItem)tvi.Header)).GetConvertionItem();
            convertionItem.convertionPath      = copiedConvertionItem.convertionPath;
            convertionItem.convertionAttribute = copiedConvertionItem.convertionAttribute;

            foreach (Object ob in tvi.Items)
            {
                if (ob.GetType().Equals(typeof(TreeViewItem)))  // ConvertionItem
                {
                    ValidatorCoreLib.ConvertionTree convertionItemAdd = new ValidatorCoreLib.ConvertionTree();
                    if (GetValidationConvertionTreeItemFromTreeHelper(convertionItemAdd, (TreeViewItem)ob))
                    {
                        convertionItem.Add(convertionItemAdd);
                    }
                }
            }
            return(true);
        }
Ejemplo n.º 4
0
 public void Add(ConvertionTree convertionItem)
 {
     convertionTreeListItem.Add(convertionItem);
 }
Ejemplo n.º 5
0
 public void Add(ConvertionTree convertionItem)
 {
     convertionItems.Add(convertionItem);
 }