示例#1
0
 private void LoadDataSource()
 {
     try
     {
         _blocks = BlockCollection.Load(Config.ConfigFolder + BlockCollection.BadBlocksFile);
         if (_blocks == null)
         {
             _blocks = new BlockCollection();
         }
     }
     catch
     {
         _blocks = new BlockCollection();
     }
     try
     {
         comboBoxItems.ValueMember   = "Value";
         comboBoxItems.DisplayMember = "Name";
         comboBoxItems.DataSource    = new BindingSource(ItemDictonary.GetInstance(), null);
     }
     catch
     {
     }
     dgvBadBlocks.DataSource = new BindingSource(_blocks, null);
 }
示例#2
0
 private void LoadDataSource()
 {
     try
     {
         comboBoxItems.ValueMember   = "Value";
         comboBoxItems.DisplayMember = "Name";
         comboBoxItems.DataSource    = new BindingSource(ItemDictonary.GetInstance(), null);
     }
     catch
     {
     }
     dgvBadBlocks.DataSource = new BindingSource(_blocks, null);
 }