in Configurator/UI/Dialogs/InfoDialog.cs [1085:1150]
private void SetCommandAreaProperties(CommandAreaProperties commandAreaProperties)
{
if (commandAreaProperties == null)
{
commandAreaProperties = new CommandAreaProperties(CommandAreaProperties.ButtonsLayoutType.OkOnly);
}
_repositionButtons = false;
Button1Text = commandAreaProperties.Button1Text;
Button1DialogResult = commandAreaProperties.Button1DialogResult;
Button2Text = commandAreaProperties.Button2Text;
Button2DialogResult = commandAreaProperties.Button2DialogResult;
Button3Text = Button3IsMoreInfo
? (ExpandedState ? commandAreaProperties.MoreInfoExpandedButtonText : commandAreaProperties.MoreInfoCollapsedButtonText)
: commandAreaProperties.Button3Text;
Button3DialogResult = commandAreaProperties.Button3DialogResult;
_repositionButtons = true;
Button3IsMoreInfo = commandAreaProperties.Button3IsMoreInfo;
DefaultButton = commandAreaProperties.DefaultButton;
DefaultButtonTimeout = commandAreaProperties.DefaultButtonTimeout;
InfoCheckBoxText = commandAreaProperties.LeftAreaCheckBoxText;
InfoCheckBoxChecked = commandAreaProperties.LeftAreaCheckBoxChecked;
InfoComboBoxDataSource = commandAreaProperties.LeftAreaComboBoxDataSource;
InfoComboBoxWidth = commandAreaProperties.LeftAreaComboBoxWidth;
MoreInfoCollapsedButtonText = commandAreaProperties.MoreInfoCollapsedButtonText;
MoreInfoExpandedButtonText = commandAreaProperties.MoreInfoExpandedButtonText;
MoreInfoButton.Text = ExpandedState ? MoreInfoExpandedButtonText : MoreInfoCollapsedButtonText;
SameButtonWidths = commandAreaProperties.SameButtonWidths;
switch (commandAreaProperties.ButtonsLayout)
{
case CommandAreaProperties.ButtonsLayoutType.BackOnly:
case CommandAreaProperties.ButtonsLayoutType.OkOnly:
case CommandAreaProperties.ButtonsLayoutType.Generic1Button:
Button2Available = false;
Button3Available = false;
AcceptButton = Info1Button;
CancelButton = Info1Button;
break;
case CommandAreaProperties.ButtonsLayoutType.Generic2Buttons:
case CommandAreaProperties.ButtonsLayoutType.OkCancel:
case CommandAreaProperties.ButtonsLayoutType.YesNo:
Button2Available = true;
Button3Available = commandAreaProperties.Button3IsMoreInfo;
AcceptButton = Info2Button;
CancelButton = Info1Button;
break;
case CommandAreaProperties.ButtonsLayoutType.Generic3Buttons:
case CommandAreaProperties.ButtonsLayoutType.YesNoCancel:
Button2Available = true;
Button3Available = true;
AcceptButton = commandAreaProperties.ButtonsLayout == CommandAreaProperties.ButtonsLayoutType.YesNoCancel
? Info3Button
: null;
CancelButton = Info1Button;
break;
}
RepositionButtons();
MoreInfoButton.Visible = commandAreaProperties.LeftAreaControl == CommandAreaProperties.LeftAreaControlType.MoreInfoButton && !string.IsNullOrEmpty(MoreInfoText);
InfoCheckBox.Visible = commandAreaProperties.LeftAreaControl == CommandAreaProperties.LeftAreaControlType.InfoCheckBox && !string.IsNullOrEmpty(InfoCheckBoxText);
InfoComboBox.Visible = commandAreaProperties.LeftAreaControl == CommandAreaProperties.LeftAreaControlType.InfoComboBox && InfoComboBoxDataSource != null;
}