diff --git a/dvmconsole/CallHistoryWindow.xaml b/dvmconsole/CallHistoryWindow.xaml
index 59bfedb..2e9052f 100644
--- a/dvmconsole/CallHistoryWindow.xaml
+++ b/dvmconsole/CallHistoryWindow.xaml
@@ -14,13 +14,14 @@
-
+
-
+
diff --git a/dvmconsole/CallHistoryWindow.xaml.cs b/dvmconsole/CallHistoryWindow.xaml.cs
index c14e1e2..7569995 100644
--- a/dvmconsole/CallHistoryWindow.xaml.cs
+++ b/dvmconsole/CallHistoryWindow.xaml.cs
@@ -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
*
*/
@@ -24,6 +25,8 @@ namespace dvmconsole
{
public static readonly DependencyProperty BackgroundColorProperty =
DependencyProperty.Register(nameof(BackgroundColor), typeof(Brush), typeof(CallEntry), new PropertyMetadata(Brushes.Transparent));
+ public static readonly DependencyProperty ForegroundColorProperty =
+ DependencyProperty.Register(nameof(ForegroundColor), typeof(Brush), typeof(CallEntry), new PropertyMetadata(Brushes.White));
/*
** Properties
@@ -55,6 +58,15 @@ namespace dvmconsole
get { return (Brush)GetValue(BackgroundColorProperty); }
set { SetValue(BackgroundColorProperty, value); }
}
+
+ ///
+ /// Foreground color for call entry.
+ ///
+ public Brush ForegroundColor
+ {
+ get { return (Brush)GetValue(ForegroundColorProperty); }
+ set { SetValue(ForegroundColorProperty, value); }
+ }
} // public class CallEntry : DependencyObject
///
@@ -89,6 +101,9 @@ namespace dvmconsole
///
public partial class CallHistoryWindow : Window
{
+ private const int MAX_CALL_HISTORY = 200;
+ private SettingsManager settingsManager;
+
/*
** Properties
*/
@@ -105,9 +120,10 @@ namespace dvmconsole
///
/// Initializes a new instance of the class.
///
- public CallHistoryWindow()
+ public CallHistoryWindow(SettingsManager settingsManager)
{
InitializeComponent();
+ this.settingsManager = settingsManager;
ViewModel = new CallHistoryViewModel();
DataContext = ViewModel;
}
@@ -132,6 +148,9 @@ namespace dvmconsole
{
Dispatcher.Invoke(() =>
{
+ if (ViewModel.CallHistory.Count == MAX_CALL_HISTORY)
+ ViewModel.CallHistory.RemoveAt(MAX_CALL_HISTORY - 1);
+
ViewModel.CallHistory.Insert(0, new CallEntry
{
Channel = channel,
@@ -155,6 +174,8 @@ namespace dvmconsole
{
foreach (var entry in ViewModel.CallHistory.Where(c => c.Channel == channel && c.SrcId == srcId))
{
+ entry.ForegroundColor = Brushes.Black;
+
if (!encrypted)
entry.BackgroundColor = Brushes.LightGreen;
else
@@ -174,6 +195,10 @@ namespace dvmconsole
{
foreach (var entry in ViewModel.CallHistory.Where(c => c.Channel == channel && c.SrcId == srcId))
{
+ if (settingsManager.DarkMode)
+ entry.ForegroundColor = Brushes.White;
+ else
+ entry.ForegroundColor = Brushes.Black;
entry.BackgroundColor = Brushes.Transparent;
}
});
diff --git a/dvmconsole/DigitalPageWindow.xaml b/dvmconsole/DigitalPageWindow.xaml
index f57842f..cd969bf 100644
--- a/dvmconsole/DigitalPageWindow.xaml
+++ b/dvmconsole/DigitalPageWindow.xaml
@@ -28,7 +28,7 @@
diff --git a/dvmconsole/MainWindow.P25.cs b/dvmconsole/MainWindow.P25.cs
index 4fa3bd2..baa01db 100644
--- a/dvmconsole/MainWindow.P25.cs
+++ b/dvmconsole/MainWindow.P25.cs
@@ -514,12 +514,7 @@ namespace dvmconsole
channel.LastSrcId = "Last: " + alias;
if (channel.algId != P25Defines.P25_ALGO_UNENCRYPT)
- {
- channel.Background = ChannelBox.ORANGE_GRADIENT;
Log.WriteLine($"({system.Name}) P25D: Traffic *CALL ENC PARMS * PEER {e.PeerId} SRC_ID {e.SrcId} TGID {e.DstId} ALGID {channel.algId} KID {channel.kId} [STREAM ID {e.StreamId}]");
- }
- else
- channel.Background = ChannelBox.GREEN_GRADIENT;
}
// is the call over?
@@ -534,6 +529,12 @@ namespace dvmconsole
return;
}
+ // do background updates here -- this catches late entry
+ if (channel.algId != P25Defines.P25_ALGO_UNENCRYPT)
+ channel.Background = ChannelBox.ORANGE_GRADIENT;
+ else
+ channel.Background = ChannelBox.GREEN_GRADIENT;
+
byte[] newMI = new byte[P25Defines.P25_MI_LENGTH];
int count = 0;
diff --git a/dvmconsole/MainWindow.xaml.cs b/dvmconsole/MainWindow.xaml.cs
index 4c2cc7a..9621c3d 100644
--- a/dvmconsole/MainWindow.xaml.cs
+++ b/dvmconsole/MainWindow.xaml.cs
@@ -108,7 +108,7 @@ namespace dvmconsole
private ChannelBox playbackChannelBox;
- CallHistoryWindow callHistoryWindow = new CallHistoryWindow();
+ CallHistoryWindow callHistoryWindow;
public static string PLAYBACKTG = "LOCPLAYBACK";
public static string PLAYBACKSYS = "Local Playback";
@@ -150,6 +150,7 @@ namespace dvmconsole
DisableControls();
settingsManager.LoadSettings();
+ callHistoryWindow = new CallHistoryWindow(settingsManager);
selectedChannelsManager = new SelectedChannelsManager();
flashingManager = new FlashingBackgroundManager(null, channelsCanvas, null, this);
diff --git a/dvmconsole/WidgetSelectionWindow.xaml b/dvmconsole/WidgetSelectionWindow.xaml
index 9c6c92c..4b7dafc 100644
--- a/dvmconsole/WidgetSelectionWindow.xaml
+++ b/dvmconsole/WidgetSelectionWindow.xaml
@@ -1,12 +1,17 @@
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ TextElement.Foreground="{DynamicResource MaterialDesignBody}" TextElement.FontWeight="Regular" TextElement.FontSize="13"
+ Style="{StaticResource MaterialDesignWindow}" Background="{DynamicResource MaterialDesignPaper}" FontFamily="{DynamicResource MaterialDesignFont}"
+ Title="Select Widgets" Height="220" Width="300" WindowStartupLocation="CenterOwner">
-
+
+