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">
<MenuItem Header="File">
<MenuItem Header="Open Codeplug" Click="OpenCodeplug_Click"/>
<MenuItem Header="_Open Codeplug" Click="OpenCodeplug_Click"/>
</MenuItem>
<MenuItem Header="Edit">
<MenuItem Header="Audio Settings" Click="AudioSettings_Click" />
<MenuItem Header="Enable Edit Mode" Click="ToggleEditMode_Click"/>
<MenuItem Header="Select Widgets to Display" Click="SelectWidgets_Click"/>
<MenuItem Header="Reset Settings" Click="ResetSettings_Click"/>
<MenuItem Header="_Audio Settings" Click="AudioSettings_Click" />
<MenuItem Header="_Reset Settings" Click="ResetSettings_Click"/>
<Separator />
<MenuItem Header="_Enable Edit Mode" Click="ToggleEditMode_Click"/>
<Separator />
<MenuItem Header="_Select Widgets to Display" Click="SelectWidgets_Click"/>
<MenuItem Header="Alerts">
<MenuItem Header="Add Alert Tone" Click="AddAlertTone_Click"/>
</MenuItem>
</MenuItem>
<MenuItem Header="Page">
<MenuItem Header="P25 Page" Click="P25Page_Click" />
<MenuItem Header="Manual QC2" Click="ManualPage_Click" />
<MenuItem Header="P25 _Page" Click="P25Page_Click" />
<MenuItem Header="Manual _QC2" Click="ManualPage_Click" />
</MenuItem>
</Menu>

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

@ -1,9 +1,9 @@
<UserControl x:Class="dvmconsole.Controls.ChannelBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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 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.ColumnDefinitions>
<ColumnDefinition Width="41"/>

@ -8,6 +8,7 @@
* @license AGPLv3 License (https://opensource.org/licenses/AGPL-3.0)
*
* Copyright (C) 2025 Caleb, K4PHP
* Copyright (C) 2025 Bryan Biedenkapp, N2PLL
*
*/
@ -26,6 +27,10 @@ namespace dvmconsole.Controls
/// </summary>
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 AudioManager audioManager;
@ -310,7 +315,7 @@ namespace dvmconsole.Controls
return;
IsSelected = !IsSelected;
Background = IsSelected ? (Brush)new BrushConverter().ConvertFrom("#FF0B004B") : Brushes.Gray;
ControlBorder.Background = IsSelected ? SELECTED_COLOR : DESELECTED_COLOR;
if (IsSelected)
selectedChannelsManager.AddSelectedChannel(this);
@ -364,11 +369,11 @@ namespace dvmconsole.Controls
{
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;
}
Background = IsSelected ? (Brush)new BrushConverter().ConvertFrom("#FF0B004B") : Brushes.DarkGray;
ControlBorder.Background = IsSelected ? SELECTED_COLOR : DESELECTED_COLOR;
}
/// <summary>

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

@ -14,6 +14,7 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Controls;
using System.Windows.Media;
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
*/

Loading…
Cancel
Save

Powered by TurnKey Linux.