Files
Nonemm/src/Nonemm.App/Windows/EntryWindow.axaml
T
erikbrockoandClaude Opus 5 082fa75a40 Play a recording on phone, and record it in a window
A phone function key names a wav file instead of words, which is what N1MM's
own SSB file holds: `F1 CQ,{WAVDIR}\Cq.wav`. `{WAVDIR}` is the folder named
after whoever is at the microphone, a name is taken relative to `Wav`, and
commas play several files in a row. An SSB `.mc` file written for N1MM plays
here.

Window ▸ Voice Keyer lists every recording the messages name, says which of
them are there for the operator picked at the top, plays one, and records over
one. The recording is written beside the wanted file and moved over it at the
end, so a recorder that will not start takes nothing away.

`CommandSoundCard` runs `aplay` and `arecord`, and both commands are settings:
the audio path belongs to whatever the station runs, and a library would pick
one of them for the operator. A recorder is stopped with an interrupt so it
closes its wav file, and killed only if it ignores that. PTT is cwdaemon's
`<ESC>a` for as long as the recording plays, off for a station on VOX.

Two things follow. The QTC window sends on SSB: N1MM's four recordings on the
Ready, Agn, Cfm and Close buttons, with the lines still read out by the
operator. And alternating CQ duels on phone, because the voice keyer says when
a recording has finished — which it had to, since the CQ message is picked by
the radio's mode and would otherwise have been keyed as Morse.

Nothing here has been played on a radio: this machine has no sound card, so
what is tested is the program being run, the file filled in, the exit code and
the interrupt, with shell commands standing in for the two.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0157i7PiZyqBkquxS9A6FTdQ
2026-09-11 07:51:58 +00:00

229 lines
12 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" />
<!-- only WAE has traffic to export, so the item is hidden elsewhere -->
<MenuItem Name="QtcExportItem" IsVisible="False"
Header="Export ADIF with QTC traffic…" Click="OnExportAdifWithQtcs" />
</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" />
<MenuItem Header="Wipe Out or Restore Entry Fields" Click="OnWipeOrRestore" InputGesture="Alt+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="Statistics" Click="OnShowStatistics" />
<MenuItem Header="Telnet" Click="OnShowTelnet" />
<MenuItem Header="Digital Interface" Click="OnShowDigital" />
<MenuItem Header="Voice Keyer" Click="OnShowVoiceKeyer" />
</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" />
<!-- WAE only: N1MM's QTCinfo label, which says how much traffic may
still be exchanged with the station being worked -->
<TextBlock Name="QtcInfoText" FontSize="11" Margin="2,2,0,0" Text="" IsVisible="False"
Foreground="#2980B9" TextTrimming="CharacterEllipsis" />
<TextBlock Name="UserTextText" FontSize="11" Margin="2,2,0,0" Text=""
Foreground="#2980B9" TextTrimming="CharacterEllipsis" />
</StackPanel>
</DockPanel>
</Window>