private void FillRowMark(ZForge.Controls.Logs.LogLevel level, int pos) { switch (level) { case ZForge.Controls.Logs.LogLevel.LOG_ERROR: this.logGrid[pos, 1] = new SourceGrid.Cells.Cell(Translator.Instance.T("错误")); this.logGrid[pos, 1].Image = this.imageListLog.Images[0]; this.logGrid.Rows[pos].Visible = this.ShowError; this.CountError++; break; case ZForge.Controls.Logs.LogLevel.LOG_WARNING: this.logGrid[pos, 1] = new SourceGrid.Cells.Cell(Translator.Instance.T("警告")); this.logGrid[pos, 1].Image = this.imageListLog.Images[1]; this.logGrid.Rows[pos].Visible = this.ShowWarning; this.CountWarn++; break; default: this.logGrid[pos, 1] = new SourceGrid.Cells.Cell(Translator.Instance.T("普通")); this.logGrid[pos, 1].Image = this.imageListLog.Images[2]; this.CountInfo++; this.logGrid.Rows[pos].Visible = this.ShowInfo; break; } }
public void Add(ZForge.Controls.Logs.LogLevel level, CameraView view, string msg) { ExtendedLogViewerItem i = new ExtendedLogViewerItem(level, view, msg); this.mMutex.WaitOne(); this.mLogs.Add(i); this.mMutex.ReleaseMutex(); }
private void SetShowFlags(ZForge.Controls.Logs.LogLevel f, bool set) { lock (this) { if (set == true) { this.mShowLogs = this.mShowLogs | (int)f; } else { this.mShowLogs = this.mShowLogs & (~(int)f); } foreach (SourceGrid.Grid.GridRow row in this.logGrid.Rows) { if (row.Tag != null) { ExtendedLogViewerTag t = (ExtendedLogViewerTag)row.Tag; row.Visible = (((int)t.LogLevel & this.mShowLogs) != 0); } } } }
public ExtendedLogViewerTag(ZForge.Controls.Logs.LogLevel l, string id, string n) { this.mID = id; this.mLevel = l; this.mViewName = n; }