예제 #1
0
        private void Render(SyncVobData data)
        {
            dataGridView1.DataSource              = null;
            dataGridView1.DataSource              = data.AsTable();
            dataGridView1.AllowUserToAddRows      = false;
            dataGridView1.AllowUserToOrderColumns = false;
            dataGridView1.ReadOnly = true;
            dataGridView1.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
            for (int i = 1; i < dataGridView1.ColumnCount; i++)
            {
                dataGridView1.Columns[i].Width    = 80;
                dataGridView1.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable;
            }

            comboBox1.DataSource   = data.Vobs.ToList();
            comboBox1.SelectedItem = comboBox1.Items.Cast <string>().Where(s => s == data.VobName).First();
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            SyncVobData data = m_model.GetSyncVobDataForVob(comboBox1.SelectedItem.ToString());

            Render(data);
        }
예제 #3
0
 public void Show(SyncVobData data)
 {
     Render(data);
     Show();
 }