I have a program that at its heart is just a fancy Keyboard hook and wedge. The keyboard hook portion is a separate library from the main program. In the main program I gather all the keys that i want to monitor from a config file and instantiate the keyboard hook. The keys that I am monitoring have tasks that they can perform when the key is pressed and/or when it is released. (Tasks such as open a program, turn on a scanner..etc) Since the project started in Winforms I felt that it would be a good idea to make a folder in this library called Controls. I made a dialog Form that a user could select what task they wanted to perform. There has been a need for me to switch from Winforms to WPF. So it is nothing to add Winform controls to a class library. From trial and error it appears that doing the same thing for WPF user controls is a different story. So I decided it would be easier to just created a new WPF Usercontrol project. (If it is possible can you please leave a comment about how to?)
So I am new to WPF, and decided that this particular library would be good to use the MVVM pattern to get my feet wet. It is small in that I only have 6 subclasses of Type AbstractTask
. Part of me is itching to use Abstract Task my Model. I'm not sure how yet, but I think that it is my Model. I'll have to add a description string field to it for my View, but that shouldn't be a problem. Since atleast one of my Tasks needs extra information (such as RunProgramTask) I figure I should also put a ?Action? in to "verify" that all the correct information is given. again.. that should be easy.
So in the end I have 2 questions.
- Does my theory comply with the MVVM pattern?
- Should I move all my Hooks and Tasks and such over to the new WPF project and delete the old project? Or should I just delete the Winforms controls out of my library and just imagine that it is one project?