September 2007 - Posts
A recipe execution implies three parts which are, the arguments, the data gathering and the actions that will be executed using those arguments. By default the data gathering service in GAX was implemented over the Vs Wizard Framework due to a wizard is a very common scenery to gather values.
Nevertheless that data gathering service could be extended and you can extend it for example, to replace the UI using simple form instead of the default Wizard pages or just calling directly a web service without any UI.
To achieve that, you have to create your own implementation of a gathering service implementing the IValueGatheringService interface. That interface has an Execute method which receives an XmlElement that represents the inner XML chunk contained in the GatheringServiceData element as is showing in the following picture:
Note that I specified the ServiceType attribute which has the type of my own IValueGatheringService implementation. Basically what it's doing is getting the type attribute contained in the Form element and then it's trying to instantiate that type to show a simple winform.
One of the features in the latest July 2007 CTP version of GAX/GAT is the possibility to include switches in the installer execution at design time (that's the switches that will be added in the installutil execution when you register a GP through the Register GAT action, as show in the following picture).
So in addition of this feature we've included a new switch that able you to register the package in the Experimental Vs hive or any other one that you're working on just specifying the RegistrationSettings attributes in your guidance package manifest as follow...
Note that any switch specified in the registration settings will be added to the installutil command at design time but it won't take effect in your setup project or if you run the installutil by hand. In that case you will have to specify that switches by hand.
There are some parts that you could want to customize in the wizard page, unfortunately most of this part are not exposed. GAX wizard was implemented over the Visual Studio Wizard Framework and each page inherit from its WizardPage base class and the only thing that you can change is the logo through the Logo property and regarding the title you just can change the text, but no any other property.
So here you've a trick of how you could customize any Custom Wizard Page. Basically the idea is get the header panel that is docked at the top of each page, which contains the picture and label controls to change its properties in order to get something like following...


In the following snippet you can see how to get each control and how to change its properties. Note that you can access the controls collection after the InitializeComponent() was called and get each control through its Id.

More Posts