Say how many QTCs are left with the station being worked
WAE gives a point for every QTC line, so an operator needs to know what is still there to exchange. The entry window now carries N1MM's QTCinfo line in WAE: how many QTC lines have already gone with the station in the callsign box, how many more may go, and how many contacts are left to report to anybody. The QTC window shows the same line. The numbers come from the log rows, the way N1MM works them out: - exchanged is every QTC row with that call, both directions and all bands, and ten is the lot - available is every contact not reported to anybody yet, without the dupes and without the station itself, which is N1MM's QTCRecordsetCount - what is left with the station is what is free of its ten, and no more than the contacts there are to report when we are the one reporting Europe on CW and SSB only takes traffic down, so its line leaves the last number out, as N1MM's does. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0157i7PiZyqBkquxS9A6FTdQ
This commit is contained in:
@@ -211,6 +211,11 @@
|
||||
<TextBlock Name="PathText" FontSize="11" Opacity="0.75" Margin="2,8,0,0" Text=""
|
||||
TextTrimming="CharacterEllipsis" />
|
||||
|
||||
<!-- WAE only: N1MM's QTCinfo label, which says how much traffic may
|
||||
still be exchanged with the station being worked -->
|
||||
<TextBlock Name="QtcInfoText" FontSize="11" Margin="2,2,0,0" Text="" IsVisible="False"
|
||||
Foreground="#2980B9" TextTrimming="CharacterEllipsis" />
|
||||
|
||||
<TextBlock Name="UserTextText" FontSize="11" Margin="2,2,0,0" Text=""
|
||||
Foreground="#2980B9" TextTrimming="CharacterEllipsis" />
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using Avalonia.Layout;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Threading;
|
||||
using Nonemm.Contests;
|
||||
using Nonemm.Contests.Rules;
|
||||
using Nonemm.Core;
|
||||
using Nonemm.App.Theming;
|
||||
using Nonemm.Session;
|
||||
@@ -799,6 +800,7 @@ public sealed partial class EntryWindow : Window
|
||||
Title = TitleLine();
|
||||
ShowCallFrame();
|
||||
PathText.Text = PathLine();
|
||||
ShowQtcInfo();
|
||||
UserTextText.Text = Logging.Session.History.Find(Logging.Entry.Call)?.UserText ?? "";
|
||||
ShowLights();
|
||||
|
||||
@@ -950,6 +952,24 @@ public sealed partial class EntryWindow : Window
|
||||
+ $"{path.DistanceKm:N0} km · {path.DistanceKm * MilesPerKilometre:N0} mi{sun}";
|
||||
}
|
||||
|
||||
/// WAE's QTC tally for the station being worked, which N1MM keeps in a
|
||||
/// blue label under the entry boxes: how many lines have gone with it, how
|
||||
/// many more may go, and how many contacts are left to report to anybody.
|
||||
/// The line is only there in WAE, because no other contest has traffic.
|
||||
private void ShowQtcInfo()
|
||||
{
|
||||
if (Logging is null || Logging.Contest is not Wae)
|
||||
{
|
||||
QtcInfoText.IsVisible = false;
|
||||
return;
|
||||
}
|
||||
string call = Logging.Entry.Call.Trim();
|
||||
QtcCounts counts = new QtcTraffic(Logging)
|
||||
.CountsFor(Callsign.Parse(call.Length >= 3 ? call : ""));
|
||||
QtcInfoText.Text = counts.IsFull ? $"{counts.Text} — at the limit" : counts.Text;
|
||||
QtcInfoText.IsVisible = true;
|
||||
}
|
||||
|
||||
/// A blank line where a bearing should be is a puzzle. This says which of
|
||||
/// the two ends could not be placed and what to do about it.
|
||||
private string WhyNoPath()
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
<MenuItem Header="Setup…" Click="OnSetup" />
|
||||
</ContextMenu>
|
||||
</StackPanel.ContextMenu>
|
||||
<!-- the same tally the entry window keeps, so the operator can see how
|
||||
much traffic is left with this station without leaving the window -->
|
||||
<TextBlock Name="CountsText" FontSize="11" Foreground="#2980B9" Text="" />
|
||||
<StackPanel Name="DirectionPanel" Orientation="Horizontal" Spacing="8" Margin="0,0,0,4">
|
||||
<RadioButton Name="ReceiveButton" Content="Receive" GroupName="direction" IsChecked="True" />
|
||||
<RadioButton Name="SendButton" Content="Send" GroupName="direction" />
|
||||
|
||||
@@ -98,7 +98,7 @@ public sealed partial class QtcWindow : Window
|
||||
return isSending
|
||||
? IsRtty
|
||||
? "Send All reads the whole series out — Snd n sends one QTC again"
|
||||
: $"{traffic.Remaining(station)} of the ten QTCs for {station.Text} are still free"
|
||||
: "Nothing goes out on SSB: read the lines out yourself, then Close to log them."
|
||||
: "Type the header, then a line per QTC: time, callsign, serial number.";
|
||||
}
|
||||
return isSending
|
||||
@@ -132,6 +132,7 @@ public sealed partial class QtcWindow : Window
|
||||
private void Reset()
|
||||
{
|
||||
Title = isSending ? $"Send QTC · {station.Text}" : $"Receive QTC · {station.Text}";
|
||||
CountsText.Text = traffic.CountsFor(station).Text;
|
||||
KeysText.Text = KeysLine();
|
||||
// N1MM's labels: the buttons say what they do in the direction the
|
||||
// traffic is going, and the ones with nothing to do are hidden
|
||||
|
||||
Reference in New Issue
Block a user