Exemplo n.º 1
0
        public ConfigTreeNode GetConfigNodeByJPath(string jpath)
        {
            ConfigTreeNode results = null;

            foreach (var x in this._subMenu)
            {
                if (null != results)
                {
                    break;
                }
                if (x.JPath == jpath)
                {
                    results = x;
                    break;
                }
                _searchByJpath(jpath, x.SubMenu, ref results);
            }
            return(results);
        }
Exemplo n.º 2
0
        public ConfigTreeNode GetConfigNodeByGuid(string guid)
        {
            ConfigTreeNode results = null;

            foreach (var x in this._subMenu)
            {
                if (x.SubNodeSelectId == guid)
                {
                    results = x;
                    break;
                }
                if (null != results)
                {
                    break;
                }
                _searchByGuid(guid, x.SubMenu, ref results);
            }
            return(results);
        }
Exemplo n.º 3
0
        public void SyncUpdate(ConfigTreeNode sender)
        {
            if (null == sender)
            {
                return;
            }
            var updateDataConfig = this.UpdateDictionary.UpdateData;

            foreach (var updateData in updateDataConfig)
            {
                if (updateData.Key != sender.Key)
                {
                    continue;
                }
                if (updateData.Value.OptionKey != sender.Properties.CurrentValue)
                {
                    continue;
                }
                this.RawDataMap.Offset = updateData.Value.RawDataMap.Offset;
                this.RawDataMap.Size   = updateData.Value.RawDataMap.Size;
                this.Properties        = updateData.Value.Properties;
                this._nodeEditStatus   = ConfigNodeStatus.Modified;
            }
        }
Exemplo n.º 4
0
 private void _searchByJpath(string jpath, IEnumerable <ConfigTreeNode> elements, ref ConfigTreeNode results)
 {
     if (null != results)
     {
         return;
     }
     foreach (var x in elements)
     {
         if (null != results)
         {
             return;
         }
         if (x.JPath == jpath)
         {
             results = x;
             break;
         }
         _searchByJpath(jpath, x.SubMenu, ref results);
     }
 }
Exemplo n.º 5
0
 private void _searchByGuid(string guid, IEnumerable <ConfigTreeNode> elements, ref ConfigTreeNode results)
 {
     if (null != results)
     {
         return;
     }
     foreach (var x in elements)
     {
         if (null != results)
         {
             return;
         }
         if (x.SubNodeSelectId == guid)
         {
             results = x;
             break;
         }
         _searchByGuid(guid, x.SubMenu, ref results);
     }
 }