private TilesetImageImportDialogViewModel PromptImage(BitmapSource image, string path)
        {
            var boxModel = new TilesetImageImportDialogViewModel(path);
            var box = new TilesetImageImportDialog();
            box.DataContext = boxModel;
            box.ShowDialog();

            if (box.Result == System.Windows.MessageBoxResult.OK)
                return boxModel;
            else
                return null;
        }
        private void AddImage(List<WriteableBitmap> tempTiles, BitmapSource image, string path)
        {
            var boxModel = new TilesetImageImportDialogViewModel(path);
            var box = new TilesetImageImportDialog();
            box.DataContext = boxModel;
            box.ShowDialog();

            if (box.Result == System.Windows.MessageBoxResult.OK)
            {
                ExtractImage(tempTiles, image, boxModel.Spacing, boxModel.Offset);
            }
        }
Example #3
0
        private TilesetImageImportDialogViewModel PromptImage(BitmapSource image, string path)
        {
            var boxModel = new TilesetImageImportDialogViewModel(path);
            var box      = new TilesetImageImportDialog();

            box.DataContext = boxModel;
            box.ShowDialog();

            if (box.Result == System.Windows.MessageBoxResult.OK)
            {
                return(boxModel);
            }
            else
            {
                return(null);
            }
        }