/// <summary> /// Defines the WiX Dialog UI control Action (event handler). /// <code> /// customUI.On(Dialogs.WelcomeDlg, Buttons.Next, new ShowDialog(Dialogs.LicenseAgreementDlg)); /// </code> /// </summary> /// <param name="dialog">The dialog.</param> /// <param name="control">The control.</param> /// <param name="handlers">The handlers.</param> /// <returns></returns> public CustomUI On(string dialog, string control, params DialogAction[] handlers) { var actionInfo = UISequence.Where(x => x.Dialog == dialog && x.Control == control) .Select(x => x) .FirstOrDefault(); if (actionInfo == null) { UISequence.Add(actionInfo = new PublishingInfo { Dialog = dialog, Control = control }); } actionInfo.Actions.AddRange(handlers); return(this); }
/// <summary> /// Defines the WiX Dialog UI control Action (event handler). /// <code> /// customUI.On(Dialogs.WelcomeDlg, Buttons.Next, new ShowDialog(Dialogs.LicenseAgreementDlg)); /// </code> /// </summary> /// <param name="dialog">The dialog.</param> /// <param name="control">The control.</param> /// <param name="handlers">The handlers.</param> /// <returns></returns> public CustomUI On(string dialog, string control, params DialogAction[] handlers) { var actionInfo = UISequence.Where(x => x.Dialog == dialog && x.Control == control) .Select(x => x) .FirstOrDefault(); if (actionInfo == null) { UISequence.Add(actionInfo = new PublishingInfo { Dialog = dialog, Control = control }); } actionInfo.Actions.AddRange(handlers); return this; }