Favourites show the callsign in bold, the address and the sysop's note, and each keeps its own password, commands, logon call and note. Clicking one fills the boxes for editing. Autoconnect marks the favourite to connect to at start and replaces the old reconnect-to-last-node setting. A new published list refreshes the notes of the favourites in it. The published list now spans the window, and the Spot comment tab becomes Login & Spots with the logon call and keep-alive. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
173 lines
9.0 KiB
XML
173 lines
9.0 KiB
XML
<local:RefreshableWindow xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:Nonemm.App.Windows"
|
|
xmlns:theming="using:Nonemm.App.Theming"
|
|
xmlns:config="using:Nonemm.App.Configuration"
|
|
x:Class="Nonemm.App.Windows.TelnetWindow"
|
|
Title="Telnet" Width="760" Height="520">
|
|
<Window.Styles>
|
|
<Style Selector="TextBlock.label">
|
|
<Setter Property="FontSize" Value="11" />
|
|
<Setter Property="Opacity" Value="0.7" />
|
|
<Setter Property="Margin" Value="0,6,0,1" />
|
|
</Style>
|
|
<!-- the traffic is a terminal: a line is as tall as its text -->
|
|
<Style Selector="ListBox#Traffic > ListBoxItem">
|
|
<Setter Property="Padding" Value="2,0" />
|
|
<Setter Property="MinHeight" Value="0" />
|
|
<Setter Property="Margin" Value="0" />
|
|
</Style>
|
|
</Window.Styles>
|
|
|
|
<TabControl Name="Tabs">
|
|
<TabItem Header="Telnet">
|
|
<DockPanel>
|
|
<Grid DockPanel.Dock="Top" ColumnDefinitions="*,Auto" Margin="8,6,8,4">
|
|
<TextBlock Name="StateText" FontSize="11" Opacity="0.7" VerticalAlignment="Center" />
|
|
<Button Grid.Column="1" Name="ReconnectButton" Content="Reconnect" Click="OnReconnect" />
|
|
</Grid>
|
|
<StackPanel DockPanel.Dock="Bottom" Margin="8,4,8,8" Spacing="4">
|
|
<WrapPanel Name="ButtonRow" />
|
|
<DockPanel>
|
|
<Button DockPanel.Dock="Right" Content="Send" Click="OnSend" IsDefault="True"
|
|
Margin="6,0,0,0" />
|
|
<TextBox Name="CommandBox" PlaceholderText="command to the node" KeyDown="OnCommandKey" />
|
|
</DockPanel>
|
|
</StackPanel>
|
|
<ListBox Name="Traffic" FontFamily="{x:Static theming:Fonts.Mono}" FontSize="12" Margin="8,0"
|
|
DoubleTapped="OnJumpToSpot">
|
|
<ListBox.ContextMenu>
|
|
<ContextMenu>
|
|
<MenuItem Header="Jump to this spot" Click="OnJumpToSpot" />
|
|
<MenuItem Header="Copy line" Click="OnCopyLine" />
|
|
<MenuItem Header="Clear" Click="OnClearTraffic" />
|
|
</ContextMenu>
|
|
</ListBox.ContextMenu>
|
|
</ListBox>
|
|
</DockPanel>
|
|
</TabItem>
|
|
|
|
<TabItem Header="Clusters">
|
|
<Grid RowDefinitions="3*,12,2*" Margin="10">
|
|
<Grid ColumnDefinitions="*,12,300">
|
|
<Grid RowDefinitions="Auto,*,Auto">
|
|
<TextBlock Classes="label" Text="Favourites" Margin="0,0,0,1" />
|
|
<ListBox Grid.Row="1" Name="NodeList" SelectionChanged="OnNodePicked">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate x:DataType="config:StoredClusterNode">
|
|
<StackPanel>
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<TextBlock Text="{Binding Title}" FontWeight="Bold" />
|
|
<TextBlock Text="{Binding Address}" Opacity="0.75" />
|
|
<TextBlock Text="auto-connect" FontSize="11" VerticalAlignment="Center"
|
|
Foreground="{DynamicResource SystemControlHighlightAccentBrush}"
|
|
IsVisible="{Binding AutoConnect}" />
|
|
</StackPanel>
|
|
<TextBlock Text="{Binding Description}" FontSize="11" Opacity="0.7"
|
|
IsVisible="{Binding HasDescription}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal" Spacing="6" Margin="0,6,0,0">
|
|
<Button Content="Connect" Click="OnConnect" />
|
|
<Button Content="Disconnect" Click="OnDisconnect" />
|
|
<Button Name="AutoConnectButton" Content="Autoconnect" Click="OnToggleAutoConnect" />
|
|
<Button Content="Remove" Click="OnRemoveNode" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<ScrollViewer Grid.Column="2">
|
|
<StackPanel>
|
|
<TextBlock Classes="label" Text="Name" Margin="0,0,0,1" />
|
|
<TextBox Name="NameBox" />
|
|
<Grid ColumnDefinitions="*,8,80">
|
|
<StackPanel>
|
|
<TextBlock Classes="label" Text="Node" />
|
|
<TextBox Name="HostBox" PlaceholderText="dxc.example.net" />
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="2">
|
|
<TextBlock Classes="label" Text="Port" />
|
|
<TextBox Name="PortBox" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<TextBlock Classes="label" Text="Password, if the node asks for one" />
|
|
<TextBox Name="PasswordBox" PasswordChar="•" />
|
|
<TextBlock Classes="label" Text="Log on with" />
|
|
<TextBox Name="NodeLogonBox" PlaceholderText="Same as in Login & Spots" />
|
|
<TextBlock Classes="label" Text="Commands sent after login, one per line" />
|
|
<TextBox Name="CommandsBox" AcceptsReturn="True" Height="70" />
|
|
<Button Name="SaveNodeButton" Content="Save to favourites" Click="OnStoreNode" Margin="0,8,0,0" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
<Grid Grid.Row="2" RowDefinitions="Auto,*">
|
|
<Grid ColumnDefinitions="*,Auto" Margin="0,0,0,1">
|
|
<TextBlock Classes="label" Name="PublishedText" Text="Published list" VerticalAlignment="Center" />
|
|
<Button Grid.Column="1" Content="Download" Click="OnDownloadNodes" />
|
|
</Grid>
|
|
<ListBox Grid.Row="1" Name="PublishedNodeList" SelectionChanged="OnPublishedNodePicked" />
|
|
</Grid>
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<TabItem Header="Filters">
|
|
<ScrollViewer>
|
|
<StackPanel Margin="10" Spacing="2">
|
|
<TextBlock Classes="label" Text="Bands — none ticked means every band" />
|
|
<WrapPanel Name="BandBoxes" />
|
|
<TextBlock Classes="label" Text="Modes — none ticked means every mode" />
|
|
<StackPanel Orientation="Horizontal" Spacing="12">
|
|
<CheckBox Name="CwBox" Content="CW" />
|
|
<CheckBox Name="PhoneBox" Content="Phone" />
|
|
<CheckBox Name="DigitalBox" Content="Digital" />
|
|
</StackPanel>
|
|
<CheckBox Name="BeaconBox" Content="Show beacon spots" Margin="0,6,0,0" />
|
|
<CheckBox Name="BustedBox" Content="Remove busted spots — a call one character off one the callsign database knows" />
|
|
<CheckBox Name="CallHistoryBox" Content="Only the stations in the call history file" />
|
|
<CheckBox Name="RandomizeBox" Content="Randomise incoming CW spot frequencies" />
|
|
<TextBlock Classes="label" Text="Preferred spotters, whose lines the traffic paints" />
|
|
<TextBox Name="PreferredSpottersBox" PlaceholderText="W3LPL K1TTT" />
|
|
<TextBlock Classes="label" Text="Take spots only from" />
|
|
<CheckBox Name="MyCountryBox" Content="my country" />
|
|
<CheckBox Name="MyContinentBox" Content="my continent" />
|
|
<TextBlock Classes="label" Text="these prefixes, separated by spaces" />
|
|
<TextBox Name="CallAreasBox" PlaceholderText="K1 K2 VE3" />
|
|
<TextBlock Classes="label" Text="Blacklisted spotters" />
|
|
<TextBox Name="BlockedSpottersBox" />
|
|
<TextBlock Classes="label" Text="Blacklisted calls" />
|
|
<TextBox Name="BlockedCallsBox" />
|
|
<Button Content="Apply" Click="OnApplyFilters" Margin="0,10,0,0" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</TabItem>
|
|
|
|
<TabItem Header="Buttons">
|
|
<DockPanel Margin="10">
|
|
<TextBlock DockPanel.Dock="Top" Classes="label" Margin="0,0,0,6" TextWrapping="Wrap"
|
|
Text="The buttons under the traffic. A button takes the message macros — {MYCALL}, {CALL}, {FREQ} — several commands separated by semicolons, or {CONN} and the name of a favourite to connect to it. Leave the label empty to drop the button." />
|
|
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" Spacing="6" Margin="0,10,0,0">
|
|
<Button Content="Save" Click="OnSaveButtons" />
|
|
<Button Content="Back to the defaults" Click="OnResetButtons" />
|
|
</StackPanel>
|
|
<ScrollViewer>
|
|
<Grid Name="ButtonRows" ColumnDefinitions="140,8,*" />
|
|
</ScrollViewer>
|
|
</DockPanel>
|
|
</TabItem>
|
|
|
|
<TabItem Header="Login & Spots">
|
|
<StackPanel Margin="10" Width="300" HorizontalAlignment="Left">
|
|
<TextBlock Classes="label" Text="Log on with" Margin="0,0,0,1" />
|
|
<TextBox Name="LogonCallBox" PlaceholderText="the station callsign" />
|
|
<TextBlock Classes="label" Text="Keep alive every (minutes)" />
|
|
<NumericUpDown Name="KeepAliveBox" Minimum="1" Maximum="60" Increment="1"
|
|
FormatString="0" HorizontalAlignment="Left" Width="120" />
|
|
<TextBlock Classes="label" Text="Spot comment, sent with the spots you put on the cluster" />
|
|
<TextBox Name="SpotCommentBox" PlaceholderText="CQ contest" />
|
|
<Button Content="Save" Click="OnSaveLogin" Margin="0,10,0,0" />
|
|
<TextBlock Classes="label" Text="The login applies on the next connection." />
|
|
</StackPanel>
|
|
</TabItem>
|
|
</TabControl>
|
|
</local:RefreshableWindow>
|