Exemplo n.º 1
0
 private void 置底ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dataGridViewItems.SelectedRows != null)
     {
         ResultItemConfig item = (ResultItemConfig)dataGridViewItems.SelectedRows[0].DataBoundItem;
         list.Remove(item);
         list.Add(item);
         this.dataGridViewItems.DataSource = null;
         this.dataGridViewItems.DataSource = list;
     }
 }
Exemplo n.º 2
0
 private void  移ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dataGridViewItems.SelectedRows != null)
     {
         ResultItemConfig item = (ResultItemConfig)dataGridViewItems.SelectedRows[0].DataBoundItem;
         int index             = list.IndexOf(item);
         if (index == list.Count - 1)
         {
             return;
         }
         list.Remove(item);
         list.Insert(index + 1, item);
         this.dataGridViewItems.DataSource = null;
         this.dataGridViewItems.DataSource = list;
     }
 }