diff --git a/WhackerLinkConsoleV2/ChannelBox.xaml b/WhackerLinkConsoleV2/ChannelBox.xaml index b78d0f5..07bcf7f 100644 --- a/WhackerLinkConsoleV2/ChannelBox.xaml +++ b/WhackerLinkConsoleV2/ChannelBox.xaml @@ -37,7 +37,7 @@ - + diff --git a/WhackerLinkConsoleV2/ChannelBox.xaml.cs b/WhackerLinkConsoleV2/ChannelBox.xaml.cs index 65578c3..2b245bd 100644 --- a/WhackerLinkConsoleV2/ChannelBox.xaml.cs +++ b/WhackerLinkConsoleV2/ChannelBox.xaml.cs @@ -195,10 +195,10 @@ namespace WhackerLinkConsoleV2.Controls { if (IsEditMode) return; - //if (HoldState) - // HoldChannelButton.Background = new SolidColorBrush(Colors.Orange); - //else - // HoldChannelButton.Background = new SolidColorBrush(Colors.Green); + if (HoldState) + ChannelMarkerBtn.Background = new SolidColorBrush(Colors.Orange); + else + ChannelMarkerBtn.Background = new SolidColorBrush(Colors.Green); } private void UpdateBackground() @@ -222,14 +222,6 @@ namespace WhackerLinkConsoleV2.Controls PageButtonClicked.Invoke(sender, this); } - private void HoldChannelButton_Click(object sender, RoutedEventArgs e) - { - if (!IsSelected) return; - - HoldState = !HoldState; - HoldChannelButtonClicked.Invoke(sender, this); - } - private void VolumeSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) { Volume = e.NewValue; @@ -239,5 +231,13 @@ namespace WhackerLinkConsoleV2.Controls { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } + + private void ChannelMarkerBtn_Click(object sender, RoutedEventArgs e) + { + if (!IsSelected) return; + + HoldState = !HoldState; + HoldChannelButtonClicked.Invoke(sender, this); + } } } diff --git a/WhackerLinkConsoleV2/MainWindow.xaml.cs b/WhackerLinkConsoleV2/MainWindow.xaml.cs index 92e6510..1afc129 100644 --- a/WhackerLinkConsoleV2/MainWindow.xaml.cs +++ b/WhackerLinkConsoleV2/MainWindow.xaml.cs @@ -262,6 +262,7 @@ namespace WhackerLinkConsoleV2 channelBox.PTTButtonClicked += ChannelBox_PTTButtonClicked; channelBox.PageButtonClicked += ChannelBox_PageButtonClicked; + channelBox.HoldChannelButtonClicked += ChannelBox_HoldChannelButtonClicked; channelBox.MouseLeftButtonDown += ChannelBox_MouseLeftButtonDown; channelBox.MouseMove += ChannelBox_MouseMove; @@ -716,6 +717,13 @@ namespace WhackerLinkConsoleV2 } } + private void ChannelBox_HoldChannelButtonClicked(object sender, ChannelBox e) + { + Codeplug.System system = Codeplug.GetSystemForChannel(e.ChannelName); + Codeplug.Channel cpgChannel = Codeplug.GetChannelByName(e.ChannelName); + IPeer handler = _webSocketManager.GetWebSocketHandler(system.Name); + } + private void ChannelBox_PageButtonClicked(object sender, ChannelBox e) { Codeplug.System system = Codeplug.GetSystemForChannel(e.ChannelName);