NiyaShy / XB1ControllerBatteryIndicator

A tray application that shows a battery indicator for an Xbox-ish controller and gives a notification when the battery level drops to (almost) empty.
GNU General Public License v2.0
710 stars 53 forks source link

Help getting project to build #37

Closed rolodato closed 4 years ago

rolodato commented 4 years ago

Hi, I'm a complete Windows programming newbie. I'd like to make a change but can't even get the project to build.

I'm using Visual Studio 2019 Community on Windows 10 and I think all the necessary SDKs are installed, but the project fails to build by not finding dependencies in the Windows namespace, such as Windows.UI.Notifications and Windows.Data.Xml.Dom:

image

From what I can tell, the missing classes are from Windows UWP, which Visual Studio Installer shows as installed:

image

It's likely I'm missing something basic but haven't had any luck googling. Any clues? Thanks!

PS: The change I'd like to make is to only ever show known battery levels, and not show any information about wireless controllers or unknown battery statuses. I use a mix of wireless and wired controllers in my setup, and do not really care if the wired controllers are plugged in or not - I just want to know the battery levels of the other controllers. Also, I do not really care if a wireless controller is connected but the battery status has not been reported yet.

I could see this being implemented as a multiple selection, one for each icon that can be displayed. The default options would be:

Currently, if controllers are connected but the user has selected not to show the icon for their current status, the fallback tooltip message would be "No controllers connected" with a question mark icon. Instead, I think a better UX for the tooltip text would be to always show the full known state of all controllers regardless of display preferences. For example, the following text:

Controller 1: Wired
Controller 2: Wireless, 80% battery
Controller 3: Wireless, unknown battery level

or, just fall back to "No controllers connected". This way it's easy for the user to tell apart "no controllers are connected" and "controllers are connected, but their icons can't be shown". It has the added bonus of not needing to wait until the tray icon is showing a specific controller to check on its battery level.

NiyaShy commented 4 years ago

Hey, the missing references are already covered in Issue #28, it's a thing Microsoft changed in VS 2019...

You're welcome to tinker with the code. If anything useful comes out of it that could benefit everyone, a pull request is much appreciated 😉