Create the framework one could say for channel hold button

pull/1/head
firealarmss 11 months ago
parent d827dc63b0
commit c9981b1dd5

@ -37,7 +37,7 @@
<Button Width="31" Height="33" Background="SteelBlue" x:Name="PageSelectButton" Click="PageSelectButton_Click">
<Image Source="pack://application:,,,/WhackerLinkConsoleV2;component/Assets/pageselect.png" Width="24" Height="24"/>
</Button>
<Button Width="28" Height="33" Background="SteelBlue">
<Button Width="28" Height="33" Background="SteelBlue" x:Name="ChannelMarkerBtn" Click="ChannelMarkerBtn_Click">
<Image Source="pack://application:,,,/WhackerLinkConsoleV2;component/Assets/channelmarker.png" Width="24" Height="24"/>
</Button>
</StackPanel>

@ -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<double> 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);
}
}
}

@ -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);

Loading…
Cancel
Save

Powered by TurnKey Linux.