Beispiel #1
0
		private void logEntryList_NewEntry(object sender, LogEntryList.ViewEntryEventArgs e)
		{
			DataLogOutput.LogEntry logEntry = e.Entry.LogEntry;
			bool isHidden = this.DockHandler.DockState.IsAutoHide() && !this.ContainsFocus;
			bool pause = logEntry.Type == LogMessageType.Error && this.buttonPauseOnError.Checked && Sandbox.State == SandboxState.Playing && !Sandbox.IsChangingState;

			if (isHidden)
			{
				if (logEntry.Type == LogMessageType.Warning)
				{
					this.unseenWarnings++;
				}
				else if (logEntry.Type == LogMessageType.Error)
				{
					if (this.unseenErrors == 0 || pause) System.Media.SystemSounds.Hand.Play();
					this.unseenErrors++;
				}
			}

			if (pause) Sandbox.Pause();
			this.UpdateTabText();
		}
Beispiel #2
0
			public ViewEntry(LogEntryList parent, DataLogOutput.LogEntry log)
			{
				this.parent = parent;
				this.log = log;
				this.msgLines = log.Message.Split(new string[] { Environment.NewLine }, StringSplitOptions.None).Length;
			}
		private void logEntryList_NewEntry(object sender, LogEntryList.ViewEntryEventArgs e)
		{
			DataLogOutput.LogEntry logEntry = e.Entry.LogEntry;
			bool isHidden = this.DockHandler.DockState.IsAutoHide() && !this.ContainsFocus;
			bool unseenChanges = false;

			if (isHidden)
			{
				if (logEntry.Type == LogMessageType.Warning)
				{
					this.unseenWarnings++;
					unseenChanges = true;
				}
				else if (logEntry.Type == LogMessageType.Error)
				{
					if (this.unseenErrors == 0) System.Media.SystemSounds.Hand.Play();
					this.unseenErrors++;
					unseenChanges = true;
				}
			}

			if (unseenChanges) this.UpdateTabText();
		}
Beispiel #4
0
 public ViewEntry(LogEntryList parent, DataLogOutput.LogEntry log)
 {
     this.parent   = parent;
     this.log      = log;
     this.msgLines = log.Message.Split(new string[] { Environment.NewLine }, StringSplitOptions.None).Length;
 }