AGS.Editor.SpriteSelector.DeleteSelectedSprites C# (CSharp) Метод

DeleteSelectedSprites() приватный Метод

private DeleteSelectedSprites ( ) : void
Результат void
        private void DeleteSelectedSprites()
        {
            if (Factory.GUIController.ShowQuestion("Only delete this sprite(s) if you are ABSOLUTELY SURE it is not used AT ALL in your game. AGS cannot automatically detect usage of the sprite within room files or script function calls.\n\nAny parts of your game that do use this sprite will cause the editor and engine to crash if you go ahead. Are you sure?") == DialogResult.Yes)
            {
                foreach (ListViewItem listItem in spriteList.Items)
                {
                    if (listItem.Selected)
                    {
                        int spriteNum = Convert.ToInt32(listItem.Name);
                        Sprite sprite = FindSpriteByNumber(spriteNum);

                        try
                        {
                            Factory.AGSEditor.DeleteSprite(sprite);
                        }
                        catch (SpriteInUseException ex)
                        {
                            Factory.GUIController.ShowMessage(ex.Message, MessageBoxIcon.Warning);
                        }
                    }
                }
                RefreshSpriteDisplay();
            }
        }