Skip to content

Commit

Permalink
Add ALT + in bottom capture hotkey description if ALT is required. (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
aurolou committed May 14, 2019
1 parent aa38bd1 commit 8dac708
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions Frontend/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,30 @@ private void OnUserInterfacePropertyChanged(object sender, PropertyChangedEventA
toggleVisibilityKeyboardHook.ModifyKeyCombination(!(bool)altCheckBox.IsChecked);
toggleBarVisibilityKeyboardHook.ModifyKeyCombination(!(bool)altCheckBox.IsChecked);
toggleGraphVisibilityKeyboardHook.ModifyKeyCombination(!(bool)altCheckBox.IsChecked);
toggleRecordingKeyboardHook.ModifyKeyCombination(!(bool)altCheckBox.IsChecked);
if (enableRecordings)
{
if (toggleRecordingKeyboardHook.ModifyKeyCombination(!(bool)altCheckBox.IsChecked))
{
toggleRecordingHotkeyString.Text = KeyInterop.KeyFromVirtualKey(toggleRecordingKeyCode).ToString();
if (!(bool)altCheckBox.IsChecked)
{
recordingStateDefault = "Press ALT + " + toggleRecordingHotkeyString.Text + " to start Capture";
}
else
{
recordingStateDefault = "Press " + toggleRecordingHotkeyString.Text + " to start Capture";
}
}
else
{
toggleRecordingHotkeyString.Text = "";
recordingStateDefault = "You must define a valid Capture hotkey.";
}
}
else
{
recordingStateDefault = "Capture is disabled due to errors during initialization.";
}
break;
}
}
Expand Down Expand Up @@ -468,7 +491,14 @@ private void SetToggleRecordingKey(Key key)
if (toggleRecordingKeyboardHook.ActivateHook(toggleRecordingKeyCode, GetHWND(), (bool)altCheckBox.IsChecked))
{
toggleRecordingHotkeyString.Text = key.ToString();
recordingStateDefault = "Press " + toggleRecordingHotkeyString.Text + " to start Capture";
if ((bool)altCheckBox.IsChecked)
{
recordingStateDefault = "Press ALT + " + toggleRecordingHotkeyString.Text + " to start Capture";
}
else
{
recordingStateDefault = "Press " + toggleRecordingHotkeyString.Text + " to start Capture";
}
} else
{
toggleRecordingHotkeyString.Text = "";
Expand Down

0 comments on commit 8dac708

Please sign in to comment.