public void Delete() { FinishMouseEvent(); var frame = _Editor.CurrentFrame; if (frame != null) { var list = _SelectedMultiple.Select(b => b.Index).OrderBy(i => - i).ToArray(); //remove in reversed order foreach (var i in list) { GetBoxListFromFrame(frame).RemoveAt(i); } } ClearSelected(); BoxData.ResetDataList(); }
public void Paste(object data) { FinishMouseEvent(); var list = data as List <Pat.Box>; if (list == null) { return; } ClearSelected(); var frame = _Editor.CurrentFrame; if (frame != null) { var boxList = GetBoxListFromFrame(frame); int startIndex = boxList.Count; boxList.AddRange(list); BoxData.ResetDataList(); for (int i = startIndex; i < boxList.Count; ++i) { AppendSelected(BoxData.DataList[i]); } } }