Пример #1
0
        public TexturePreviewController(TexturePreviewView view)
        {
            _view                 = view;
            _view.SaveClicked    += View_SaveClicked;
            _view.SaveAllClicked += View_SaveAllClicked;
            _view.Disposed       += View_Disposed;

            _textureViewController = new TextureViewController(view.TextureView);
        }
        public TexturePreviewController(TexturePreviewView view)
        {
            _view = view;
            _view.SaveClicked += View_SaveClicked;
            _view.SaveAllClicked += View_SaveAllClicked;
            _view.Disposed += View_Disposed;

            _textureViewController = new TextureViewController(view.TextureView);
        }
Пример #3
0
        public Control GetView(RageLib.FileSystem.Common.File file)
        {
            var data = file.GetData();

            var ms = new MemoryStream(data);
            var textureFile = new TextureFile();
            try
            {
                textureFile.Open(ms);
            }
            finally
            {
                ms.Close();
            }

            var view = new TexturePreviewView();
            var controller = new TexturePreviewController(view);
            controller.TextureFile = textureFile;

            return view;
        }