Beispiel #1
0
        public DDSSurface()
        {
            InitializeComponent();

            if (m_slimDXControl.DirectXStatus != DirectXStatus.Available)
            {
                if (m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_RemoteSession)
                {
                    throw new DDSException("DirectX not supported when using Remote Desktop");
                }
                if (m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_LowTier)
                {
                    throw new DDSException("Insufficient graphics acceleration on this machine");
                }
                else if (m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_MissingDirectX)
                {
                    throw new DDSException("DirectX libraries are missing or need to be updated");
                }
                else
                {
                    throw new DDSException(String.Format("Unable to start DirectX (reason unknown: {0})", (int)m_slimDXControl.DirectXStatus));
                }
            }
            m_renderEngine = new DDSRenderEngine(this);

            this.Loaded   += new RoutedEventHandler(Window_Loaded);
            this.Unloaded += new RoutedEventHandler(Window_Closed);
        }
Beispiel #2
0
        public DDSSurface()
        {
            InitializeComponent();

            if (m_slimDXControl.DirectXStatus != DirectXStatus.Available)
            {
                if (m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_RemoteSession)
                    throw new DDSException("DirectX not supported when using Remote Desktop");
                if (m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_LowTier)
                    throw new DDSException("Insufficient graphics acceleration on this machine");
                else if (m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_MissingDirectX)
                    throw new DDSException("DirectX libraries are missing or need to be updated");
                else
                    throw new DDSException(String.Format("Unable to start DirectX (reason unknown: {0})", (int)m_slimDXControl.DirectXStatus));
            }
            m_renderEngine = new DDSRenderEngine(this);

            this.Loaded += new RoutedEventHandler(Window_Loaded);
            this.Unloaded += new RoutedEventHandler(Window_Closed);
        }