static void ManagedUIShell_OnCurrentDialogChanged(IManagedDialog obj) { 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(); } } }
private static void ManagedUI_OnCurrentDialogChanged(IManagedDialog obj) { if (obj.GetType() == Dialogs.InstallScope) { //Somehow the layout if InstallScope is really different from the rest //This mess is an attempt to fix the mess temporarily obj._Control("tableLayoutPanel1").Size = new System.Drawing.Size(491, 43); obj._Control("back").SetBounds(222, 10, 77, 23); obj._Control("next").SetBounds(305, 10, 77, 23); obj._Control("cancel").SetBounds(402, 86, 77, 23); var upShift = (int)(obj._Control("next").Height * 2.3) - obj._Control("bottomPanel").Height; obj._Control("bottomPanel").Top -= upShift; obj._Control("bottomPanel").Height += upShift; obj._Control("middlePanel").Top = obj._Control("topBorder").Bottom + 5; obj._Control("middlePanel").Height = (obj._Control("bottomPanel").Top - 5) - obj._Control("middlePanel").Top; } else if (obj.GetType() == Dialogs.MaintenanceType) { obj._Control("change").Enabled = false; } }