diff --git a/dvmconsole/MainWindow.P25.cs b/dvmconsole/MainWindow.P25.cs index d30ddd8..4fa3bd2 100644 --- a/dvmconsole/MainWindow.P25.cs +++ b/dvmconsole/MainWindow.P25.cs @@ -534,14 +534,6 @@ namespace dvmconsole return; } - if ((channel.algId != cpgChannel.GetAlgoId() || channel.kId != cpgChannel.GetKeyId()) && channel.algId != P25Defines.P25_ALGO_UNENCRYPT) - { - slot.RxStreamId = e.StreamId; - channel.Background = ChannelBox.RED_GRADIENT; - Log.WriteLine($"({system.Name}) P25D: Traffic *CALL DROPPED * PEER {e.PeerId} SRC_ID {e.SrcId} TGID {e.DstId} [STREAM ID {e.StreamId}]"); - continue; - } - byte[] newMI = new byte[P25Defines.P25_MI_LENGTH]; int count = 0; diff --git a/dvmconsole/MainWindow.xaml b/dvmconsole/MainWindow.xaml index 858d603..92c9abc 100644 --- a/dvmconsole/MainWindow.xaml +++ b/dvmconsole/MainWindow.xaml @@ -59,6 +59,7 @@ + diff --git a/dvmconsole/MainWindow.xaml.cs b/dvmconsole/MainWindow.xaml.cs index 15645cb..15abb7e 100644 --- a/dvmconsole/MainWindow.xaml.cs +++ b/dvmconsole/MainWindow.xaml.cs @@ -1101,6 +1101,7 @@ namespace dvmconsole menuToggleLockWidgets.IsChecked = settingsManager.LockWidgets; menuSnapCallHistory.IsChecked = settingsManager.SnapCallHistoryToWindow; menuTogglePTTMode.IsChecked = settingsManager.TogglePTTMode; + menuStayOnTop.IsChecked = settingsManager.KeepWindowOnTop; if (!string.IsNullOrEmpty(settingsManager.LastCodeplugPath) && File.Exists(settingsManager.LastCodeplugPath)) LoadCodeplug(settingsManager.LastCodeplugPath); @@ -1567,6 +1568,18 @@ namespace dvmconsole settingsManager.SnapCallHistoryToWindow = !settingsManager.SnapCallHistoryToWindow; } + /// + /// + /// + /// + /// + private void ToggleStayOnTop_Click(object sender, RoutedEventArgs e) + { + this.Topmost = !this.Topmost; + + settingsManager.KeepWindowOnTop = menuStayOnTop.IsChecked; + } + /// /// /// diff --git a/dvmconsole/SettingsManager.cs b/dvmconsole/SettingsManager.cs index 9910e4a..54084fe 100644 --- a/dvmconsole/SettingsManager.cs +++ b/dvmconsole/SettingsManager.cs @@ -95,6 +95,11 @@ namespace dvmconsole /// public bool SnapCallHistoryToWindow { get; set; } = false; + /// + /// Flag indicating whether or not to keep the window on top. + /// + public bool KeepWindowOnTop { get; set; } = false; + /// /// Flag indicating window maximized state. /// @@ -164,6 +169,7 @@ namespace dvmconsole TogglePTTMode = loadedSettings.TogglePTTMode; LockWidgets = loadedSettings.LockWidgets; SnapCallHistoryToWindow = loadedSettings.SnapCallHistoryToWindow; + KeepWindowOnTop = loadedSettings.KeepWindowOnTop; Maximized = loadedSettings.Maximized; DarkMode = loadedSettings.DarkMode; WindowWidth = loadedSettings.WindowWidth;