private void upBtn_Click(object sender, EventArgs e)
{
int index = listBox1.SelectedIndex;
if (index == 0 || listBox1.SelectedItem == null)
return;
string dir = listBox1.SelectedItem.ToString();
listBox1.Items.RemoveAt(index);
listBox1.Items.Insert(index - 1, dir);
listBox1.SelectedIndex = index - 1;
modified = true;
ok.Enabled = apply.Enabled = modified;
}
}