Ctrl+Y from the entry window, or Enter on a row in the log, opens the whole contact in one dialog. It reaches the fields the log has no column for: QSX frequency, name, QTH, comment, grid, power, radio number, run position, and the country and WPX prefixes. Previous and Next walk the log without closing and offer to save first. The dialog checks values through the same QsoEditor the log columns use, so a zone the contest will not take is refused the same way in both places. QsoEdit now names the field that was refused, so the dialog can put the cursor back in the right box, and QsoEditor.ApplyAll changes several fields at once. Points and the multiplier flags are shown but not editable. They are worked out from the rules every time the log changes, so a typed value would be lost on the next edit. N1MM lets you type them; we do not, rather than offering a box that does nothing. A contact's own country prefix now wins over the country file when scoring. Without this, correcting the country in the dialog would change what the log shows and what Cabrillo says, but not the score. LoggingSession.Update now broadcasts the change like Edit does, so a contact saved from the dialog reaches the other stations. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
31 lines
1.1 KiB
C#
31 lines
1.1 KiB
C#
using Nonemm.Core;
|
|
using Nonemm.Core.Country;
|
|
|
|
namespace Nonemm.Contests;
|
|
|
|
/// A QSO together with what the country file says about it, so a contest can
|
|
/// score by country, zone or continent without looking anything up itself.
|
|
public sealed record QsoContext(Qso Qso, CountryLookup? Country, StationInfo Me)
|
|
{
|
|
public Band? Band => Qso.Band;
|
|
|
|
public ModeCategory ModeCategory => Qso.Mode.Category;
|
|
|
|
/// What the contact says wins over the country file. The two agree unless
|
|
/// the operator corrected the country by hand, and then the correction is
|
|
/// the point.
|
|
public string Continent =>
|
|
Qso.Continent.Length > 0 ? Qso.Continent : Country?.Continent ?? "";
|
|
|
|
public string CountryPrefix =>
|
|
Qso.CountryPrefix.Length > 0 ? Qso.CountryPrefix : Country?.Entity.PrimaryPrefix ?? "";
|
|
|
|
public int CqZone => Country?.CqZone ?? Qso.Zone;
|
|
|
|
public int ItuZone => Country?.ItuZone ?? 0;
|
|
|
|
public bool IsSameCountry => CountryPrefix.Length > 0 && CountryPrefix == Me.CountryPrefix;
|
|
|
|
public bool IsSameContinent => Continent.Length > 0 && Continent == Me.Continent;
|
|
}
|