Lately, I have been working on the ability to save a user profile, searches, display settings, and the like.
I was focusing mostly on the Search settings, and finding ways to make that entire process as robust as possible.
I am finally happy with the results, so here's a download package that contains the code. Feel free to explore this, I think this framework will work well, but it probably needs some minor debugging. I plan to add a few more search options, but they really aren't important, since they would only be used by the FreeformSearch.
I tried to comment as clearly as possible. I would recommend you start with the Program.cs file, to get a feel for what I was testing. Then look at the specs for the MTG_Search classes, located in the SearchOptions/MTG_Search file. Those classes make CONSTANT use of the SearchComponent classes found in SearchOptions/MTG_SearchComponents. The other files are merely there to handle minor details.
That framework works well, but the need for Public access rights makes me nervous. I'd like to use a more secure interface layer within the program, and you can see the results of that in the SearchOptions/SearchInterface file. Basically, I see that layer providing more stability for the strongly defined searches, easier access to data via Properties, and some other features to help get the data in a format the GUI would prefer.
For example, the SimpleSearch will need various "toggle" events for the mana, type, and rarity icons. Advanced and Freeform will use checkboxes, but SimpleSearch will want to define click, double-click, right-click, control-click, and other events. Rather than code all that into the GUI, the interface can handle the details, and the GUI just gets bound to the relevant event.
Hopefully that makes sense "on paper," because it makes sense in my head. :/