Let the operator pick, order and sort the log columns
The log showed the contest's columns and nothing else, with the country, points and multiplier columns fixed in the XAML. LogColumns now holds every field the log can show and the settings file keeps the names, left to right. A right click on a header adds or removes a column and offers the contest's own set back, a header can be dragged to move its column, and a click sorts on it. Sorting uses the field, not the text of the cell, so 9,000 kHz comes before 14,000 and the serial numbers do not run 1, 10, 2. Both grids get the same columns, so a value in the pane below sits under the column it belongs to. Removing the last column is refused, otherwise nothing could be selected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015NZkFxHde1iifAQemFTHxf
This commit is contained in:
@@ -5,10 +5,10 @@ using Nonemm.Session;
|
||||
|
||||
namespace Nonemm.App.Windows;
|
||||
|
||||
/// One line of the log window. The grid reaches the editable fields through the
|
||||
/// indexer, so the columns can follow the contest exchange instead of being
|
||||
/// fixed in the XAML. The colour comes from the same scorer as the entry window
|
||||
/// and the bandmap.
|
||||
/// One line of the log window. The grid reaches the fields through the indexer,
|
||||
/// so the columns can follow the contest exchange and the operator's choice
|
||||
/// instead of being fixed in the XAML. The colour comes from the same scorer as
|
||||
/// the entry window and the bandmap.
|
||||
public sealed class LogRow
|
||||
{
|
||||
private readonly Func<Qso, QsoField, string, bool> edit;
|
||||
@@ -32,14 +32,5 @@ public sealed class LogRow
|
||||
set => edit(Qso, Enum.Parse<QsoField>(name), value);
|
||||
}
|
||||
|
||||
public string Country => Qso.CountryPrefix;
|
||||
|
||||
public int Points => Qso.Points;
|
||||
|
||||
public string Multipliers => string.Concat(
|
||||
Qso.IsMultiplier1 ? "1" : "",
|
||||
Qso.IsMultiplier2 ? "2" : "",
|
||||
Qso.IsMultiplier3 ? "3" : "");
|
||||
|
||||
public IBrush Colour => Verdicts.Colour(Verdict);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user