Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
Changing Toggle text when headset was enabled/disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtYurchenko committed Feb 11, 2021
1 parent a528cdb commit 1d0f729
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ namespace WMR_USB_Controller
/// </summary>
public partial class MainWindow
{
private const string DisableWMRToggleText = "Disable WMR device";
private const string EnableWMRToggleText = "Enable WMR device";

private readonly UsbDevicesManager _usbDevicesManager = new UsbDevicesManager();

private AutostartManager _autostartManager;
Expand Down Expand Up @@ -94,6 +97,7 @@ private void EnableWmrDeviceAction(object sender, RoutedEventArgs e)
public void ChangeWmrDeviceState(bool newState)
{
_usbDevicesManager.ActivateWmrDevice(newState);
WmrStatusToggle.Content = newState ? DisableWMRToggleText : EnableWMRToggleText;
WmrStatusToggle.IsChecked = !newState;
}

Expand Down

0 comments on commit 1d0f729

Please sign in to comment.