Esempio n. 1
0
        private void showTable(BooleanFuntionWithInputDistortion table)
        {
            DataView v = TruthTableView.GetView(table);

            tableGridView.DataSource = v;
            foreach (DataGridViewRow row in tableGridView.Rows)
            {
                if (row.IsNewRow)
                {
                    continue;
                }
                row.HeaderCell.Value = String.Format("{0}", row.Index + 1);
            }
            tableGridView.AutoResizeRowHeadersWidth(
                DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders);
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            int size = 5;
            AdderTruthTableBuilder attBuilder     = new AdderTruthTableBuilder(size);
            AdderTruthTable        tt             = attBuilder.BuildTable();
            TruthTableView         truthTableView = new TruthTableView(tt);
            DataView v = truthTableView.GetView();

            tableGridView.DataSource = v;
            foreach (DataGridViewRow row in tableGridView.Rows)
            {
                if (row.IsNewRow)
                {
                    continue;
                }
                row.HeaderCell.Value = String.Format("{0}", row.Index + 1);
            }
            tableGridView.AutoResizeRowHeadersWidth(
                DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders);
        }