Files
Nonemm/src/Nonemm.App/Windows/EntryWindow.axaml
T
erikbrockoandClaude Opus 5 4eb8071d57 Say when the entry has two signals on the air
N1MM blocks the transmitter when a multi-operator entry is about to break
its own class. This program does not touch the transmitter: a logger that
decides for itself when the operator may not send loses a contact every
time it is wrong, and it is wrong whenever it has stale information about
the other stations — which, on a network, is whenever a laptop has just
been unplugged.

So the entry window says so instead. While this station is transmitting
and the entry is over what it is allowed, a red box goes across the top of
the window naming the station and the band. It is above the frequency and
under the menu, so nothing it covers is anything the operator needs while
he is sending, and it is big enough to read from the other side of the
room.

`TransmitRules` is what it asks:

| Entry | Allowed |
|---|---|
| one transmitter | one signal |
| two transmitters | two signals, on different bands |
| anything else | one signal per band |

Two on one band is wrong in every multi-operator class, so it is checked
whatever the category says. A station that has not said which band it is on
counts as somewhere else: a guess there puts the box in front of an
operator doing nothing wrong.

This is also the first thing that sends `XMIT`. The message was written and
nothing called it, so the transmit column of everybody's network status
window stayed empty and no station knew when another was sending. The entry
window now says when its key goes down and what it is sending.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PdAYHcdRktqKry7nk414TU
2026-09-03 23:23:46 +00:00

