Exemple #1
0
 public ViewEntry(LogEntryList parent, LogEntry log)
 {
     this.log      = log;
     this.msgLines = log.Message.Split(new string[] { Environment.NewLine }, StringSplitOptions.None).Length;
     this.height   = Math.Max(20, 7 + this.msgLines * parent.Font.Height);
 }
Exemple #2
0
        private void logEntryList_NewEntry(object sender, LogEntryList.ViewEntryEventArgs e)
        {
            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();

            bool pause =
                e.Entry.LogEntry.Type == LogMessageType.Error &&
                this.buttonPauseOnError.Checked &&
                Sandbox.State == SandboxState.Playing &&
                !Sandbox.IsChangingState;
            if (pause)
            {
                System.Media.SystemSounds.Hand.Play();
                Sandbox.Pause();
            }
        }
Exemple #3
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 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();
        }
 public ViewEntry(LogEntryList parent, LogEntry log)
 {
     this.parent   = parent;
     this.log      = log;
     this.msgLines = log.Message.Split(new string[] { Environment.NewLine }, StringSplitOptions.None).Length;
 }
Exemple #5
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;
			}