public On ( |
||
dialog | The dialog. | |
control | string | The control. |
return |
/// <summary> /// Builds <see cref="T:WixSharp.CustomUI"/> instance and injects <see cref="T:WixSharp.Dialog"/> into the standard UI sequence /// just after <c>LicenceDialog</c> step. /// </summary> /// <param name="customDialog">The <see cref="T:WixSharp.Dialog"/> dialog to be injected.</param> /// <param name="onNextActions">The on next actions.</param> /// <param name="onBackActions">The on back actions.</param> /// <param name="onCancelActions">The on cancel actions.</param> /// <returns><see cref="T:WixSharp.CustomUI"/> instance.</returns> public static CustomUI BuildPostLicenseDialogUI(Dialog customDialog, DialogAction[] onNextActions = null, DialogAction[] onBackActions = null, DialogAction[] onCancelActions = null) { var customUI = new CustomUI(); customUI.CustomDialogs.Add(customDialog); customUI.On(NativeDialogs.ExitDialog, Buttons.Finish, new CloseDialog() { Order = 9999 }); customUI.On(NativeDialogs.WelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Back, new ShowDialog(NativeDialogs.WelcomeDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Next, new ShowDialog(customDialog, "LicenseAccepted = \"1\"")); customUI.On(customDialog, Buttons.Back, onBackActions ?? new DialogAction[] { new ShowDialog(NativeDialogs.LicenseAgreementDlg) }); customUI.On(customDialog, Buttons.Next, onNextActions ?? new DialogAction[] { new ShowDialog(NativeDialogs.InstallDirDlg) }); customUI.On(customDialog, Buttons.Cancel, onCancelActions ?? new DialogAction[] { new CloseDialog("Exit") }); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Back, new ShowDialog(customDialog)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Next, new SetTargetPath(), new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.ChangeFolder, new SetProperty("_BrowseProperty", "[WIXUI_INSTALLDIR]"), new ShowDialog(CommonDialogs.BrowseDlg)); customUI.On(NativeDialogs.VerifyReadyDlg, Buttons.Back, new ShowDialog(NativeDialogs.InstallDirDlg, Condition.NOT_Installed), new ShowDialog(NativeDialogs.MaintenanceTypeDlg, Condition.Installed)); customUI.On(NativeDialogs.MaintenanceWelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.MaintenanceTypeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Back, new ShowDialog(NativeDialogs.MaintenanceWelcomeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Repair, new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Remove, new ShowDialog(NativeDialogs.VerifyReadyDlg)); return(customUI); }
/// <summary> /// Builds <see cref="T:WixSharp.CustomUI"/> instance and injects <see cref="T:WixSharp.Dialog"/> into the standard UI sequence /// just after <c>LicenceDialog</c> step. /// </summary> /// <param name="customDialog">The <see cref="T:WixSharp.Dialog"/> dialog to be injected.</param> /// <param name="onNextActions">The on next actions.</param> /// <param name="onBackActions">The on back actions.</param> /// <param name="onCancelActions">The on cancel actions.</param> /// <returns><see cref="T:WixSharp.CustomUI"/> instance.</returns> public static CustomUI BuildPostLicenseDialogUI(Dialog customDialog, DialogAction[] onNextActions = null, DialogAction[] onBackActions = null, DialogAction[] onCancelActions = null) { var customUI = new CustomUI(); customUI.CustomDialogs.Add(customDialog); customUI.On(NativeDialogs.ExitDialog, Buttons.Finish, new CloseDialog() { Order = 9999 }); customUI.On(NativeDialogs.WelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.LicenseAgreementDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Back, new ShowDialog(NativeDialogs.WelcomeDlg)); customUI.On(NativeDialogs.LicenseAgreementDlg, Buttons.Next, new ShowDialog(customDialog, "LicenseAccepted = \"1\"")); customUI.On(customDialog, Buttons.Back, onBackActions ?? new DialogAction[] { new ShowDialog(NativeDialogs.LicenseAgreementDlg) }); customUI.On(customDialog, Buttons.Next, onNextActions ?? new DialogAction[] { new ShowDialog(NativeDialogs.InstallDirDlg) }); customUI.On(customDialog, Buttons.Cancel, onCancelActions ?? new DialogAction[] { new CloseDialog("Exit") }); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Back, new ShowDialog(customDialog)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.Next, new SetTargetPath(), new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.InstallDirDlg, Buttons.ChangeFolder, new SetProperty("_BrowseProperty", "[WIXUI_INSTALLDIR]"), new ShowDialog(CommonDialogs.BrowseDlg)); customUI.On(NativeDialogs.VerifyReadyDlg, Buttons.Back, new ShowDialog(NativeDialogs.InstallDirDlg, Condition.NOT_Installed), new ShowDialog(NativeDialogs.MaintenanceTypeDlg, Condition.Installed)); customUI.On(NativeDialogs.MaintenanceWelcomeDlg, Buttons.Next, new ShowDialog(NativeDialogs.MaintenanceTypeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Back, new ShowDialog(NativeDialogs.MaintenanceWelcomeDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Repair, new ShowDialog(NativeDialogs.VerifyReadyDlg)); customUI.On(NativeDialogs.MaintenanceTypeDlg, Buttons.Remove, new ShowDialog(NativeDialogs.VerifyReadyDlg)); return customUI; }