218 lines
11 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Nonemm.App.Windows.EntryWindow"
Title="Nonemm"
Width="820" SizeToContent="Height"
CanResize="True"
FontFamily="Inter, sans-serif">
<Window.Styles>
<Style Selector="TextBlock.label">
<Setter Property="FontSize" Value="11" />
<Setter Property="Opacity" Value="0.7" />
<Setter Property="Margin" Value="2,0,0,1" />
</Style>
<Style Selector="TextBox.entry">
<Setter Property="FontFamily" Value="monospace" />
<Setter Property="FontSize" Value="20" />
<Setter Property="Padding" Value="6,2" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<Style Selector="Button.mode">
<Setter Property="FontSize" Value="12" />
<Setter Property="Padding" Value="8,1" />
<Setter Property="MinWidth" Value="44" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
<Style Selector="Button.mode.here">
<Setter Property="Background" Value="#2980B9" />
<Setter Property="Foreground" Value="White" />
</Style>
<!-- the theme paints its own background under the pointer, which would
hide the mark on the button that is on -->
<Style Selector="Button.mode.here:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="#3498DB" />
</Style>
<Style Selector="Button.fkey">
<Setter Property="FontSize" Value="11" />
<Setter Property="Padding" Value="4,3" />
<Setter Property="Margin" Value="0,0,2,2" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
<!-- the key Enter would send next, while ESM is on -->
<Style Selector="Button.fkey.esm">
<Setter Property="Background" Value="#2980B9" />
<Setter Property="Foreground" Value="White" />
</Style>
<Style Selector="Button.fkey.esm:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="#3498DB" />
</Style>
</Window.Styles>
<DockPanel>
<Menu Name="MainMenu" DockPanel.Dock="Top">
<MenuItem Header="_File">
<MenuItem Header="New Log in Database…" Click="OnNewContest" />
<MenuItem Header="Open Log in Database…" Click="OnOpenContest" />
<Separator />
<MenuItem Header="New Database…" Click="OnNewDatabase" />
<MenuItem Header="_Open Database…" Click="OnOpenDatabase" />
<Separator />
<MenuItem Header="Generate Cabrillo File" Click="OnExportCabrillo" />
<MenuItem Header="Import">
<MenuItem Header="Import ADIF from file…" Click="OnImportAdif" />
<MenuItem Header="Import Call History…" Click="OnCallHistoryFile" />
</MenuItem>
<MenuItem Header="Export">
<MenuItem Header="Export ADIF to file…" Click="OnExportAdif" />
</MenuItem>
<Separator />
<MenuItem Header="E_xit" Click="OnExit" InputGesture="Alt+F4" />
</MenuItem>
<MenuItem Header="_Edit">
<MenuItem Header="Wipe Out Entry Fields" Click="OnWipe" InputGesture="Ctrl+W" />
<Separator />
<MenuItem Header="Edit Last Contact" Click="OnEditLastContact" InputGesture="Ctrl+Y" />
<MenuItem Header="Add a Note to Last/Current Contact" Click="OnAddNote" InputGesture="Ctrl+N" />
<MenuItem Header="Edit Current Contact" Click="OnEditCurrentContact" />
<MenuItem Header="Quick Edit Previous Contacts (Back)" Click="OnQuickEditBack" InputGesture="Ctrl+Q" />
<MenuItem Header="Quick Edit Previous Contacts (Forward)" Click="OnQuickEditForward" InputGesture="Ctrl+A" />
<MenuItem Header="Increase Received NR by 1" Click="OnBumpNumber" InputGesture="Ctrl+U" />
<Separator />
<MenuItem Header="Find/Find Again" Click="OnFind" InputGesture="Ctrl+F" />
</MenuItem>
<MenuItem Header="_View">
<MenuItem Header="Show QRZ" Click="OnLookUpCall" />
</MenuItem>
<MenuItem Header="Tools">
<MenuItem Header="Download and Install Latest Check Partial file (master.scp) (Internet)"
Click="OnDownloadCallDatabase" />
<MenuItem Header="Download and install latest country file (wl_cty.dat) (Internet)"
Click="OnDownloadCountryFile" />
<Separator />
<MenuItem Header="Reload Support Files" Click="OnReloadSupportFiles" />
</MenuItem>
<MenuItem Header="_Config">
<MenuItem Header="Configure Ports, Mode Control, Winkey, etc…" Click="OnKeyerSettings" />
<MenuItem Header="Configure Radios…" Click="OnRadioSettings" />
<MenuItem Header="Configure Cluster…" Click="OnClusterSettings" />
<MenuItem Header="Change Your Station Data…" Click="OnStationSettings" />
<MenuItem Header="Change Operator…" Click="OnChangeOperator" InputGesture="Ctrl+O" />
<Separator />
<MenuItem Name="EsmItem" Header="Enter Sends Message (current mode)" ToggleType="CheckBox"
Click="OnToggleEsm" InputGesture="Ctrl+M" />
<Separator />
<MenuItem Header="Change CW/SSB/Digital Function Key Definitions">
<MenuItem Header="Change _CW Function Key Definitions" Click="OnEditCwMessages" />
<MenuItem Header="Change _SSB Function Key Definitions" Click="OnEditPhoneMessages" />
</MenuItem>
<MenuItem Header="Change Band Plan…" Click="OnSubBandSettings" />
<MenuItem Header="Manage Skins, Colors and Fonts…" Click="OnThemeSettings" />
<MenuItem Header="Edit Networked-Computer Names…" Click="OnNetworkSettings" />
<MenuItem Header="WAE">
<MenuItem Header="Open QTC Window setup area" Click="OnQtcSetup" />
</MenuItem>
</MenuItem>
<MenuItem Header="Wi_ndow">
<MenuItem Header="Available Mult's and Q's" Click="OnShowAvailable" />
<MenuItem Header="_Bandmap" Click="OnShowBandmap" />
<MenuItem Header="Call Stack" Click="OnShowCallStack" />
<MenuItem Header="Check" Click="OnShowCheck" />
<MenuItem Header="Log" Click="OnShowLog" InputGesture="Ctrl+L" />
<MenuItem Header="Network Status" Click="OnShowNetworkStatus" />
<MenuItem Header="Grey Line" Click="OnShowGrayline" />
<MenuItem Header="Score Summary" Click="OnShowScore" />
<MenuItem Header="Telnet" Click="OnShowTelnet" />
<MenuItem Header="Digital Interface" Click="OnShowDigital" />
</MenuItem>
</Menu>
<!-- Two signals where the entry may have one. N1MM blocks the
transmitter; this says so instead, loudly enough to be read from
across the room, and leaves the operator to stop -->
<Border DockPanel.Dock="Top" Name="TransmitWarning" IsVisible="False"
Background="#C0392B" Padding="10,8">
<TextBlock Name="TransmitWarningText" FontSize="22" FontWeight="Bold"
Foreground="White" TextWrapping="Wrap" Text="" />
</Border>
<!-- N1MM's status strip: what just happened on the left, then the band
change timer, the contacts and multipliers, and the score -->
<Border DockPanel.Dock="Bottom" Padding="6,3" BorderThickness="0,1,0,0"
BorderBrush="#33808080">
<Grid ColumnDefinitions="*,Auto,Auto,Auto">
<TextBlock Name="StatusText" FontSize="11" Opacity="0.8" Text=""
TextTrimming="CharacterEllipsis" VerticalAlignment="Center" />
<TextBlock Grid.Column="1" Name="BandTimerText" FontSize="11" Text=""
Margin="12,0,0,0" VerticalAlignment="Center" />
<TextBlock Grid.Column="2" Name="BreakdownText" FontSize="11" Opacity="0.8" Text=""
Margin="12,0" VerticalAlignment="Center" />
<TextBlock Grid.Column="3" Name="ScoreText" FontSize="11" FontWeight="Bold" Text=""
VerticalAlignment="Center" />
</Grid>
</Border>
<Border DockPanel.Dock="Left" Padding="6,6,4,6" BorderThickness="0,0,1,0"
BorderBrush="#33808080">
<Grid Name="BandButtons" ColumnDefinitions="Auto,Auto" />
</Border>
<StackPanel Margin="6">
<Grid ColumnDefinitions="Auto,Auto,Auto,*,Auto" Margin="0,0,0,6">
<TextBlock Name="FrequencyText" FontFamily="monospace" FontSize="20" Text="14025.00" />
<TextBlock Grid.Column="1" Name="ModeText" FontFamily="monospace" FontSize="20"
Margin="10,0,0,0" Text="CW" />
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="4" Margin="10,2,0,2"
VerticalAlignment="Center">
<Ellipse Name="RadioLight" Width="9" Height="9" Fill="#33808080"
VerticalAlignment="Center" />
<Ellipse Name="TransmitLight" Width="9" Height="9" Fill="#33808080"
VerticalAlignment="Center" />
<Button Name="RunButton" Classes="mode" Content="Run" Click="OnRun" Margin="4,0,0,0" />
<Button Name="SearchButton" Classes="mode" Content="S&amp;P" Click="OnSearch" />
</StackPanel>
<TextBlock Grid.Column="3" Name="ContestText" FontSize="12" Opacity="0.75"
VerticalAlignment="Center" Margin="12,0,12,0" Text="no contest"
TextTrimming="CharacterEllipsis" ClipToBounds="True" />
<TextBlock Grid.Column="4" Name="ClockText" FontFamily="monospace" FontSize="20"
Text="00:00:00Z" />
</Grid>
<TextBlock Name="CallFrameText" FontFamily="monospace" FontSize="13" Height="18"
Margin="2,0,0,1" Text="" />
<Grid Name="EntryGrid" ColumnDefinitions="Auto" RowDefinitions="Auto,Auto" />
<Border Name="VerdictBorder" Margin="0,6,0,0" Padding="6,3" CornerRadius="3"
Background="#22808080">
<TextBlock Name="VerdictText" FontSize="12" Text="" />
</Border>
<!-- N1MM's two rows of six function keys, then the row of actions, both
between the entry boxes and the bearing line -->
<Grid Name="FunctionKeys" Margin="0,6,0,0"
ColumnDefinitions="*,*,*,*,*,*" RowDefinitions="Auto,Auto" />
<!-- the widths N1MM gives the row: 23 per cent to the first button and
11 to each of the other seven -->
<Grid ColumnDefinitions="23*,11*,11*,11*,11*,11*,11*,11*">
<Button Classes="fkey" Content="Esc: Stop" Click="OnStopSending" />
<Button Grid.Column="1" Classes="fkey" Content="Wipe" Click="OnWipe" />
<Button Grid.Column="2" Classes="fkey" Content="Log It" Click="OnLogIt" />
<Button Grid.Column="3" Classes="fkey" Content="Edit" Click="OnEditLastContact" />
<Button Grid.Column="4" Classes="fkey" Content="Mark" Click="OnMark" />
<Button Grid.Column="5" Classes="fkey" Content="Store" Click="OnStore" />
<Button Grid.Column="6" Classes="fkey" Content="Spot It" Click="OnSpotIt" />
<Button Grid.Column="7" Classes="fkey" Content="QRZ" Click="OnLookUpCall" />
</Grid>
<TextBlock Name="PathText" FontSize="11" Opacity="0.75" Margin="2,8,0,0" Text=""
TextTrimming="CharacterEllipsis" />
<TextBlock Name="UserTextText" FontSize="11" Margin="2,2,0,0" Text=""
Foreground="#2980B9" TextTrimming="CharacterEllipsis" />
</StackPanel>
</DockPanel>
</Window>