Defines the association between an MSI dialog control and the T:WixSharp.PublishingInfo.
Inheritance: 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;
        }