Example #1
0
 private static string ContextString(LogEntry entry)
 {
     StringBuilder builder = new StringBuilder();
     if (HasMode(entry.mode, Mode.Error))
     {
         builder.Append("Error ");
     }
     else if (HasMode(entry.mode, Mode.Log))
     {
         builder.Append("Log ");
     }
     else
     {
         builder.Append("Assert ");
     }
     builder.Append("in file: ");
     builder.Append(entry.file);
     builder.Append(" at line: ");
     builder.Append(entry.line);
     if (entry.errorNum != 0)
     {
         builder.Append(" and errorNum: ");
         builder.Append(entry.errorNum);
     }
     return builder.ToString();
 }
		private void OnGUI()
		{
			Event current = Event.current;
			ConsoleWindow.LoadIcons();
			GUILayout.BeginHorizontal(ConsoleWindow.Constants.Toolbar, new GUILayoutOption[0]);
			if (GUILayout.Button("Clear", ConsoleWindow.Constants.MiniButton, new GUILayoutOption[0]))
			{
				LogEntries.Clear();
				GUIUtility.keyboardControl = 0;
			}
			int count = LogEntries.GetCount();
			if (this.m_ListView.totalRows != count && this.m_ListView.scrollPos.y >= (float)(this.m_ListView.rowHeight * this.m_ListView.totalRows - this.ms_LVHeight))
			{
				this.m_ListView.scrollPos.y = (float)(count * 32 - this.ms_LVHeight);
			}
			EditorGUILayout.Space();
			bool flag = this.HasFlag(ConsoleWindow.ConsoleFlags.Collapse);
			this.SetFlag(ConsoleWindow.ConsoleFlags.Collapse, GUILayout.Toggle(flag, "Collapse", ConsoleWindow.Constants.MiniButtonLeft, new GUILayoutOption[0]));
			bool flag2 = flag != this.HasFlag(ConsoleWindow.ConsoleFlags.Collapse);
			if (flag2)
			{
				this.m_ListView.row = -1;
				this.m_ListView.scrollPos.y = (float)(LogEntries.GetCount() * 32);
			}
			this.SetFlag(ConsoleWindow.ConsoleFlags.ClearOnPlay, GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.ClearOnPlay), "Clear on Play", ConsoleWindow.Constants.MiniButtonMiddle, new GUILayoutOption[0]));
			this.SetFlag(ConsoleWindow.ConsoleFlags.ErrorPause, GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.ErrorPause), "Error Pause", ConsoleWindow.Constants.MiniButtonRight, new GUILayoutOption[0]));
			EditorGUILayout.Space();
			if (this.m_DevBuild)
			{
				GUILayout.FlexibleSpace();
				this.SetFlag(ConsoleWindow.ConsoleFlags.StopForAssert, GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.StopForAssert), "Stop for Assert", ConsoleWindow.Constants.MiniButtonLeft, new GUILayoutOption[0]));
				this.SetFlag(ConsoleWindow.ConsoleFlags.StopForError, GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.StopForError), "Stop for Error", ConsoleWindow.Constants.MiniButtonRight, new GUILayoutOption[0]));
			}
			GUILayout.FlexibleSpace();
			int num = 0;
			int num2 = 0;
			int num3 = 0;
			LogEntries.GetCountsByType(ref num, ref num2, ref num3);
			bool val = GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.LogLevelLog), new GUIContent((num3 > 999) ? "999+" : num3.ToString(), (num3 <= 0) ? ConsoleWindow.iconInfoMono : ConsoleWindow.iconInfoSmall), ConsoleWindow.Constants.MiniButtonRight, new GUILayoutOption[0]);
			bool val2 = GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.LogLevelWarning), new GUIContent((num2 > 999) ? "999+" : num2.ToString(), (num2 <= 0) ? ConsoleWindow.iconWarnMono : ConsoleWindow.iconWarnSmall), ConsoleWindow.Constants.MiniButtonMiddle, new GUILayoutOption[0]);
			bool val3 = GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.LogLevelError), new GUIContent((num > 999) ? "999+" : num.ToString(), (num <= 0) ? ConsoleWindow.iconErrorMono : ConsoleWindow.iconErrorSmall), ConsoleWindow.Constants.MiniButtonLeft, new GUILayoutOption[0]);
			this.SetFlag(ConsoleWindow.ConsoleFlags.LogLevelLog, val);
			this.SetFlag(ConsoleWindow.ConsoleFlags.LogLevelWarning, val2);
			this.SetFlag(ConsoleWindow.ConsoleFlags.LogLevelError, val3);
			GUILayout.EndHorizontal();
			this.m_ListView.totalRows = LogEntries.StartGettingEntries();
			SplitterGUILayout.BeginVerticalSplit(this.spl, new GUILayoutOption[0]);
			EditorGUIUtility.SetIconSize(new Vector2(32f, 32f));
			GUIContent gUIContent = new GUIContent();
			int controlID = GUIUtility.GetControlID(FocusType.Native);
			try
			{
				bool flag3 = false;
				bool flag4 = this.HasFlag(ConsoleWindow.ConsoleFlags.Collapse);
				foreach (ListViewElement listViewElement in ListViewGUI.ListView(this.m_ListView, ConsoleWindow.Constants.Box, new GUILayoutOption[0]))
				{
					if (current.type == EventType.MouseDown && current.button == 0 && listViewElement.position.Contains(current.mousePosition))
					{
						if (current.clickCount == 2)
						{
							LogEntries.RowGotDoubleClicked(this.m_ListView.row);
						}
						flag3 = true;
					}
					if (current.type == EventType.Repaint)
					{
						int mode = 0;
						string text = null;
						LogEntries.GetFirstTwoLinesEntryTextAndModeInternal(listViewElement.row, ref mode, ref text);
						GUIStyle gUIStyle = (listViewElement.row % 2 != 0) ? ConsoleWindow.Constants.EvenBackground : ConsoleWindow.Constants.OddBackground;
						gUIStyle.Draw(listViewElement.position, false, false, this.m_ListView.row == listViewElement.row, false);
						gUIContent.text = text;
						GUIStyle styleForErrorMode = ConsoleWindow.GetStyleForErrorMode(mode);
						styleForErrorMode.Draw(listViewElement.position, gUIContent, controlID, this.m_ListView.row == listViewElement.row);
						if (flag4)
						{
							Rect position = listViewElement.position;
							gUIContent.text = LogEntries.GetEntryCount(listViewElement.row).ToString(CultureInfo.InvariantCulture);
							Vector2 vector = ConsoleWindow.Constants.CountBadge.CalcSize(gUIContent);
							position.xMin = position.xMax - vector.x;
							position.yMin += (position.yMax - position.yMin - vector.y) * 0.5f;
							position.x -= 5f;
							GUI.Label(position, gUIContent, ConsoleWindow.Constants.CountBadge);
						}
					}
				}
				if (flag3 && this.m_ListView.scrollPos.y >= (float)(this.m_ListView.rowHeight * this.m_ListView.totalRows - this.ms_LVHeight))
				{
					this.m_ListView.scrollPos.y = (float)(this.m_ListView.rowHeight * this.m_ListView.totalRows - this.ms_LVHeight - 1);
				}
				if (this.m_ListView.totalRows == 0 || this.m_ListView.row >= this.m_ListView.totalRows || this.m_ListView.row < 0)
				{
					if (this.m_ActiveText.Length != 0)
					{
						this.SetActiveEntry(null);
					}
				}
				else
				{
					LogEntry logEntry = new LogEntry();
					LogEntries.GetEntryInternal(this.m_ListView.row, logEntry);
					this.SetActiveEntry(logEntry);
					LogEntries.GetEntryInternal(this.m_ListView.row, logEntry);
					if (this.m_ListView.selectionChanged || !this.m_ActiveText.Equals(logEntry.condition))
					{
						this.SetActiveEntry(logEntry);
					}
				}
				if (GUIUtility.keyboardControl == this.m_ListView.ID && current.type == EventType.KeyDown && current.keyCode == KeyCode.Return && this.m_ListView.row != 0)
				{
					LogEntries.RowGotDoubleClicked(this.m_ListView.row);
					Event.current.Use();
				}
				if (current.type != EventType.Layout && ListViewGUI.ilvState.rectHeight != 1)
				{
					this.ms_LVHeight = ListViewGUI.ilvState.rectHeight;
				}
			}
			finally
			{
				LogEntries.EndGettingEntries();
				EditorGUIUtility.SetIconSize(Vector2.zero);
			}
			this.m_TextScroll = GUILayout.BeginScrollView(this.m_TextScroll, ConsoleWindow.Constants.Box);
			float minHeight = ConsoleWindow.Constants.MessageStyle.CalcHeight(GUIContent.Temp(this.m_ActiveText), base.position.width);
			EditorGUILayout.SelectableLabel(this.m_ActiveText, ConsoleWindow.Constants.MessageStyle, new GUILayoutOption[]
			{
				GUILayout.ExpandWidth(true),
				GUILayout.ExpandHeight(true),
				GUILayout.MinHeight(minHeight)
			});
			GUILayout.EndScrollView();
			SplitterGUILayout.EndVerticalSplit();
			if ((current.type == EventType.ValidateCommand || current.type == EventType.ExecuteCommand) && current.commandName == "Copy" && this.m_ActiveText != string.Empty)
			{
				if (current.type == EventType.ExecuteCommand)
				{
					EditorGUIUtility.systemCopyBuffer = this.m_ActiveText;
				}
				current.Use();
			}
		}
		private void SetActiveEntry(LogEntry entry)
		{
			if (entry != null)
			{
				this.m_ActiveText = entry.condition;
				if (this.m_ActiveInstanceID != entry.instanceID)
				{
					this.m_ActiveInstanceID = entry.instanceID;
					if (entry.instanceID != 0)
					{
						EditorGUIUtility.PingObject(entry.instanceID);
					}
				}
			}
			else
			{
				this.m_ActiveText = string.Empty;
				this.m_ActiveInstanceID = 0;
				this.m_ListView.row = -1;
			}
		}
		private static string ContextString(LogEntry entry)
		{
			StringBuilder stringBuilder = new StringBuilder();
			if (ConsoleWindow.HasMode(entry.mode, ConsoleWindow.Mode.Error))
			{
				stringBuilder.Append("Error ");
			}
			else
			{
				if (ConsoleWindow.HasMode(entry.mode, ConsoleWindow.Mode.Log))
				{
					stringBuilder.Append("Log ");
				}
				else
				{
					stringBuilder.Append("Assert ");
				}
			}
			stringBuilder.Append("in file: ");
			stringBuilder.Append(entry.file);
			stringBuilder.Append(" at line: ");
			stringBuilder.Append(entry.line);
			if (entry.errorNum != 0)
			{
				stringBuilder.Append(" and errorNum: ");
				stringBuilder.Append(entry.errorNum);
			}
			return stringBuilder.ToString();
		}
