Put the contacts of the last 20 minutes on the bandmap as local spots
A contest opening and contacts arriving from the other stations, a resync included, spot the contacts logged in the last few minutes (a setting on the telnet Filters tab, 0 for none). A station the bandmap already holds on that band keeps its spot. Nothing is sent out. Spots that come from the log are drawn in italics. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,7 @@ public sealed class BandmapView : Control
|
||||
|
||||
private readonly Typeface typeface = new(Fonts.Mono);
|
||||
private readonly Typeface boldTypeface = new(Fonts.Mono, FontStyle.Normal, FontWeight.Bold);
|
||||
private readonly Typeface italicTypeface = new(Fonts.Mono, FontStyle.Italic);
|
||||
private IReadOnlyList<BandmapLabel> placed = [];
|
||||
private BandmapScale scale = new(Bands.Band20M.Low, Bands.Band20M.High, 1);
|
||||
|
||||
@@ -181,7 +182,12 @@ public sealed class BandmapView : Control
|
||||
new Point(ScaleX + 2, label.MarkY),
|
||||
new Point(LabelX - 2, label.LabelY + (LabelHeight / 2)));
|
||||
context.DrawText(
|
||||
Text(label.Spot.Call.Text, colour, TextSize, label.Spot.IsLocal || label.Spot.IsCqFrequency),
|
||||
Text(
|
||||
label.Spot.Call.Text,
|
||||
colour,
|
||||
TextSize,
|
||||
label.Spot.IsLocal || label.Spot.IsCqFrequency,
|
||||
label.Spot.Source == SpotSource.Log),
|
||||
new Point(LabelX, label.LabelY + (LabelPadding / 2)));
|
||||
}
|
||||
|
||||
@@ -221,8 +227,14 @@ public sealed class BandmapView : Control
|
||||
FrequencyPicked?.Invoke(this, scale.At(at.Y - Inset));
|
||||
}
|
||||
|
||||
private FormattedText Text(string text, IBrush brush, double size, bool bold = false) =>
|
||||
new(text, CultureInfo.InvariantCulture, FlowDirection.LeftToRight, bold ? boldTypeface : typeface, size, brush);
|
||||
private FormattedText Text(string text, IBrush brush, double size, bool bold = false, bool italic = false) =>
|
||||
new(
|
||||
text,
|
||||
CultureInfo.InvariantCulture,
|
||||
FlowDirection.LeftToRight,
|
||||
bold ? boldTypeface : italic ? italicTypeface : typeface,
|
||||
size,
|
||||
brush);
|
||||
|
||||
/// The form's text colour, which the theme sets in both light and dark.
|
||||
private IBrush Foreground() =>
|
||||
|
||||
Reference in New Issue
Block a user