Category: PC Games; Category: REPACK-KaOs;. Description: THE game that killed the myth that pc games have to be fat and slow, and still holds its own on a tablet.Q:
Create a custom wizard
I would like to create a custom wizard, which is somewhat similar to the Setup Wizard (found on the first screen).
The only think I found on this matter is these sites. They suggest the use of the visual studio wizard. But I have a different approach:
My user is working on a database and I would like to present her with the database schema and the data before creating a new object. Therefore I would like to avoid the windows of visual studio.
I'd like to know which is the better approach to implement this feature.
A:
You could create a custom WizardPage which contains the User Interface of your wizard. You could start the wizard with the constructor of your custom page (constructor(Parent Wizard) as this page is "dumb" and cannot do anything on it's own. The reason for the name "dumb" is, that you could eventually pass a reference to your original wizard through the constructor, and just do your work from there.
Something like this:
public class MyWizard : Wizard
{
private Wizard m_MyWizard;
public MyWizard(Wizard myWizard) : base(myWizard)
{
m_MyWizard = myWizard;
}
protected override void CreateNewPage(WizardNavigationContext context)
{
if (context.IsValidPageType(typeof(MyPage)))
{
MyPage page = (MyPage)context.GetObject();
page.MyWizard = this;
page.Initialize();
base.CreateNewPage(context);
}
}
protected override void ActivatePage(WizardPage page)
{ be359ba680
Related links:
Comments