Example #5
0
 public static extern bool GetEntryInternal(int row, LogEntry outputEntry);
 private void OnGUI()
 {
   Event current = Event.current;
   ConsoleWindow.LoadIcons();
   GUILayout.BeginHorizontal(ConsoleWindow.Constants.Toolbar, new GUILayoutOption[0]);
   if (GUILayout.Button("Clear", ConsoleWindow.Constants.MiniButton, new GUILayoutOption[0]))
   {
     LogEntries.Clear();
     GUIUtility.keyboardControl = 0;
   }
   int count = LogEntries.GetCount();
   if (this.m_ListView.totalRows != count && (double) this.m_ListView.scrollPos.y >= (double) (this.m_ListView.rowHeight * this.m_ListView.totalRows - this.ms_LVHeight))
     this.m_ListView.scrollPos.y = (float) (count * 32 - this.ms_LVHeight);
   EditorGUILayout.Space();
   bool flag1 = this.HasFlag(ConsoleWindow.ConsoleFlags.Collapse);
   this.SetFlag(ConsoleWindow.ConsoleFlags.Collapse, GUILayout.Toggle(flag1, "Collapse", ConsoleWindow.Constants.MiniButtonLeft, new GUILayoutOption[0]));
   if (flag1 != this.HasFlag(ConsoleWindow.ConsoleFlags.Collapse))
   {
     this.m_ListView.row = -1;
     this.m_ListView.scrollPos.y = (float) (LogEntries.GetCount() * 32);
   }
   this.SetFlag(ConsoleWindow.ConsoleFlags.ClearOnPlay, GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.ClearOnPlay), "Clear on Play", ConsoleWindow.Constants.MiniButtonMiddle, new GUILayoutOption[0]));
   this.SetFlag(ConsoleWindow.ConsoleFlags.ErrorPause, GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.ErrorPause), "Error Pause", ConsoleWindow.Constants.MiniButtonRight, new GUILayoutOption[0]));
   EditorGUILayout.Space();
   if (this.m_DevBuild)
   {
     GUILayout.FlexibleSpace();
     this.SetFlag(ConsoleWindow.ConsoleFlags.StopForAssert, GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.StopForAssert), "Stop for Assert", ConsoleWindow.Constants.MiniButtonLeft, new GUILayoutOption[0]));
     this.SetFlag(ConsoleWindow.ConsoleFlags.StopForError, GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.StopForError), "Stop for Error", ConsoleWindow.Constants.MiniButtonRight, new GUILayoutOption[0]));
   }
   GUILayout.FlexibleSpace();
   int errorCount = 0;
   int warningCount = 0;
   int logCount = 0;
   LogEntries.GetCountsByType(ref errorCount, ref warningCount, ref logCount);
   bool val1 = GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.LogLevelLog), new GUIContent(logCount > 999 ? "999+" : logCount.ToString(), logCount <= 0 ? (Texture) ConsoleWindow.iconInfoMono : (Texture) ConsoleWindow.iconInfoSmall), ConsoleWindow.Constants.MiniButtonRight, new GUILayoutOption[0]);
   bool val2 = GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.LogLevelWarning), new GUIContent(warningCount > 999 ? "999+" : warningCount.ToString(), warningCount <= 0 ? (Texture) ConsoleWindow.iconWarnMono : (Texture) ConsoleWindow.iconWarnSmall), ConsoleWindow.Constants.MiniButtonMiddle, new GUILayoutOption[0]);
   bool val3 = GUILayout.Toggle(this.HasFlag(ConsoleWindow.ConsoleFlags.LogLevelError), new GUIContent(errorCount > 999 ? "999+" : errorCount.ToString(), errorCount <= 0 ? (Texture) ConsoleWindow.iconErrorMono : (Texture) ConsoleWindow.iconErrorSmall), ConsoleWindow.Constants.MiniButtonLeft, new GUILayoutOption[0]);
   this.SetFlag(ConsoleWindow.ConsoleFlags.LogLevelLog, val1);
   this.SetFlag(ConsoleWindow.ConsoleFlags.LogLevelWarning, val2);
   this.SetFlag(ConsoleWindow.ConsoleFlags.LogLevelError, val3);
   GUILayout.EndHorizontal();
   this.m_ListView.totalRows = LogEntries.StartGettingEntries();
   SplitterGUILayout.BeginVerticalSplit(this.spl);
   EditorGUIUtility.SetIconSize(new Vector2(32f, 32f));
   GUIContent content = new GUIContent();
   int controlId = GUIUtility.GetControlID(FocusType.Native);
   try
   {
     bool flag2 = false;
     bool flag3 = this.HasFlag(ConsoleWindow.ConsoleFlags.Collapse);
     foreach (ListViewElement listViewElement in ListViewGUI.ListView(this.m_ListView, ConsoleWindow.Constants.Box, new GUILayoutOption[0]))
     {
       if (current.type == EventType.MouseDown && current.button == 0 && listViewElement.position.Contains(current.mousePosition))
       {
         if (current.clickCount == 2)
           LogEntries.RowGotDoubleClicked(this.m_ListView.row);
         flag2 = true;
       }
       if (current.type == EventType.Repaint)
       {
         int mask = 0;
         string outString = (string) null;
         LogEntries.GetFirstTwoLinesEntryTextAndModeInternal(listViewElement.row, ref mask, ref outString);
         (listViewElement.row % 2 != 0 ? ConsoleWindow.Constants.EvenBackground : ConsoleWindow.Constants.OddBackground).Draw(listViewElement.position, false, false, this.m_ListView.row == listViewElement.row, false);
         content.text = outString;
         ConsoleWindow.GetStyleForErrorMode(mask).Draw(listViewElement.position, content, controlId, this.m_ListView.row == listViewElement.row);
         if (flag3)
         {
           Rect position = listViewElement.position;
           content.text = LogEntries.GetEntryCount(listViewElement.row).ToString((IFormatProvider) CultureInfo.InvariantCulture);
           Vector2 vector2 = ConsoleWindow.Constants.CountBadge.CalcSize(content);
           position.xMin = position.xMax - vector2.x;
           position.yMin += (float) (((double) position.yMax - (double) position.yMin - (double) vector2.y) * 0.5);
           position.x -= 5f;
           GUI.Label(position, content, ConsoleWindow.Constants.CountBadge);
         }
       }
     }
     if (flag2 && (double) this.m_ListView.scrollPos.y >= (double) (this.m_ListView.rowHeight * this.m_ListView.totalRows - this.ms_LVHeight))
       this.m_ListView.scrollPos.y = (float) (this.m_ListView.rowHeight * this.m_ListView.totalRows - this.ms_LVHeight - 1);
     if (this.m_ListView.totalRows == 0 || this.m_ListView.row >= this.m_ListView.totalRows || this.m_ListView.row < 0)
     {
       if (this.m_ActiveText.Length != 0)
         this.SetActiveEntry((LogEntry) null);
     }
     else
     {
       LogEntry logEntry = new LogEntry();
       LogEntries.GetEntryInternal(this.m_ListView.row, logEntry);
       this.SetActiveEntry(logEntry);
       LogEntries.GetEntryInternal(this.m_ListView.row, logEntry);
       if (this.m_ListView.selectionChanged || !this.m_ActiveText.Equals(logEntry.condition))
         this.SetActiveEntry(logEntry);
     }
     if (GUIUtility.keyboardControl == this.m_ListView.ID && current.type == EventType.KeyDown && (current.keyCode == KeyCode.Return && this.m_ListView.row != 0))
     {
       LogEntries.RowGotDoubleClicked(this.m_ListView.row);
       Event.current.Use();
     }
     if (current.type != EventType.Layout)
     {
       if (ListViewGUI.ilvState.rectHeight != 1)
         this.ms_LVHeight = ListViewGUI.ilvState.rectHeight;
     }
   }
   finally
   {
     LogEntries.EndGettingEntries();
     EditorGUIUtility.SetIconSize(Vector2.zero);
   }
   this.m_TextScroll = GUILayout.BeginScrollView(this.m_TextScroll, ConsoleWindow.Constants.Box);
   float minHeight = ConsoleWindow.Constants.MessageStyle.CalcHeight(GUIContent.Temp(this.m_ActiveText), this.position.width);
   EditorGUILayout.SelectableLabel(this.m_ActiveText, ConsoleWindow.Constants.MessageStyle, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true), GUILayout.MinHeight(minHeight));
   GUILayout.EndScrollView();
   SplitterGUILayout.EndVerticalSplit();
   if (current.type != EventType.ValidateCommand && current.type != EventType.ExecuteCommand || (!(current.commandName == "Copy") || !(this.m_ActiveText != string.Empty)))
     return;
   if (current.type == EventType.ExecuteCommand)
     EditorGUIUtility.systemCopyBuffer = this.m_ActiveText;
   current.Use();
 }
