示例#1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            this.Text += " v" + FlummeryApplication.Version;

            var inputManager = new InputManager();

            var overview  = new pnlOverview();
            var viewport  = new pnlViewport();
            var materials = new pnlMaterialList();
            var details   = new pnlDetails();

            viewport.Show(dockPanel, DockState.Document);
            materials.Show(dockPanel, DockState.DockBottom);
            overview.Show(dockPanel, DockState.DockLeft);
            details.Show(dockPanel, DockState.DockRight);

            var extensions = new List <string>(GL.GetString(StringName.Extensions).Split(' '));

            SceneManager.Create(extensions.Contains("GL_ARB_vertex_buffer_object"));

            dockPanel.DockLeftPortion   = 300;
            dockPanel.DockRightPortion  = 315;
            dockPanel.DockBottomPortion = 105;

            viewport.RegisterEventHandlers();
            overview.RegisterEventHandlers();
            materials.RegisterEventHandlers();
            details.RegisterEventHandlers();

            ToxicRagers.Helpers.Logger.ResetLog();

            SetActionScalingText("Action Scaling: 1.000");

            this.KeyPreview = true;
            this.KeyPress  += new KeyPressEventHandler(frmMain_KeyPress);

            SceneManager.Current.OnProgress += scene_OnProgress;
            SceneManager.Current.OnError    += scene_OnError;
            SceneManager.Current.SetCoordinateSystem(SceneManager.CoordinateSystem.LeftHanded);

            if (Properties.Settings.Default.CheckForUpdates)
            {
                checkUpdate();
            }

            SceneManager.Current.SetContext(ContextGame.Carmageddon_Reincarnation, ContextMode.Car);

            FlummeryApplication.UI = this;
        }
示例#2
0
        private void menuViewClick(object sender, EventArgs e)
        {
            ToolStripMenuItem mi = (ToolStripMenuItem)sender;

            switch (mi.Text)
            {
            case "Preferences":
                if (new frmPreferences().ShowDialog(this) == DialogResult.OK)
                {
                    InputManager.Current.ReloadBindings();
                }
                break;

            case "Details":
                if (!dockPanel.Contents.Any(p => (p as DockContent).Text == mi.Text))
                {
                    var details = new pnlDetails();
                    details.Show(dockPanel, DockState.DockRight);
                    details.RegisterEventHandlers();
                }
                break;

            case "Material List":
                if (!dockPanel.Contents.Any(p => (p as DockContent).Text == mi.Text))
                {
                    var materials = new pnlMaterialList();
                    materials.Show(dockPanel, DockState.DockBottom);
                    materials.RegisterEventHandlers();
                }
                break;

            case "Overview":
                if (!dockPanel.Contents.Any(p => (p as DockContent).Text == mi.Text))
                {
                    var overview = new pnlOverview();
                    overview.Show(dockPanel, DockState.DockLeft);
                    overview.RegisterEventHandlers();
                }
                break;
            }
        }
示例#3
0
        private void menuViewClick(object sender, EventArgs e)
        {
            ToolStripMenuItem mi = (ToolStripMenuItem)sender;

            switch (mi.Text)
            {
                case "Preferences":
                    if (new frmPreferences().ShowDialog(this) == DialogResult.OK)
                    {
                        InputManager.Current.ReloadBindings();
                    }
                    break;

                case "Details":
                    if (!dockPanel.Contents.Any(p => (p as DockContent).Text == mi.Text))
                    {
                        var details = new pnlDetails();
                        details.Show(dockPanel, DockState.DockRight);
                        details.RegisterEventHandlers();

                    }
                    break;

                case "Material List":
                    if (!dockPanel.Contents.Any(p => (p as DockContent).Text == mi.Text))
                    {
                        var materials = new pnlMaterialList();
                        materials.Show(dockPanel, DockState.DockBottom);
                        materials.RegisterEventHandlers();

                    }
                    break;

                case "Overview":
                    if (!dockPanel.Contents.Any(p => (p as DockContent).Text == mi.Text))
                    {
                        var overview = new pnlOverview();
                        overview.Show(dockPanel, DockState.DockLeft);
                        overview.RegisterEventHandlers();
                    }
                    break;
            }
        }
示例#4
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            this.Text += " v" + FlummeryApplication.Version;

            var inputManager = new InputManager();

            var overview = new pnlOverview();
            var viewport = new pnlViewport();
            var materials = new pnlMaterialList();
            var details = new pnlDetails();

            viewport.Show(dockPanel, DockState.Document);
            materials.Show(dockPanel, DockState.DockBottom);
            overview.Show(dockPanel, DockState.DockLeft);
            details.Show(dockPanel, DockState.DockRight);

            var extensions = new List<string>(GL.GetString(StringName.Extensions).Split(' '));
            SceneManager.Create(extensions.Contains("GL_ARB_vertex_buffer_object"));

            dockPanel.DockLeftPortion = 300;
            dockPanel.DockRightPortion = 315;
            dockPanel.DockBottomPortion = 105;

            viewport.RegisterEventHandlers();
            overview.RegisterEventHandlers();
            materials.RegisterEventHandlers();
            details.RegisterEventHandlers();

            ToxicRagers.Helpers.Logger.ResetLog();

            SetActionScalingText("Action Scaling: 1.000");

            this.KeyPreview = true;
            this.KeyPress += new KeyPressEventHandler(frmMain_KeyPress);

            SceneManager.Current.OnProgress += scene_OnProgress;
            SceneManager.Current.OnError += scene_OnError;
            SceneManager.Current.SetCoordinateSystem(SceneManager.CoordinateSystem.LeftHanded);

            if (Properties.Settings.Default.CheckForUpdates) { checkUpdate(); }

            SceneManager.Current.SetContext(ContextGame.Carmageddon_Reincarnation, ContextMode.Car);

            FlummeryApplication.UI = this;
        }