示例#1
0
        private void FrmTable_Load(object sender, EventArgs e)
        {
            if (_table == null)
            {
                throw new ArgumentNullException("Table");
            }

            LsvFields.Tag = _table;

            this.Text = _table.ToString();
            ListViewItem lvi;
            foreach (FieldData field in _table.Fields)
            {
                lvi = new ListViewItem(field.ToString());
                lvi.Tag = field;
                this.LsvFields.Items.Add(lvi);
            }

            TablePanel pnl = this.Parent as TablePanel;

            if (pnl != null)
            {
                _parentPanel = pnl;
            }

            LsvFields.Height = _table.Fields.Count * 17 + 20;
        }
示例#2
0
文件: FrmTable.cs 项目: rotorliu/demo
        private void FrmTable_Load(object sender, EventArgs e)
        {
            if (_table == null)
            {
                throw new ArgumentNullException("Table");
            }

            LsvFields.Tag = _table;

            this.Text = _table.ToString();
            ListViewItem lvi;

            foreach (FieldData field in _table.Fields)
            {
                lvi     = new ListViewItem(field.ToString());
                lvi.Tag = field;
                this.LsvFields.Items.Add(lvi);
            }

            TablePanel pnl = this.Parent as TablePanel;

            if (pnl != null)
            {
                _parentPanel = pnl;
            }

            LsvFields.Height = _table.Fields.Count * 17 + 20;
        }