minor design alteration, round off border on channel and system controls; use Last ID instead of Last SRC;

pull/1/head
Bryan Biedenkapp 11 months ago
parent 121402ca2f
commit 3e77dc8579

@ -25,20 +25,22 @@
<Menu VerticalAlignment="Center" Height="25" Background="White" Grid.ColumnSpan="2"> <Menu VerticalAlignment="Center" Height="25" Background="White" Grid.ColumnSpan="2">
<MenuItem Header="File"> <MenuItem Header="File">
<MenuItem Header="Open Codeplug" Click="OpenCodeplug_Click"/> <MenuItem Header="_Open Codeplug" Click="OpenCodeplug_Click"/>
</MenuItem> </MenuItem>
<MenuItem Header="Edit"> <MenuItem Header="Edit">
<MenuItem Header="Audio Settings" Click="AudioSettings_Click" /> <MenuItem Header="_Audio Settings" Click="AudioSettings_Click" />
<MenuItem Header="Enable Edit Mode" Click="ToggleEditMode_Click"/> <MenuItem Header="_Reset Settings" Click="ResetSettings_Click"/>
<MenuItem Header="Select Widgets to Display" Click="SelectWidgets_Click"/> <Separator />
<MenuItem Header="Reset Settings" Click="ResetSettings_Click"/> <MenuItem Header="_Enable Edit Mode" Click="ToggleEditMode_Click"/>
<Separator />
<MenuItem Header="_Select Widgets to Display" Click="SelectWidgets_Click"/>
<MenuItem Header="Alerts"> <MenuItem Header="Alerts">
<MenuItem Header="Add Alert Tone" Click="AddAlertTone_Click"/> <MenuItem Header="Add Alert Tone" Click="AddAlertTone_Click"/>
</MenuItem> </MenuItem>
</MenuItem> </MenuItem>
<MenuItem Header="Page"> <MenuItem Header="Page">
<MenuItem Header="P25 Page" Click="P25Page_Click" /> <MenuItem Header="P25 _Page" Click="P25Page_Click" />
<MenuItem Header="Manual QC2" Click="ManualPage_Click" /> <MenuItem Header="Manual _QC2" Click="ManualPage_Click" />
</MenuItem> </MenuItem>
</Menu> </Menu>

@ -85,7 +85,7 @@ namespace dvmconsole
CallHistoryWindow callHistoryWindow = new CallHistoryWindow(); CallHistoryWindow callHistoryWindow = new CallHistoryWindow();
public static string PLAYBACKTG = "LOCPLAYBACK"; public static string PLAYBACKTG = "LOCPLAYBACK";
public static string PLAYBACKSYS = "LOCPLAYBACKSYS"; public static string PLAYBACKSYS = "Local Playback";
public static string PLAYBACKCHNAME = "PLAYBACK"; public static string PLAYBACKCHNAME = "PLAYBACK";
private readonly WaveInEvent waveIn; private readonly WaveInEvent waveIn;
@ -258,7 +258,7 @@ namespace dvmconsole
Dispatcher.Invoke(() => Dispatcher.Invoke(() =>
{ {
systemStatusBox.Background = new SolidColorBrush(Colors.Red); systemStatusBox.Background = new SolidColorBrush(Colors.DarkRed);
systemStatusBox.ConnectionState = "Disconnected"; systemStatusBox.ConnectionState = "Disconnected";
}); });
}; };
@ -1625,7 +1625,7 @@ namespace dvmconsole
catch (Exception) { } catch (Exception) { }
if (string.IsNullOrEmpty(alias)) if (string.IsNullOrEmpty(alias))
channel.LastSrcId = "Last SRC: " + e.SrcId; channel.LastSrcId = "Last ID: " + e.SrcId;
else else
channel.LastSrcId = "Last: " + alias; channel.LastSrcId = "Last: " + alias;

@ -1,9 +1,9 @@
<UserControl x:Class="dvmconsole.Controls.ChannelBox" <UserControl x:Class="dvmconsole.Controls.ChannelBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="220" Height="100" Background="#FF0B004B"> Width="220" Height="100">
<!-- Border wraps the entire Grid --> <!-- Border wraps the entire Grid -->
<Border BorderBrush="Gray" BorderThickness="1,1,1,1" CornerRadius="0"> <Border x:Name="ControlBorder" BorderBrush="LightGray" BorderThickness="1,1,1,1" CornerRadius="8">
<Grid Margin="5"> <Grid Margin="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="41"/> <ColumnDefinition Width="41"/>

