Write what N1MM needs before it will open a log
Checked by opening a log this program wrote in N1MM 1.0.11031. Three things it rejected: - a log naming a contest with no row in the Contest table throws "No current row" in Contest.FromRow, so the definition row is written whenever a contest is opened; - an empty overlay category is answered with "Invalid Overlay Category:", so an entry with no overlay now says "N/A", and the dialog offers N1MM's list; - the sent exchange omits the report, which is what N1MM's own contest dialog asks for. With those three fixed N1MM opens the log and shows the contacts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,9 +35,7 @@ public sealed class ArrlDx : Contest
|
||||
public IReadOnlyList<ModeCategory> Modes => [mode];
|
||||
|
||||
public string SentExchangeFor(StationInfo me) =>
|
||||
IsNorthAmericanHome(me)
|
||||
? $"{DefaultReport()} {StateOrProvince(me)}"
|
||||
: $"{DefaultReport()} {me.Power}";
|
||||
IsNorthAmericanHome(me) ? StateOrProvince(me) : me.Power;
|
||||
|
||||
/// Only contacts across the W/VE line count, so a DX station working DX or
|
||||
/// a W station working W scores nothing.
|
||||
@@ -88,5 +86,4 @@ public sealed class ArrlDx : Contest
|
||||
|
||||
private string ModeLabel() => mode == ModeCategory.Cw ? "CW" : "SSB";
|
||||
|
||||
private string DefaultReport() => mode == ModeCategory.Cw ? "599" : "59";
|
||||
}
|
||||
|
||||
@@ -31,8 +31,9 @@ public sealed class CqWorldWide : Contest
|
||||
|
||||
public IReadOnlyList<ModeCategory> Modes => [mode];
|
||||
|
||||
public string SentExchangeFor(StationInfo me) =>
|
||||
$"{DefaultReport()} {me.CqZone}";
|
||||
/// The report is fixed for the whole contest, so the sent exchange is the
|
||||
/// zone alone, which is also what N1MM stores.
|
||||
public string SentExchangeFor(StationInfo me) => me.CqZone.ToString();
|
||||
|
||||
public int PointsFor(QsoContext qso)
|
||||
{
|
||||
@@ -83,5 +84,4 @@ public sealed class CqWorldWide : Contest
|
||||
|
||||
private string ModeLabel() => mode == ModeCategory.Cw ? "CW" : "SSB";
|
||||
|
||||
private string DefaultReport() => mode == ModeCategory.Cw ? "599" : "59";
|
||||
}
|
||||
|
||||
@@ -40,7 +40,9 @@ public sealed class CqWpx : Contest
|
||||
|
||||
public IReadOnlyList<ModeCategory> Modes => [mode];
|
||||
|
||||
public string SentExchangeFor(StationInfo me) => DefaultReport();
|
||||
/// The serial number is generated per contact, so the stored exchange is
|
||||
/// the number the contest starts at.
|
||||
public string SentExchangeFor(StationInfo me) => "001";
|
||||
|
||||
public int PointsFor(QsoContext qso)
|
||||
{
|
||||
@@ -89,5 +91,4 @@ public sealed class CqWpx : Contest
|
||||
_ => "RTTY",
|
||||
};
|
||||
|
||||
private string DefaultReport() => mode == ModeCategory.Phone ? "59" : "599";
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public sealed class GeneralLogging : Contest
|
||||
|
||||
public IReadOnlyList<ModeCategory> Modes => [];
|
||||
|
||||
public string SentExchangeFor(StationInfo me) => "599";
|
||||
public string SentExchangeFor(StationInfo me) => "";
|
||||
|
||||
public int PointsFor(QsoContext qso) => 0;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public sealed class IaruHf : Contest
|
||||
|
||||
public IReadOnlyList<ModeCategory> Modes => [ModeCategory.Cw, ModeCategory.Phone];
|
||||
|
||||
public string SentExchangeFor(StationInfo me) => $"599 {me.ItuZone}";
|
||||
public string SentExchangeFor(StationInfo me) => me.ItuZone.ToString();
|
||||
|
||||
public int PointsFor(QsoContext qso)
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ public sealed class RttyRoundup : Contest
|
||||
public IReadOnlyList<ModeCategory> Modes => [ModeCategory.Digital];
|
||||
|
||||
public string SentExchangeFor(StationInfo me) =>
|
||||
me.State.Length > 0 ? $"599 {me.State}" : "599";
|
||||
me.State.Length > 0 ? me.State : "001";
|
||||
|
||||
public int PointsFor(QsoContext qso) => 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user