diff --git a/LegoArt/MainWindow.xaml.cs b/LegoArt/MainWindow.xaml.cs index 9bef9eb..0f397c4 100644 --- a/LegoArt/MainWindow.xaml.cs +++ b/LegoArt/MainWindow.xaml.cs @@ -57,7 +57,9 @@ namespace LegoArt { var d = new DataObject(DataFormats.Bitmap, scaledImage.Source, true); var bitmap = d.GetData(typeof(Bitmap)) as Bitmap; - BuildingInstructionService.PersistBuildingInstructions(bitmap, tbImagePath.Text); + var outputPath = BuildingInstructionService.PersistBuildingInstructions(bitmap, tbImagePath.Text); + MessageBox.Show($"Instructions saved to {outputPath}", "Saved", MessageBoxButton.OK, MessageBoxImage.Information); + } private void LoadImage(string path) diff --git a/LegoArtTool/BuildingInstructionService.cs b/LegoArtTool/BuildingInstructionService.cs index e02e561..7c28e1b 100644 --- a/LegoArtTool/BuildingInstructionService.cs +++ b/LegoArtTool/BuildingInstructionService.cs @@ -4,9 +4,9 @@ using System.IO; namespace LegoArtTool { - public class BuildingInstructionService + public static class BuildingInstructionService { - public static void PersistBuildingInstructions(Bitmap bitmap, string path) + public static string PersistBuildingInstructions(Bitmap bitmap, string path) { var segmentSize = bitmap.Width / 3; var outPutDirectory = CreateOutPutDirectory(path); @@ -21,6 +21,8 @@ namespace LegoArtTool segment.Save($"{outPutDirectory}/{segmentNumber++}.png", ImageFormat.Png); } } + + return outPutDirectory; } private static string CreateOutPutDirectory(string path)