Ejemplo n.º 1
0
        public WpfWindow()
        {
            InitializeComponent();

            if (m_slimDXControl.DirectXStatus != DirectXStatus.Available)
            {
                MouseDown -= MouseDownHandler;

                if (m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_RemoteSession)
                {
                    MessageBox.Show("DirectX not supported when using Remote Desktop", "Error intializing DirectX");
                    System.Environment.Exit(1);
                }
                else if (m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_LowTier)
                {
                    MessageBox.Show("Insufficient graphics acceleration on this machine", "Error intializing DirectX");
                    System.Environment.Exit(1);
                }
                else if (m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_MissingDirectX)
                {
                    MessageBox.Show("DirectX libraries are missing or need to be updated", "Error intializing DirectX");
                    System.Environment.Exit(1);
                }
                else
                {
                    MessageBox.Show("Unable to start DirectX (reason unknown)", "Error intializing DirectX");
                    System.Environment.Exit(1);
                }
                return;
            }

            m_dataModel    = new MyDataModel(m_slimDXControl, "lizard", System.Drawing.Color.Blue);
            m_renderEngine = new MyRenderEngine(m_dataModel);

            this.Loaded += new RoutedEventHandler(Window_Loaded);
            this.Closed += new EventHandler(Window_Closed);
        }
Ejemplo n.º 2
0
		public WpfWindow()
		{
			InitializeComponent();

			if(m_slimDXControl.DirectXStatus != DirectXStatus.Available)
			{
				MouseDown -= MouseDownHandler;

				if(m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_RemoteSession)
				{
					MessageBox.Show("DirectX not supported when using Remote Desktop", "Error intializing DirectX");
					System.Environment.Exit(1);
				}
				else if(m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_LowTier)
				{
					MessageBox.Show("Insufficient graphics acceleration on this machine", "Error intializing DirectX");
					System.Environment.Exit(1);
				}
				else if(m_slimDXControl.DirectXStatus == DirectXStatus.Unavailable_MissingDirectX)
				{
					MessageBox.Show("DirectX libraries are missing or need to be updated", "Error intializing DirectX");
					System.Environment.Exit(1);
				}
				else
				{
					MessageBox.Show("Unable to start DirectX (reason unknown)", "Error intializing DirectX");
					System.Environment.Exit(1);
				}
				return;
			}

			m_dataModel = new MyDataModel(m_slimDXControl, "lizard", System.Drawing.Color.Blue);
			m_renderEngine = new MyRenderEngine(m_dataModel);

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