Walk the entry boxes the way N1MM walks them
Space and tab were moving through every box in turn, and since the name and comment boxes arrived, into those as well. N1MM does neither. Its EntryWindow.NextTab walks the boxes the contest declares plus the callsign, skips SNTText and RCVText, and comes round to the callsign from the last one. For CQ WW that means the callsign and the zone, and nothing else: the entry items are SNTText, RCVText and CQZoneText, and the first two are stepped over. So this steps over report boxes as well, and the name and comment boxes are out of the walk, as they are out of N1MM's. Skipping the reports only works because they are filled in. N1MM's TabPressed puts the report for the mode into an empty Snt or Rcv box when the callsign box is left, and FillReports does the same here: 599 on CW and digital, 59 on phone. A report the operator typed is left alone, and a report box is still there to click when a contact is not 599. The test that said space walks every box in turn now says it steps over the report, which is the behaviour that was asked for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -118,15 +118,48 @@ public class RadioPositionTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SpaceMovesThroughTheBoxesAndBackToTheCall()
|
||||
public void SpaceStepsOverTheReportAndComesBackToTheCall()
|
||||
{
|
||||
// CQ WW's boxes are the call, the report and the zone
|
||||
RadioPosition session = Session();
|
||||
|
||||
Assert.Equal(0, session.Entry.Focus);
|
||||
session.Entry.Advance();
|
||||
Assert.Equal(2, session.Entry.Focus);
|
||||
session.Entry.Advance();
|
||||
Assert.Equal(0, session.Entry.Focus);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GoingBackStepsOverTheReportToo()
|
||||
{
|
||||
RadioPosition session = Session();
|
||||
session.Entry.FocusOn(2);
|
||||
|
||||
session.Entry.Retreat();
|
||||
|
||||
Assert.Equal(0, session.Entry.Focus);
|
||||
session.Entry.Advance();
|
||||
Assert.Equal(1, session.Entry.Focus);
|
||||
session.Entry.Advance();
|
||||
session.Entry.Advance();
|
||||
Assert.Equal(0, session.Entry.Focus);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheReportBoxesAreFilledInWithWhatWouldBeSentAnyway()
|
||||
{
|
||||
RadioPosition session = Session();
|
||||
|
||||
Assert.True(session.FillReports());
|
||||
|
||||
Assert.Equal("599", session.Entry.ValueOf(ExchangeSlot.ReceivedReport));
|
||||
Assert.False(session.FillReports());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AReportTheOperatorTypedIsLeftAlone()
|
||||
{
|
||||
RadioPosition session = Session();
|
||||
session.Entry.Set(ExchangeSlot.ReceivedReport, "559");
|
||||
|
||||
Assert.False(session.FillReports());
|
||||
Assert.Equal("559", session.Entry.ValueOf(ExchangeSlot.ReceivedReport));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
||||
Reference in New Issue
Block a user