All pastes #212069 Raw Edit

Mine

public text v1 · immutable
#212069 ·published 2006-10-20 17:48 UTC
rendered paste body
private void ProfileSequenceList_DoubleClick(object sender, System.EventArgs e)
{
  string[] seq_cb;
  int idxSeq = -1;
  int idxCB = -1;

  // Fist find the name of the Sequence and the Callback
  seq_cb = ProfileSequenceList.Text.Split(" - ", StringSplitOptions.RemoveEmptyEntries);

  for(int i = 0; i < seq_cb.Length; i++)
    seq_cb[i] = seq_cb[i].Trim();

  idxSeq = AvailableSequenceList.FindStringExact(seq_cb[0]);
  idxCB = CallbackList.FindStringExact(seq_cb[2]);

  if(idxSeq != -1 && idxCB != -1)
  {
    AvailableSequenceList.SelectedIndex = idxSeq;
    CallbackList.SelectedIndex = idxCB;
  }
}