コード例 #1
0
        public ContentPreviewToolWindowControl()
        {
        	InitializeComponent();

			_contentBuilder = new ContentBuilder();
			/*_contentManager = new ContentManager(graphicsDeviceControl.Services, _contentBuilder.OutputDirectory);

        	Loaded += (sender, e) =>
        	{
        		_assetHandlers = new AssetHandlers(_contentManager, graphicsDeviceControl);
				_loaded = true;
        	};*/
        }
コード例 #2
0
		public void Initialize(XBuilderPackage package)
		{
			_package = package;
			graphicsDeviceControl.Initialize(_package);
			_contentBuilder = new ContentBuilder(package);
			_contentManager = new ContentManager(graphicsDeviceControl.Services, _contentBuilder.OutputDirectory);

			Loaded += (sender, e) =>
			{
				if (!_loaded) // Can't find a WPF event which only fires once when the window is FIRST loaded.
				{
					_assetHandlers = new AssetHandlers(_contentManager, graphicsDeviceControl);
					windowsFormsHost.Visibility = Visibility.Collapsed;
					_loaded = true;

					_assetHandlers.Initialize(package);
				}
			};
		}