Example #7
0
 private void OnGUI()
 {
     Event current = Event.current;
     LoadIcons();
     GUILayout.BeginHorizontal(Constants.Toolbar, new GUILayoutOption[0]);
     if (GUILayout.Button("Clear", Constants.MiniButton, new GUILayoutOption[0]))
     {
         LogEntries.Clear();
         GUIUtility.keyboardControl = 0;
     }
     int count = LogEntries.GetCount();
     if ((this.m_ListView.totalRows != count) && (this.m_ListView.scrollPos.y >= ((this.m_ListView.rowHeight * this.m_ListView.totalRows) - this.ms_LVHeight)))
     {
         this.m_ListView.scrollPos.y = (count * 0x20) - this.ms_LVHeight;
     }
     EditorGUILayout.Space();
     bool flag = this.HasFlag(ConsoleFlags.Collapse);
     this.SetFlag(ConsoleFlags.Collapse, GUILayout.Toggle(flag, "Collapse", Constants.MiniButtonLeft, new GUILayoutOption[0]));
     if (flag != this.HasFlag(ConsoleFlags.Collapse))
     {
         this.m_ListView.row = -1;
         this.m_ListView.scrollPos.y = LogEntries.GetCount() * 0x20;
     }
     this.SetFlag(ConsoleFlags.ClearOnPlay, GUILayout.Toggle(this.HasFlag(ConsoleFlags.ClearOnPlay), "Clear on Play", Constants.MiniButtonMiddle, new GUILayoutOption[0]));
     this.SetFlag(ConsoleFlags.ErrorPause, GUILayout.Toggle(this.HasFlag(ConsoleFlags.ErrorPause), "Error Pause", Constants.MiniButtonRight, new GUILayoutOption[0]));
     EditorGUILayout.Space();
     if (this.m_DevBuild)
     {
         GUILayout.FlexibleSpace();
         this.SetFlag(ConsoleFlags.StopForAssert, GUILayout.Toggle(this.HasFlag(ConsoleFlags.StopForAssert), "Stop for Assert", Constants.MiniButtonLeft, new GUILayoutOption[0]));
         this.SetFlag(ConsoleFlags.StopForError, GUILayout.Toggle(this.HasFlag(ConsoleFlags.StopForError), "Stop for Error", Constants.MiniButtonRight, new GUILayoutOption[0]));
     }
     GUILayout.FlexibleSpace();
     int errorCount = 0;
     int warningCount = 0;
     int logCount = 0;
     LogEntries.GetCountsByType(ref errorCount, ref warningCount, ref logCount);
     bool val = GUILayout.Toggle(this.HasFlag(ConsoleFlags.LogLevelLog), new GUIContent((logCount > 0x3e7) ? "999+" : logCount.ToString(), (logCount <= 0) ? iconInfoMono : iconInfoSmall), Constants.MiniButtonRight, new GUILayoutOption[0]);
     bool flag4 = GUILayout.Toggle(this.HasFlag(ConsoleFlags.LogLevelWarning), new GUIContent((warningCount > 0x3e7) ? "999+" : warningCount.ToString(), (warningCount <= 0) ? iconWarnMono : iconWarnSmall), Constants.MiniButtonMiddle, new GUILayoutOption[0]);
     bool flag5 = GUILayout.Toggle(this.HasFlag(ConsoleFlags.LogLevelError), new GUIContent((errorCount > 0x3e7) ? "999+" : errorCount.ToString(), (errorCount <= 0) ? iconErrorMono : iconErrorSmall), Constants.MiniButtonLeft, new GUILayoutOption[0]);
     this.SetFlag(ConsoleFlags.LogLevelLog, val);
     this.SetFlag(ConsoleFlags.LogLevelWarning, flag4);
     this.SetFlag(ConsoleFlags.LogLevelError, flag5);
     GUILayout.EndHorizontal();
     this.m_ListView.totalRows = LogEntries.StartGettingEntries();
     SplitterGUILayout.BeginVerticalSplit(this.spl, new GUILayoutOption[0]);
     EditorGUIUtility.SetIconSize(new Vector2(32f, 32f));
     GUIContent content = new GUIContent();
     int controlID = GUIUtility.GetControlID(FocusType.Native);
     try
     {
         bool flag6 = false;
         bool flag7 = this.HasFlag(ConsoleFlags.Collapse);
         IEnumerator enumerator = ListViewGUI.ListView(this.m_ListView, Constants.Box, new GUILayoutOption[0]).GetEnumerator();
         try
         {
             while (enumerator.MoveNext())
             {
                 ListViewElement element = (ListViewElement) enumerator.Current;
                 if (((current.type == EventType.MouseDown) && (current.button == 0)) && element.position.Contains(current.mousePosition))
                 {
                     if (current.clickCount == 2)
                     {
                         LogEntries.RowGotDoubleClicked(this.m_ListView.row);
                     }
                     flag6 = true;
                 }
                 if (current.type == EventType.Repaint)
                 {
                     int mask = 0;
                     string outString = null;
                     LogEntries.GetFirstTwoLinesEntryTextAndModeInternal(element.row, ref mask, ref outString);
                     (((element.row % 2) != 0) ? Constants.EvenBackground : Constants.OddBackground).Draw(element.position, false, false, this.m_ListView.row == element.row, false);
                     content.text = outString;
                     GetStyleForErrorMode(mask).Draw(element.position, content, controlID, this.m_ListView.row == element.row);
                     if (flag7)
                     {
                         Rect position = element.position;
                         content.text = LogEntries.GetEntryCount(element.row).ToString(CultureInfo.InvariantCulture);
                         Vector2 vector = Constants.CountBadge.CalcSize(content);
                         position.xMin = position.xMax - vector.x;
                         position.yMin += ((position.yMax - position.yMin) - vector.y) * 0.5f;
                         position.x -= 5f;
                         GUI.Label(position, content, Constants.CountBadge);
                     }
                 }
             }
         }
         finally
         {
             IDisposable disposable = enumerator as IDisposable;
             if (disposable == null)
             {
             }
             disposable.Dispose();
         }
         if (flag6 && (this.m_ListView.scrollPos.y >= ((this.m_ListView.rowHeight * this.m_ListView.totalRows) - this.ms_LVHeight)))
         {
             this.m_ListView.scrollPos.y = ((this.m_ListView.rowHeight * this.m_ListView.totalRows) - this.ms_LVHeight) - 1;
         }
         if (((this.m_ListView.totalRows == 0) || (this.m_ListView.row >= this.m_ListView.totalRows)) || (this.m_ListView.row < 0))
         {
             if (this.m_ActiveText.Length != 0)
             {
                 this.SetActiveEntry(null);
             }
         }
         else
         {
             LogEntry outputEntry = new LogEntry();
             LogEntries.GetEntryInternal(this.m_ListView.row, outputEntry);
             this.SetActiveEntry(outputEntry);
             LogEntries.GetEntryInternal(this.m_ListView.row, outputEntry);
             if (this.m_ListView.selectionChanged || !this.m_ActiveText.Equals(outputEntry.condition))
             {
                 this.SetActiveEntry(outputEntry);
             }
         }
         if (((GUIUtility.keyboardControl == this.m_ListView.ID) && (current.type == EventType.KeyDown)) && ((current.keyCode == KeyCode.Return) && (this.m_ListView.row != 0)))
         {
             LogEntries.RowGotDoubleClicked(this.m_ListView.row);
             Event.current.Use();
         }
         if ((current.type != EventType.Layout) && (ListViewGUI.ilvState.rectHeight != 1))
         {
             this.ms_LVHeight = ListViewGUI.ilvState.rectHeight;
         }
     }
     finally
     {
         LogEntries.EndGettingEntries();
         EditorGUIUtility.SetIconSize(Vector2.zero);
     }
     this.m_TextScroll = GUILayout.BeginScrollView(this.m_TextScroll, Constants.Box);
     float minHeight = Constants.MessageStyle.CalcHeight(GUIContent.Temp(this.m_ActiveText), base.position.width);
     GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true), GUILayout.MinHeight(minHeight) };
     EditorGUILayout.SelectableLabel(this.m_ActiveText, Constants.MessageStyle, options);
     GUILayout.EndScrollView();
     SplitterGUILayout.EndVerticalSplit();
     if (((current.type == EventType.ValidateCommand) || (current.type == EventType.ExecuteCommand)) && ((current.commandName == "Copy") && (this.m_ActiveText != string.Empty)))
     {
         if (current.type == EventType.ExecuteCommand)
         {
             EditorGUIUtility.systemCopyBuffer = this.m_ActiveText;
         }
         current.Use();
     }
 }