/// <summary>
 ///  Initialize a new instance of the KryptonTaskDialog class.
 /// </summary>
 public KryptonTaskDialog()
 {
     RadioButtons   = new KryptonTaskDialogCommandCollection();
     CommandButtons = new KryptonTaskDialogCommandCollection();
     _commonButtons = TaskDialogButtons.OK;
     _textExtra     = @"Ctrl+C to copy";
 }
Beispiel #2
0
        /// <summary>
        /// Initialize a new instance of the VisualTaskDialog class.
        /// </summary>
        /// <param name="taskDialog">Reference to component with definition of content.</param>
        public VisualTaskDialog(KryptonTaskDialog taskDialog)
        {
            // Must provide a valid reference
            if (taskDialog == null)
                throw new ArgumentNullException("taskDialog");

            _taskDialog = taskDialog;

            // Initialize with task dialog values
            _windowTitle = taskDialog.WindowTitle;
            _mainInstruction = taskDialog.MainInstruction;
            _content = taskDialog.Content;
            _mainIcon = taskDialog.Icon;
            _customMainIcon = taskDialog.CustomIcon;
            _radioButtons = taskDialog.RadioButtons;
            _commandButtons = taskDialog.CommandButtons;
            _commonButtons = taskDialog.CommonButtons;
            _defaultRadioButton = taskDialog.DefaultRadioButton;
            _defaultButton = taskDialog.DefaultButton;
            _footerIcon = taskDialog.FooterIcon;
            _customFooterIcon = taskDialog.CustomFooterIcon;
            _footerText = taskDialog.FooterText;
            _footerHyperlink = taskDialog.FooterHyperlink;
            _checkboxText = taskDialog.CheckboxText;
            _checkboxState = taskDialog.CheckboxState;
            _allowDialogClose = taskDialog.AllowDialogClose;

            InitializeComponent();
            UpdateContents();
        }
 /// <summary>
 ///  Initialize a new instance of the KryptonTaskDialog class.
 /// </summary>
 public KryptonTaskDialog()
 {
     _radioButtons = new KryptonTaskDialogCommandCollection();
     _commandButtons = new KryptonTaskDialogCommandCollection();
     _commonButtons = TaskDialogButtons.OK;
 }