Defines the association between an MSI dialog control and the T:WixSharp.PublishingInfo.
상속: WixEntity
예제 #1
0
        /// <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);
        }
예제 #2
0
파일: CustomUI.cs 프로젝트: Eun/WixSharp
        /// <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;
        }