Ejemplo n.º 1
0
        private void SetupContextMenu()
        {
            EditorStateBinder binder = EditorStateBinder.FromState(this.EditorState);

            binder.BindToolStripMenuItemAsRadioButton(this.selectionModePointsToolStripMenuItem, PROP(s => s.SelectionMode), SelectMode.Point, false);
            binder.BindToolStripMenuItemAsRadioButton(this.selectionModeLinesToolStripMenuItem, PROP(s => s.SelectionMode), SelectMode.Line, false);
            binder.BindToolStripMenuItemAsRadioButton(this.selectionModeSidesToolStripMenuItem, PROP(s => s.SelectionMode), SelectMode.Side, false);
            binder.BindToolStripMenuItemAsRadioButton(this.selectionModeSegmentsToolStripMenuItem, PROP(s => s.SelectionMode), SelectMode.Segment, false);
            binder.BindToolStripMenuItemAsRadioButton(this.selectionModeObjectsToolStripMenuItem, PROP(s => s.SelectionMode), SelectMode.Object, false);
            binder.BindToolStripMenuItemAsRadioButton(this.selectionModeBlocksToolStripMenuItem, PROP(s => s.SelectionMode), SelectMode.Block, false);
            binder.BindToolStripMenuItemAsRadioButton(this.selectionCandidatesOffToolStripMenuItem, PROP(s => s.SavedPrefs.QuickSelectionCandidates), QuickSelectionCandidateMode.Off, false);
            binder.BindToolStripMenuItemAsRadioButton(this.selectionCandidatesCirclesToolStripMenuItem, PROP(s => s.SavedPrefs.QuickSelectionCandidates), QuickSelectionCandidateMode.Circles, false);
            binder.BindToolStripMenuItemAsRadioButton(this.selectionCandidatesFullToolStripMenuItem, PROP(s => s.SavedPrefs.QuickSelectionCandidates), QuickSelectionCandidateMode.Full, false);
            binder.BindToolStripMenuItemAsCheckBox(this.enableQuickSelectionToolStripMenuItem, PROP(s => s.SavedPrefs.EnableQuickSelection), false);
            binder.BindToolStripMenuItemAsCheckBox(this.moveAlongViewerAxesToolStripMenuItem, PROP(s => s.SavedPrefs.ElementMovementReferenceFormatted), false);
        }
Ejemplo n.º 2
0
        private void SetupViewMenu(EditorStateBinder binder)
        {
            binder.BindToolStripMenuItemAsRadioButton <RenderDisplayMode>(this.partialLinesToolStripMenuItem, PROP(s => s.ViewMode), RenderDisplayMode.SparseWireframe, false);
            binder.BindToolStripMenuItemAsRadioButton <RenderDisplayMode>(this.allLinesToolStripMenuItem, PROP(s => s.ViewMode), RenderDisplayMode.FullWireframe, false);
            binder.BindToolStripMenuItemAsRadioButton <RenderDisplayMode>(this.textureAndWireframeToolStripMenuItem, PROP(s => s.ViewMode), RenderDisplayMode.TextureAndWireframe, false);
            binder.BindToolStripMenuItemAsRadioButton <RenderDisplayMode>(this.textureMappedToolStripMenuItem, PROP(s => s.ViewMode), RenderDisplayMode.TextureOnly, false);

            binder.BindToolStripMenuItemAsCheckBox(this.fullScreenToolStripMenuItem, PROP(s => s.Toggles.FullScreen), false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <TextureVisibilityFlags>(this.viewUsedTexturesToolStripMenuItem, PROP(s => s.SavedPrefs.TextureVisibility), TextureVisibilityFlags.UsedTextures, false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <GeometryVisibilityFlags>(this.viewWallsToolStripMenuItem, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.Walls, false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <GeometryVisibilityFlags>(this.viewSpecialCubesToolStripMenuItem, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.SpecialSegments, false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <GeometryVisibilityFlags>(this.viewLightsToolStripMenuItem, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.Lights, false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <GeometryVisibilityFlags>(this.viewShadingToolStripMenuItem, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.Shading, false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <GeometryVisibilityFlags>(this.viewDeltaShadingToolStripMenuItem, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.DeltaShading, false);

            binder.BindToolStripMenuItemAsCheckBoxFlag <ObjectVisibilityFlags>(this.viewObjectsRobotsToolStripMenuItem, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Robots, false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <ObjectVisibilityFlags>(this.viewObjectsPlayersToolStripMenuItem, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Players, false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <ObjectVisibilityFlags>(this.viewObjectsWeaponsToolStripMenuItem, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Weapons, false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <ObjectVisibilityFlags>(this.viewObjectsPowerUpsToolStripMenuItem, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Powerups, false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <ObjectVisibilityFlags>(this.viewObjectsKeysToolStripMenuItem, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Keys, false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <ObjectVisibilityFlags>(this.viewObjectsHostagesToolStripMenuItem, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Hostages, false);
            binder.BindToolStripMenuItemAsCheckBoxFlag <ObjectVisibilityFlags>(this.viewObjectsControlCenterToolStripMenuItem, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Reactor, false);
        }