Edit and delete contacts in the log
Double-click a cell in the log window to change it. The columns follow the contest exchange instead of being fixed in the XAML, so CQ WW gets a Zone column and Sweepstakes gets Nr, Prec, Ck and Sec. QsoEditor holds the column list and applies one field edit. Validation comes from the ExchangeFieldKind the contest declared: a CQ zone is 1 to 40, an ITU zone 1 to 90, a section is looked up in the ARRL list, a grid must parse. A refused edit returns the reason and leaves the log alone, so the cell reverts. Changing the callsign runs the country lookup again. Delete, or the right-click menu, removes the selected contact after a confirmation. Either way the log is rescored, so a multiplier the removed contact held passes to the next contact that claims it. Both go out to the other stations in N1MM's own messages: contactreplace carries oldcall and oldtimestamp, contactdelete names the contact. An incoming edit or delete is matched by contact id first, falling back to call plus timestamp because N1MM does not know our ids. Country, continent and the two prefixes were filled in twice, once when logging and once when editing. They now come from CountryFields. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
13
src/Nonemm.Session/QsoEdit.cs
Normal file
13
src/Nonemm.Session/QsoEdit.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Nonemm.Core;
|
||||
|
||||
namespace Nonemm.Session;
|
||||
|
||||
/// The result of an edit: either the changed contact or an error message.
|
||||
public sealed record QsoEdit(Qso? Result, string Error)
|
||||
{
|
||||
public static QsoEdit Accept(Qso qso) => new(qso, "");
|
||||
|
||||
public static QsoEdit Refuse(string error) => new(null, error);
|
||||
|
||||
public bool IsAccepted => Result is not null;
|
||||
}
|
||||
Reference in New Issue
Block a user