private void ChangeElementOrder(int nChange) { if (0 == listViewElements.SelectedItems.Count) { return; } #if !MONO_BUILD Win32.SetRedraw(listViewElements.Handle, false); #endif ListViewAssist.MoveListViewItems(listViewElements, nChange); #if !MONO_BUILD Win32.SetRedraw(listViewElements.Handle, true); #endif listViewElements.Invalidate(); listViewElements.SelectedItems[0].EnsureVisible(); var listElements = new List <ProjectLayoutElement>(); foreach (ListViewItem zLvi in listViewElements.Items) { listElements.Add((ProjectLayoutElement)zLvi.Tag); } // UserAction SetupLayoutUndo(listElements); LayoutManager.Instance.ActiveLayout.Element = listElements.ToArray(); LayoutManager.Instance.FireLayoutUpdatedEvent(true); }
private void btnMoveUp_Click(object sender, EventArgs e) { ListViewAssist.MoveListViewItems(listViewCards, -1); }