So previously I mentioned that I had some code already in place to handle the profile switching for the application detection portion of the program. Upon closer review of the code I determined that it just didn't meet the cleaner and more streamlined methodology I ave been taking with IM. Instead I have been working on an entirely new approach that leverages another area of code that I already have in place; the macro system.
I plan to create a new IMacroAction class designed to change the profile of a (or all) controllers. There will then be options in the application detection screen to add macro actions to a specific application. The benefit of this approach is the simplicity of sharing a single class and set of instructions between two separate parts of the application. This also has the added benefit of opening up the Application Detection to actions other than just switching profiles, in theory this would allow any macro action to be part of the application detection process. Meaning actions could be set up to launch other apps or tools, or take advantage of any other proposed action. What if launching a game or a movie dimmed the physical lights in the room? Cool ehh?
Currently work is underway in creating the classes related to the macro action needed as well as supporting work in creating new setting types to allow for profile selection.
More details will be in Tuesdays video.