示例#1
0
        /// <inheritdoc />
        IButton IDialogWindow.AddButton(string label, IActionHandler actionHandler, bool isDefault)
        {
            using (iFlowLayoutPanel.DeferLayout()) {
                MotoiButton button = new MotoiButton {
                    AutoSize = true, Text = label
                };
                ((IButton)button).ActionHandler = actionHandler;
                iFlowLayoutPanel.Controls.Add(button);

                if (isDefault)
                {
                    AcceptButton = button;
                }

                return(button);
            }
        }