public frmShadowSpritePackBrowser(string title)
        {
            InitializeComponent();

            this.loadedSSPK = new CShadowSpritePack();

            this.Text = WindowManager.GetTitle(title, WindowManager.WindowType.SSPKWindow);
        }
        /// <summary>
        /// Loads a Shadow Sprite Pack from an existing file.
        /// </summary>
        /// <param name="filename">The path of the shadow sprite pack file (.sspk)</param>
        /// <returns></returns>
        public static CShadowSpritePack LoadFromFile(string filename)
        {
            DirectoryInfo dir = new DirectoryInfo(filename);

            CShadowSpritePack sspk;

            FileStream filestream = File.Open(filename, FileMode.Open);

            sspk = new CShadowSpritePack(ref filestream, dir.Name);

            filestream.Close();

            return sspk;
        }
        /// <summary>
        /// Loads a Shadow Sprite Pack from an existing file.
        /// </summary>
        /// <param name="filename">The path of the shadow sprite pack file (.sspk)</param>
        /// <returns></returns>
        public static CShadowSpritePack LoadFromFile(string filename)
        {
            DirectoryInfo dir = new DirectoryInfo(filename);

            CShadowSpritePack sspk;

            FileStream filestream = File.Open(filename, FileMode.Open);


            sspk = new CShadowSpritePack(ref filestream, dir.Name);

            filestream.Close();

            return(sspk);
        }
        public frmShadowSpritePackBrowser(CShadowSpritePack sspk, string filename)
        {
            InitializeComponent();

            loadedSSPK = sspk;
            dirInfo = new DirectoryInfo(filename);
            Text = WindowManager.GetTitle(dirInfo.Name, WindowManager.WindowType.SPKWindow);

            Image[] imgs = new Image[loadedSSPK.Sprites.Count];

            pbSprite.Image = loadedSSPK.Sprites[0].ToImage();

            foreach (CShadowSprite spr in loadedSSPK.Sprites)
            {
                lbSprites.Items.Add(spr.Name);
            }

            lbSprites.SelectedIndices.Add(0);

            UpdateStatusLabel();
        }