@ -8,6 +8,7 @@
* @license AGPLv3 License (https://opensource.org/licenses/AGPL-3.0) * @license AGPLv3 License (https://opensource.org/licenses/AGPL-3.0)
* *
* Copyright (C) 2025 Caleb, K4PHP * Copyright (C) 2025 Caleb, K4PHP
* Copyright (C) 2025 Bryan Biedenkapp, N2PLL
* *
*/ */
@ -26,6 +27,10 @@ namespace dvmconsole.Controls
/// </summary> /// </summary>
public partial class ChannelBox : UserControl, INotifyPropertyChanged public partial class ChannelBox : UserControl, INotifyPropertyChanged
{ {
private readonly static Brush DESELECTED_COLOR = Brushes.Gray;
private readonly static Brush SELECTED_COLOR = (Brush)new BrushConverter().ConvertFrom("#FF0B004B");
private readonly static Brush PLYBK_SELECTED_COLOR = (Brush)new BrushConverter().ConvertFrom("#FFC90000");
private readonly SelectedChannelsManager selectedChannelsManager; private readonly SelectedChannelsManager selectedChannelsManager;
private readonly AudioManager audioManager; private readonly AudioManager audioManager;
@ -310,7 +315,7 @@ namespace dvmconsole.Controls
return; return;
IsSelected = !IsSelected; IsSelected = !IsSelected;
Background = IsSelected ? (Brush)new BrushConverter().ConvertFrom("#FF0B004B") : Brushes.Gray; ControlBorder.Background = IsSelected ? SELECTED_COLOR : DESELECTED_COLOR;
if (IsSelected) if (IsSelected)
selectedChannelsManager.AddSelectedChannel(this); selectedChannelsManager.AddSelectedChannel(this);
@ -364,11 +369,11 @@ namespace dvmconsole.Controls
{ {
if (SystemName == MainWindow.PLAYBACKSYS || ChannelName == MainWindow.PLAYBACKCHNAME || DstId == MainWindow.PLAYBACKTG) if (SystemName == MainWindow.PLAYBACKSYS || ChannelName == MainWindow.PLAYBACKCHNAME || DstId == MainWindow.PLAYBACKTG)
{ {
Background = IsSelected ? (Brush)new BrushConverter().ConvertFrom("#FFC90000") : Brushes.DarkGray; ControlBorder.Background = IsSelected ? PLYBK_SELECTED_COLOR : DESELECTED_COLOR;
return; return;
} }
Background = IsSelected ? (Brush)new BrushConverter().ConvertFrom("#FF0B004B") : Brushes.DarkGray; ControlBorder.Background = IsSelected ? SELECTED_COLOR : DESELECTED_COLOR;
} }
/// <summary> /// <summary>

@ -1,12 +1,11 @@
<UserControl x:Class="dvmconsole.Controls.SystemStatusBox" <UserControl x:Class="dvmconsole.Controls.SystemStatusBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="105" Height="55" Background="#FF0B004B" BorderBrush="Gray" BorderThickness="1"> Width="105" Height="55">
<Border Background="{Binding Background, RelativeSource={RelativeSource AncestorType=UserControl}}" CornerRadius="5" Padding="10" BorderThickness="1,1,1,1"> <Border x:Name="ControlBorder" BorderBrush="LightGray" BorderThickness="1,1,1,1" CornerRadius="6">
<StackPanel Margin="-3,-1,-4,1"> <StackPanel Margin="2,2,2,2">
<TextBlock Text="{Binding SystemName}" FontWeight="Bold" Foreground="White" FontSize="12"/> <TextBlock Text="{Binding ConnectionState}" Foreground="Gold" FontSize="10" TextAlignment="Center" />
<TextBlock Text="{Binding ConnectionState}" Foreground="Gold" FontSize="10"/> <TextBlock Text="{Binding SystemName}" FontWeight="Bold" Foreground="White" FontSize="16" TextAlignment="Center" />
</StackPanel> </StackPanel>
</Border> </Border>
</UserControl> </UserControl>

@ -14,6 +14,7 @@
using System.ComponentModel; using System.ComponentModel;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Media;
namespace dvmconsole.Controls namespace dvmconsole.Controls
{ {
@ -53,6 +54,15 @@ namespace dvmconsole.Controls
} }
} }
/// <summary>
/// Gets or sets the <see cref="Brush"/> that fills the area between the bounds of the control border.
/// </summary>
public new Brush Background
{
get => ControlBorder.Background;
set => ControlBorder.Background = value;
}
/* /*
** Events ** Events
*/ */

Loading…
Cancel
Save

Powered by TurnKey Linux.