Esempio n. 1
0
 public RecentFilesList(MenuItem recentFilesDropdown, ControllerFiles controllerFiles)
 {
     RecentFilesDropdown = recentFilesDropdown;
     ControllerFiles = controllerFiles;
     var filepaths = Properties.Settings.Default.RecentFilepaths;
     for (int i = Math.Min(MAX_SIZE, filepaths.Count) - 1; i >= 0 ; i--)
     {
         InsertNewButton(filepaths[i]);
     }
     Update();
 }
Esempio n. 2
0
        public void GLControl_Load(object sender, EventArgs e)
        {
            ControllerEditor = new ControllerEditor(glControl.ClientSize, new Input(glControl));
            ControllerEditor.ScenePlayEvent += ControllerEditor_ScenePlayed;
            ControllerEditor.ScenePauseEvent += ControllerEditor_ScenePaused;
            ControllerEditor.SceneStopEvent += ControllerEditor_SceneStopped;
            ControllerEditor.Update += ControllerEditor_Update;

            ControllerFiles = new ControllerFiles(this, ControllerEditor, filesRecent);

            UpdateTransformLabels(null);

            PortalDepth.ValueChanged += IntegerUpDown_ValueChanged;
            PortalDepth.Value = 40;

            SetPortalRendering(true);

            ToolPanel.Initialize(ControllerEditor);
            PropertiesEditor.Initialize(ControllerEditor);
            Time.Initialize(ControllerEditor);

            Slider_ValueChanged(
                null,
                new RoutedPropertyChangedEventArgs<double>(ControllerEditor.physicsStepSize, ControllerEditor.physicsStepSize)
                );

            //Start the drawing loop last to make sure all listeners are in place.
            _loop = new GLLoop(glControl, ControllerEditor);
            _loop.Run(60);
        }