From 7c2a2ed768daa1d2122f9dd7b7e087df44ae73ca Mon Sep 17 00:00:00 2001 From: ericek111 Date: Fri, 28 Aug 2026 09:13:58 +0000 Subject: [PATCH] Add the name, comment and lights from N1MM's entry window Three more things off the screenshot of N1MM's entry window. A Name box and a Comment box beside the exchange. Neither is part of the exchange, so an empty one does not hold up a contact and ESM does not wait for it; both fill the log columns of those names, and a contest that exchanges a name keeps what was exchanged. Tab now walks the callsign, the exchange, the name and the comment before coming round again, which is what the boxes being there implies. The name is filled from the call history file, and what that file says in its UserText column is written under the entry boxes, where N1MM writes it. Two lights beside the run switch: green while a radio is answering, red while something is going out on the air. The transmit light follows the keyer, so with cwdaemon it goes out when the message has actually finished rather than when the text was handed over. The window is wider to fit the two new boxes. Co-Authored-By: Claude Opus 5 --- README.md | 12 ++ src/Nonemm.App/Windows/EntryWindow.Macros.cs | 12 +- src/Nonemm.App/Windows/EntryWindow.axaml | 20 ++- src/Nonemm.App/Windows/EntryWindow.axaml.cs | 131 +++++++++++++++++- src/Nonemm.Session/RadioPosition.cs | 22 ++- .../RadioPositionTests.cs | 31 +++++ 6 files changed, 215 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4107ef6..f748a35 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,18 @@ in again while you are running, and `EsmSendsCorrectedCall` sends the call again in front of the last message when you have corrected it — copy `SM3AB`, fix it to `SM3ABC`, and the key sends `SM3ABC TU DL1ABC`. +### Name, comment, and the two lights + +Beside the exchange are a Name box and a Comment box, as N1MM has them. Neither +is part of the exchange, so neither holds up a contact: they fill the log's Name +and Comment columns, and a contest that exchanges a name uses that instead. Tab +walks the callsign, the exchange, the name and the comment, and round again. The +name is filled from the call history file when there is one, and what the call +history says in its UserText column appears under the entry boxes. + +Two lights sit beside the run switch: the left one is green while a radio is +answering, the right one red while something is going out on the air. + ### The buttons and the title bar Under the function keys is the row N1MM has: Esc: Stop, Wipe, Log It, Edit, diff --git a/src/Nonemm.App/Windows/EntryWindow.Macros.cs b/src/Nonemm.App/Windows/EntryWindow.Macros.cs index a43dbb0..49cbc5e 100644 --- a/src/Nonemm.App/Windows/EntryWindow.Macros.cs +++ b/src/Nonemm.App/Windows/EntryWindow.Macros.cs @@ -91,24 +91,27 @@ public sealed partial class EntryWindow { try { + sending = true; + Refresh(); await keyer.SendAsync(text); } catch (InvalidOperationException e) { + sending = false; Status(e.Message); return; } - if (after.Count > 0) - { - _ = RunWhenSentAsync(keyer, after); - } + _ = RunWhenSentAsync(keyer, after); } + /// Waits for the keyer, turns the transmit light off, and runs whatever + /// stood after `{END}`. private async Task RunWhenSentAsync(MessageSender keyer, IReadOnlyList after) { await WhenSentAsync(keyer); Dispatcher.UIThread.Post(() => { + sending = false; foreach (MessageAction action in after) { Run(action); @@ -188,6 +191,7 @@ public sealed partial class EntryWindow Step(-session.Settings.PageStepHertz); break; case MessageCommand.StopSending: + sending = false; _ = session.Keyer?.AbortAsync(); break; case MessageCommand.Telnet: diff --git a/src/Nonemm.App/Windows/EntryWindow.axaml b/src/Nonemm.App/Windows/EntryWindow.axaml index 81ff6df..98ebf2a 100644 --- a/src/Nonemm.App/Windows/EntryWindow.axaml +++ b/src/Nonemm.App/Windows/EntryWindow.axaml @@ -2,7 +2,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Nonemm.App.Windows.EntryWindow" Title="Nonemm" - Width="620" SizeToContent="Height" + Width="820" SizeToContent="Height" CanResize="True" FontFamily="Inter, sans-serif"> @@ -113,10 +113,17 @@ - - - + + + + + + + @@ -134,6 +141,9 @@ + + diff --git a/src/Nonemm.App/Windows/EntryWindow.axaml.cs b/src/Nonemm.App/Windows/EntryWindow.axaml.cs index 19156fb..351f1a6 100644 --- a/src/Nonemm.App/Windows/EntryWindow.axaml.cs +++ b/src/Nonemm.App/Windows/EntryWindow.axaml.cs @@ -20,6 +20,11 @@ public sealed partial class EntryWindow : Window private EntryWindow? secondRadio; private readonly List boxes = []; private readonly List