示例#1
0
 public void Undo()
 {
     if (frames.Count < 2)
     {
         frames.Clear();
         frames.Add(new Frame());
     }
     else if (postChangeSelection != null)
     {
         int addedFrameIndex = postChangeSelection.SelectedFrames[0];
         frames.RemoveAt(addedFrameIndex);
         if (addedFrameIndex > 0)
         {
             ModHelper.SetSingleSelection(frameListBox, addedFrameIndex - 1);
         }
     }
 }
示例#2
0
        public void Do()
        {
            removedSprite = sprites[removeIndex];

            if (sprites.Count == 1)
            {
                sprites.Clear();
            }
            else
            {
                sprites.RemoveAt(removeIndex);
            }

            if (sprites.Count > -1 && spriteListBox.SelectedIndex > sprites.Count - 1)
            {
                ModHelper.SetSingleSelection(spriteListBox, sprites.Count - 1);
            }
        }
        public void Do()
        {
            removedFrame = frames[removeIndex];

            if (frames.Count == 1)
            {
                frames.Clear();
                frames.Add(new Frame());
            }
            else
            {
                frames.RemoveAt(removeIndex);
            }

            if (frames.Count > -1 && frameListBox.SelectedIndex > frames.Count - 1)
            {
                ModHelper.SetSingleSelection(frameListBox, frames.Count - 1);
            }
        }