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;
        }
Пример #2
0
        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);
            }
        }
Пример #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);
            }
        }