Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TablistDialog" /> class.
        /// </summary>
        /// <param name="caption">The caption.</param>
        /// <param name="button1">The text on the left button.</param>
        /// <param name="button2">The text on the right button. If the value is <c>null</c>, the right button is hidden.</param>
        /// <param name="columnCount">The number of columns in this dialog.</param>
        public TablistDialog(string caption, string button1, string button2, int columnCount)
        {
            if (columnCount < 1)
            {
                throw new ArgumentException("Dialog must contain at least 1 column.", nameof(columnCount));
            }

            Caption     = caption;
            Button1     = button1;
            Button2     = button2;
            ColumnCount = columnCount;
            Rows        = new TablistDialogRowCollection(columnCount);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TablistDialog" /> class.
 /// </summary>
 /// <param name="caption">The caption.</param>
 /// <param name="button1">The text on the left button.</param>
 /// <param name="button2">The text on the right button. If the value is <c>null</c>, the right button is hidden.</param>
 /// <param name="columnHeaders">The column headers.</param>
 public TablistDialog(string caption, string button1, string button2, string[] columnHeaders)
 {
     if (columnHeaders == null)
     {
         throw new ArgumentNullException(nameof(columnHeaders));
     }
     if (columnHeaders.Length < 1)
     {
         throw new ArgumentException("Dialog must contain at least 1 column.", nameof(columnHeaders));
     }
     Caption     = caption;
     Button1     = button1;
     Button2     = button2;
     ColumnCount = columnHeaders.Length;
     Rows        = new TablistDialogRowCollection(columnHeaders.Length);
     Header      = new TablistDialogRow(columnHeaders);
 }