void ctlToolbar_MoveUp() { int index = lstScripts.SelectedIndex; Save(); if (index <= 0) { return; } m_controller.StartTransaction("Move script up"); m_scripts.Swap(index - 1, index); m_controller.EndTransaction(); SetSelectedIndex(index - 1); }