private void CreateComponentTree() { string[] submenus = Unsupported.GetSubmenus("Component"); string[] submenusCommands = Unsupported.GetSubmenusCommands("Component"); List<string> stringList = new List<string>(); List<AddComponentWindow.Element> elementList = new List<AddComponentWindow.Element>(); for (int index = 0; index < submenus.Length; ++index) { if (!(submenusCommands[index] == "ADD")) { string menuPath = submenus[index]; string[] strArray = menuPath.Split('/'); while (strArray.Length - 1 < stringList.Count) stringList.RemoveAt(stringList.Count - 1); while (stringList.Count > 0 && strArray[stringList.Count - 1] != stringList[stringList.Count - 1]) stringList.RemoveAt(stringList.Count - 1); while (strArray.Length - 1 > stringList.Count) { elementList.Add((AddComponentWindow.Element) new AddComponentWindow.GroupElement(stringList.Count, LocalizationDatabase.GetLocalizedString(strArray[stringList.Count]))); stringList.Add(strArray[stringList.Count]); } elementList.Add((AddComponentWindow.Element) new AddComponentWindow.ComponentElement(stringList.Count, LocalizationDatabase.GetLocalizedString(strArray[strArray.Length - 1]), menuPath, submenusCommands[index])); } } elementList.Add((AddComponentWindow.Element) new AddComponentWindow.NewScriptElement()); this.m_Tree = elementList.ToArray(); if (this.m_Stack.Count == 0) { this.m_Stack.Add(this.m_Tree[0] as AddComponentWindow.GroupElement); } else { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type AddComponentWindow.\u003CCreateComponentTree\u003Ec__AnonStorey80 treeCAnonStorey80 = new AddComponentWindow.\u003CCreateComponentTree\u003Ec__AnonStorey80(); // ISSUE: reference to a compiler-generated field treeCAnonStorey80.\u003C\u003Ef__this = this; AddComponentWindow.GroupElement groupElement1 = this.m_Tree[0] as AddComponentWindow.GroupElement; // ISSUE: reference to a compiler-generated field treeCAnonStorey80.level = 0; label_15: while (true) { // ISSUE: reference to a compiler-generated field AddComponentWindow.GroupElement groupElement2 = this.m_Stack[treeCAnonStorey80.level]; // ISSUE: reference to a compiler-generated field this.m_Stack[treeCAnonStorey80.level] = groupElement1; // ISSUE: reference to a compiler-generated field this.m_Stack[treeCAnonStorey80.level].selectedIndex = groupElement2.selectedIndex; // ISSUE: reference to a compiler-generated field this.m_Stack[treeCAnonStorey80.level].scroll = groupElement2.scroll; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field treeCAnonStorey80.level = treeCAnonStorey80.level + 1; // ISSUE: reference to a compiler-generated field if (treeCAnonStorey80.level != this.m_Stack.Count) { // ISSUE: reference to a compiler-generated method AddComponentWindow.Element element = this.GetChildren(this.activeTree, (AddComponentWindow.Element) groupElement1).FirstOrDefault<AddComponentWindow.Element>(new Func<AddComponentWindow.Element, bool>(treeCAnonStorey80.\u003C\u003Em__13A)); if (element != null && element is AddComponentWindow.GroupElement) groupElement1 = element as AddComponentWindow.GroupElement; else break; } else goto label_20; } // ISSUE: reference to a compiler-generated field while (this.m_Stack.Count > treeCAnonStorey80.level) { // ISSUE: reference to a compiler-generated field this.m_Stack.RemoveAt(treeCAnonStorey80.level); } goto label_15; } label_20: AddComponentWindow.s_DirtyList = false; this.RebuildSearch(); }
private void CreateComponentTree() { string[] submenus = Unsupported.GetSubmenus("Component"); string[] submenusCommands = Unsupported.GetSubmenusCommands("Component"); List <string> stringList = new List <string>(); List <AddComponentWindow.Element> elementList = new List <AddComponentWindow.Element>(); for (int index = 0; index < submenus.Length; ++index) { if (!(submenusCommands[index] == "ADD")) { string menuPath = submenus[index]; string[] strArray = menuPath.Split('/'); while (strArray.Length - 1 < stringList.Count) { stringList.RemoveAt(stringList.Count - 1); } while (stringList.Count > 0 && strArray[stringList.Count - 1] != stringList[stringList.Count - 1]) { stringList.RemoveAt(stringList.Count - 1); } while (strArray.Length - 1 > stringList.Count) { elementList.Add((AddComponentWindow.Element) new AddComponentWindow.GroupElement(stringList.Count, LocalizationDatabase.GetLocalizedString(strArray[stringList.Count]))); stringList.Add(strArray[stringList.Count]); } elementList.Add((AddComponentWindow.Element) new AddComponentWindow.ComponentElement(stringList.Count, LocalizationDatabase.GetLocalizedString(strArray[strArray.Length - 1]), menuPath, submenusCommands[index])); } } elementList.Add((AddComponentWindow.Element) new AddComponentWindow.NewScriptElement()); this.m_Tree = elementList.ToArray(); if (this.m_Stack.Count == 0) { this.m_Stack.Add(this.m_Tree[0] as AddComponentWindow.GroupElement); } else { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type AddComponentWindow.\u003CCreateComponentTree\u003Ec__AnonStorey80 treeCAnonStorey80 = new AddComponentWindow.\u003CCreateComponentTree\u003Ec__AnonStorey80(); // ISSUE: reference to a compiler-generated field treeCAnonStorey80.\u003C\u003Ef__this = this; AddComponentWindow.GroupElement groupElement1 = this.m_Tree[0] as AddComponentWindow.GroupElement; // ISSUE: reference to a compiler-generated field treeCAnonStorey80.level = 0; label_15: while (true) { // ISSUE: reference to a compiler-generated field AddComponentWindow.GroupElement groupElement2 = this.m_Stack[treeCAnonStorey80.level]; // ISSUE: reference to a compiler-generated field this.m_Stack[treeCAnonStorey80.level] = groupElement1; // ISSUE: reference to a compiler-generated field this.m_Stack[treeCAnonStorey80.level].selectedIndex = groupElement2.selectedIndex; // ISSUE: reference to a compiler-generated field this.m_Stack[treeCAnonStorey80.level].scroll = groupElement2.scroll; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field treeCAnonStorey80.level = treeCAnonStorey80.level + 1; // ISSUE: reference to a compiler-generated field if (treeCAnonStorey80.level != this.m_Stack.Count) { // ISSUE: reference to a compiler-generated method AddComponentWindow.Element element = this.GetChildren(this.activeTree, (AddComponentWindow.Element)groupElement1).FirstOrDefault <AddComponentWindow.Element>(new Func <AddComponentWindow.Element, bool>(treeCAnonStorey80.\u003C\u003Em__13A)); if (element != null && element is AddComponentWindow.GroupElement) { groupElement1 = element as AddComponentWindow.GroupElement; } else { break; } } else { goto label_20; } } // ISSUE: reference to a compiler-generated field while (this.m_Stack.Count > treeCAnonStorey80.level) { // ISSUE: reference to a compiler-generated field this.m_Stack.RemoveAt(treeCAnonStorey80.level); } goto label_15; } label_20: AddComponentWindow.s_DirtyList = false; this.RebuildSearch(); }