Esempio n. 1
0
        private void UpdateFoldersHistoryDropDown()
        {
            BtnImportSpriteSheet.DropDownItems.Clear();
            BtnImportSpriteSheetFromSeparateImages.DropDownItems.Clear();

            var historyDirectories = FoldersHistoryManager.GetHistoryFolders();

            if (historyDirectories != null)
            {
                foreach (var historyDirectory in historyDirectories)
                {
                    BtnImportSpriteSheet.DropDownItems.Add(historyDirectory);
                    BtnImportSpriteSheetFromSeparateImages.DropDownItems.Add(historyDirectory);
                }
            }
        }
Esempio n. 2
0
        private void MakeSpriteSheet(string path, bool addAnim)
        {
            Bitmap imageBitmap = new Bitmap(path);


            var spriteSheetData = ResourcesManager.LoadSpriteSheetImage(path, imageBitmap);

            imageBitmap.Dispose();

            var spriteSheet = new SpriteSheet(spriteSheetData.Texture)
            {
                Name     = spriteSheetData.Name,
                Id       = spriteSheetData.Id,
                FullPath = spriteSheetData.FullPath
            };

            _spriteSheets.Add(spriteSheet.Id, spriteSheet);

            ShowSpriteSheet(spriteSheet.Id);

            if (CurrentShownAnimation != null)
            {
                UnloadCurrentShownAnimation();
            }


            var eventArgs = new AppEventArgs
            {
                Type = EventType.AddedSpriteSheet,
                SpriteSheetModified = spriteSheet,
                AnimationModified   = null
            };


            MainWindow.UpdateBrowser(eventArgs);

            if (addAnim)
            {
                MakeAnimation();
            }


            FoldersHistoryManager.WriteFolderPath(path);
        }
Esempio n. 3
0
 private void RemoveFoldersHistory()
 {
     BtnImportSpriteSheet.DropDownItems.Clear();
     BtnImportSpriteSheetFromSeparateImages.DropDownItems.Clear();
     FoldersHistoryManager.EraseHistory();
 }