95 {
97 if (res != null)
98 {
100 TreeNodeCollection nodes = Nodes;
101
102
104 {
105
107 {
108 bool found = false;
110 {
111 if (tn.Text == n.
Name)
112 {
113 tn.Link(n);
114 found = true;
115
116 nodes.Remove(tn);
117 nodes.Add(tn);
118 break;
119 }
120 }
121
122 if (!found)
123 {
125 }
126 }
127
128
129 for (int i = 0; i < nodes.Count;)
130 {
132 if (n._resource == null)
133 {
134 n.Remove();
135 }
136 else
137 {
138 i++;
139 }
140 }
141
143 }
144 else
145 {
146
147 nodes.Clear();
148
150 {
151 nodes.Add(new GenericWrapper());
153 }
154 else
155 {
157 }
158 }
159
161
162 res.SelectChild += OnSelectChild;
163 res.ChildAdded += OnChildAdded;
164 res.ChildRemoved += OnChildRemoved;
165 res.ChildInserted += OnChildInserted;
166 res.Replaced += OnReplaced;
167 res.Restored += OnRestored;
168 res.Renamed += OnRenamed;
169 res.MovedUp += OnMovedUp;
170 res.MovedDown += OnMovedDown;
171 res.PropertyChanged += OnPropertyChanged;
172 res.UpdateProps += OnUpdateProperties;
173 res.UpdateControl += OnUpdateCurrentControl;
174 }
175
178 {
180 }
181
183 {
185 }
186 }
ResourceNode _resource
Definition: BaseWrapper.cs:76
virtual ? Color DefaultBackColor
Definition: BaseWrapper.cs:337
virtual ? Color DefaultForeColor
Definition: BaseWrapper.cs:338
void Unlink()
Definition: BaseWrapper.cs:188
static BaseWrapper Wrap(ResourceNode node)
Definition: BaseWrapper.cs:400
bool _discovered
Definition: BaseWrapper.cs:74
static IWin32Window _owner
Definition: BaseWrapper.cs:398
static int getImageIndex(ResourceType resResourceFileType)
Definition: Icons.cs:178
Definition: ResourceNode.cs:129
virtual bool HasChildren
Definition: ResourceNode.cs:185
virtual ResourceType ResourceFileType
Definition: ResourceNode.cs:193
virtual string Name
Definition: ResourceNode.cs:223
List< ResourceNode > Children
Definition: ResourceNode.cs:262