Exemplo n.º 1
0
 /// <summary>
 /// 创建节点
 /// </summary>
 /// <param name="nodeData"></param>
 /// <returns></returns>
 internal static ScopeTreeNode CreateScopeTreeNode(ScopeNodeData nodeData)
 {
     ScopeTreeNode node = new ScopeTreeNode();
     node.NodeData = nodeData;
     RebuildTreeNode(node);
     return node;
 }
Exemplo n.º 2
0
 public ScopeNode()
 {
     this._data = new ScopeNodeData();
     this._customStatusList = new List<CustomStatus>();
     base.Initialize(this._data);
     object[] customAttributes = base.GetType().GetCustomAttributes(typeof(NodeTypeAttribute), true);
     if (customAttributes.Length == 1)
     {
         this._data.NodeType = ((NodeTypeAttribute) customAttributes[0]).Guid;
     }
 }
 private ScopeNodeData ReadNextNodeData()
 {
     ScopeNodeData data = new ScopeNodeData();
     data.NodeType = this._source.Get_NodeData_NodeType()[this._source.Get_NodeData_NodeType_Id()[this._currentIndex]];
     data.SelectedImageIndex = this._source.Get_NodeData_SelectedImageIndex()[this._currentIndex];
     data.HideExpandIcon = this._source.Get_NodeData_HideExpandIcon()[this._currentIndex];
     data.SendActivation = this._source.Get_NodeData_SendActivation()[this._currentIndex];
     data.SendDeactivation = this._source.Get_NodeData_SendDeactivation()[this._currentIndex];
     data.ViewSetId = this._source.Get_NodeData_ViewSetId()[this._currentIndex];
     data.EnabledVerbs = (StandardVerbs) this._source.Get_NodeData_EnabledVerbs()[this._currentIndex];
     data.LanguageIndependentName = this._strings.ReadString();
     data.HelpTopic = this._strings.ReadString();
     this.ReadNextPasteTargetInfo(data.PasteTargetInfo);
     data.Id = this._source.Get_NodeData_Id()[this._currentIndex];
     data.ImageIndex = this._source.Get_NodeData_ImageIndex()[this._currentIndex];
     data.DisplayName = this._strings.ReadString();
     int num = this._source.Get_NodeData_SubItems_Count()[this._currentIndex];
     NodeSubItemData[] subItems = null;
     if (num >= 0)
     {
         subItems = new NodeSubItemData[num];
     }
     int index = 0;
     for (index = 0; index < num; index++)
     {
         subItems[index] = this.ReadNextSubItems();
         this._NodeData_SubItems_Offset++;
     }
     data.SetSubItems(subItems);
     return data;
 }
Exemplo n.º 4
0
 /// <summary>
 /// 更新节点
 /// </summary>
 /// <param name="nodeData"></param>
 /// <param name="treeNode"></param>
 internal static void UpdateScopeTreeNode(ScopeNodeData nodeData, ScopeTreeNode treeNode)
 {
     treeNode.NodeData = nodeData;
     RebuildTreeNode(treeNode);
 }
 private void WriteNextNodeData(ScopeNodeData obj)
 {
     Guid nodeType = obj.NodeType;
     int index = this._NodeData_NodeType.IndexOf(nodeType);
     if (index < 0)
     {
         index = this._NodeData_NodeType.Count;
         this._NodeData_NodeType.Add(nodeType);
     }
     this._NodeData_NodeType_Id[this._currentIndex] = index;
     this._NodeData_SelectedImageIndex[this._currentIndex] = obj.SelectedImageIndex;
     this._NodeData_HideExpandIcon[this._currentIndex] = obj.HideExpandIcon;
     this._NodeData_SendActivation[this._currentIndex] = obj.SendActivation;
     this._NodeData_SendDeactivation[this._currentIndex] = obj.SendDeactivation;
     this._NodeData_ViewSetId[this._currentIndex] = obj.ViewSetId;
     this._NodeData_EnabledVerbs[this._currentIndex] = (int) obj.EnabledVerbs;
     this.WriteString(obj.LanguageIndependentName);
     this.WriteString(obj.HelpTopic);
     this.WriteNextPasteTargetInfo(obj.PasteTargetInfo);
     this._NodeData_Id[this._currentIndex] = obj.Id;
     this._NodeData_ImageIndex[this._currentIndex] = obj.ImageIndex;
     this.WriteString(obj.DisplayName);
     NodeSubItemData[] subItems = obj.GetSubItems();
     int length = -1;
     if (subItems != null)
     {
         length = subItems.Length;
         int num3 = 0;
         for (num3 = 0; num3 < length; num3++)
         {
             this.WriteNextSubItems(subItems[num3]);
         }
     }
     this._NodeData_SubItems_Count[this._currentIndex] = length;
 }