Esempio n. 1
0
        public void Run()
        {
            if (_graphics != null)
            {
                _graphics.Form.Close();
            }
            _graphics = LibraryManager.GetGraphics(this);

            _input   = new Input(Graphics.Form);
            Freelook = new FreeLook(_input);

            _graphics.Initialize();
            OnInitialize();
            if (World == null)
            {
                OnInitializePhysics();
            }
            _graphics.UpdateView();

            clock.Start();
            _graphics.Run();
        }
Esempio n. 2
0
        public LibrarySelection()
        {
            InitializeComponent();

            AcceptButton = runButton;
            CancelButton = cancelButton;

            string[] supportedLibraries = LibraryManager.GetSupportedLibraries();
            int      selectLibrary      = 0;

            foreach (string library in supportedLibraries)
            {
                if (LibraryManager.IsLibraryAvailable(library))
                {
                    int index = libraryList.Items.Add(library);
                    logText.Text += library + " OK\r\n";
                    if (library.Equals(LibraryManager.GraphicsLibraryName))
                    {
                        selectLibrary = index;
                    }
                }
                else
                {
                    logText.Text += library + " not loaded\r\n";
                }
            }

            if (libraryList.Items.Count != 0)
            {
                runButton.Enabled         = true;
                libraryList.SelectedIndex = selectLibrary;
            }
            LibraryManager.GraphicsLibraryName = null;

            libraryList.DoubleClick += new EventHandler(libraryList_DoubleClick);
        }