internal void SearchFieldGUI()
{
Event current = Event.current;
Rect position = GUILayoutUtility.GetRect(50f, 300f, 16f, 16f, EditorStyles.toolbarSearchField);
GUI.SetNextControlName("ProfilerSearchField");
if (this.m_FocusSearchField)
{
EditorGUI.FocusTextInControl("ProfilerSearchField");
if (Event.current.type == EventType.Repaint)
{
this.m_FocusSearchField = false;
}
}
if (((current.type == EventType.KeyDown) && (current.keyCode == KeyCode.Escape)) && (GUI.GetNameOfFocusedControl() == "ProfilerSearchField"))
{
this.m_SearchString = "";
}
if (((current.type == EventType.KeyDown) && ((current.keyCode == KeyCode.DownArrow) || (current.keyCode == KeyCode.UpArrow))) && (GUI.GetNameOfFocusedControl() == "ProfilerSearchField"))
{
this.m_CPUHierarchyGUI.SelectFirstRow();
this.m_CPUHierarchyGUI.SetKeyboardFocus();
base.Repaint();
current.Use();
}
bool flag = this.m_CPUHierarchyGUI.selectedIndex != -1;
EditorGUI.BeginChangeCheck();
int id = GUIUtility.GetControlID(s_HashControlID, FocusType.Keyboard, base.position);
this.m_SearchString = EditorGUI.ToolbarSearchField(id, position, this.m_SearchString, false);
if ((EditorGUI.EndChangeCheck() && (!this.IsSearching() && (GUIUtility.keyboardControl == 0))) && flag)
{
this.m_CPUHierarchyGUI.FrameSelection();
}
}