/// <summary> /// Switch to a new screen /// </summary> public void SetCurrentScreen(SawMillScreen screen) { this.currentScreen = screen; LogProfile profile = this.GenerateProfile(); profile.UserData = this.currentScreen; this.logger.SetProfile(profile, this.database); }
public void Read(IList <SawMillScreen> screens) { string screenType; while (this.TryReadScreenHeader(out screenType)) { SawMillScreen screen = GetScreen(screens, screenType); if (screen == null) { continue; } screen.ReadFrom(this.reader); } }
private void AddScreenParameters(LogProfile profile, SawMillScreen screen) { if (this.database == null) { throw new InvalidOperationException("Logger must be connected and database must be initialized before calling AddScreenParameters"); } LogProfile screenProfile = screen.GetProfile(this.database); foreach (LogColumn column in screenProfile.Columns) { Parameter parameter = column.Parameter; IList <Conversion> conversions = screenProfile.GetConversions(parameter); foreach (Conversion conversion in conversions) { profile.Add(parameter, conversion); } } }
public void Update(LogEventArgs args, Graphics graphics, int width, int height) { SawMillScreen updateScreen = args.UserData as SawMillScreen; foreach (SawMillScreen screen in this.screens) { if (screen.ForegroundOnly) { continue; } screen.AddData(args.Row); } if (updateScreen.ForegroundOnly) { updateScreen.AddData(args.Row); } updateScreen.Paint(graphics, width, height); }
private void WriteScreenHeader(SawMillScreen screen) { this.writer.WriteLine(screen.GetType().FullName); }