Skip to content

Commit

Permalink
- Added sample for "Issue #1218: Dynamic custom UI sequence"
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-shilo committed Oct 19, 2022
1 parent 4d650e8 commit 0d9f877
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,25 @@ static void Project_UILoaded(SetupEventArgs e)
e.ManagedUI.OnCurrentDialogChanged += ManagedUIShell_OnCurrentDialogChanged;
}

static Type LastDialog;

static void ManagedUIShell_OnCurrentDialogChanged(IManagedDialog obj)
{
var prevDialog = LastDialog;
LastDialog = obj.GetType();

if (obj.GetType() == Dialogs.Licence)
{
// Simulate analyzing the runtime conditions with the message box.
// Make a decision to jump over the dialog in the sequence
if (MessageBox.Show("Do you want to skip 'Licence Dialog'?", "Wix#", MessageBoxButtons.YesNo) == DialogResult.Yes)
obj.Shell.GoNext();
{
if (prevDialog == Dialogs.Welcome)
obj.Shell.GoNext();
else
obj.Shell.GoPrev();
}
}
}

static void CheckCompatibility(SetupEventArgs e)
Expand Down

0 comments on commit 0d9f877

Please sign in to comment.