Пример #1
0
        protected override void SetupControls()
        {
            EditorStateBinder binder = EditorStateBinder.FromState(this.EditorState);

            binder.BindCheckBoxFlag <GeometryVisibilityFlags>(this.prefsViewWallsCheckBox, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.Walls, false);
            binder.BindCheckBoxFlag <GeometryVisibilityFlags>(this.prefsViewSpecialCheckBox, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.SpecialSegments, false);
            binder.BindCheckBoxFlag <GeometryVisibilityFlags>(this.prefsViewLightsCheckBox, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.Lights, false);
            binder.BindCheckBoxFlag <GeometryVisibilityFlags>(this.prefsViewShadingCheckBox, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.Shading, false);
            binder.BindCheckBoxFlag <GeometryVisibilityFlags>(this.prefsViewDeltalightsCheckBox, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.DeltaShading, false);
            binder.BindCheckBoxFlag <GeometryVisibilityFlags>(this.prefsViewHideTaggedCheckBox, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.HideMarked, false);
            binder.BindCheckBoxFlag <GeometryVisibilityFlags>(this.prefsViewSkyboxCheckBox, PROP(s => s.SavedPrefs.GeometryVisibility), GeometryVisibilityFlags.SkyBox, false);
            binder.BindCheckBoxFlag <TextureVisibilityFlags>(this.prefsViewAlltexturesCheckBox, PROP(s => s.SavedPrefs.TextureVisibility), TextureVisibilityFlags.UsedTextures, false);

            binder.BindCheckBoxFlag <ObjectVisibilityFlags>(this.prefsViewRobotsCheckBox, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Robots, false);
            binder.BindCheckBoxFlag <ObjectVisibilityFlags>(this.prefsViewPlayersCheckBox, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Players, false);
            binder.BindCheckBoxFlag <ObjectVisibilityFlags>(this.prefsViewWeaponsCheckBox, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Weapons, false);
            binder.BindCheckBoxFlag <ObjectVisibilityFlags>(this.prefsViewPowerupsCheckBox, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Powerups, false);
            binder.BindCheckBoxFlag <ObjectVisibilityFlags>(this.prefsViewKeysCheckBox, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Keys, false);
            binder.BindCheckBoxFlag <ObjectVisibilityFlags>(this.prefsViewHostagesCheckBox, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Hostages, false);
            binder.BindCheckBoxFlag <ObjectVisibilityFlags>(this.prefsViewReactorCheckBox, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Reactor, false);
            binder.BindCheckBoxFlag <ObjectVisibilityFlags>(this.prefsViewEffectsCheckBox, PROP(s => s.SavedPrefs.ObjectVisibility), ObjectVisibilityFlags.Effects, false);
        }
        protected override void SetupControls()
        {
            EditorStateBinder binder = EditorStateBinder.FromState(this.EditorState);

            binder.BindCheckBoxFlag <TextureFilters>(this.txtGrayRockCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.GrayRock, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtBrownRockCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.BrownRock, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtRedRockCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.RedRock, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtYellowRockCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.YellowRock, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtGreenRockCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.GreenRock, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtBlueRockCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.BlueRock, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtIceCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Ice, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtSandCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Sand, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtGrassCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Grass, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtStonesCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Stones, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtWaterCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Water, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtLavaCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Lava, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtSteelCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Steel, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtConcreteCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Concrete, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtTarmacCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Tarmac, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtBrickCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Brick, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtWallCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Wall, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtFloorCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Floor, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtCeilingCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Ceiling, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtGrateCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Grate, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtFanCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Fan, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtLightCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Light, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtEnergyCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Energy, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtForcefieldCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Forcefield, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtTechCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Tech, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtLabelCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Label, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtMonitorCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Monitor, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtStripesCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Stripes, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtDoorCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Door, false);
            binder.BindCheckBoxFlag <TextureFilters>(this.txtSwitchCheckBox, PROP(s => s.SavedPrefs.TextureFilters), TextureFilters.Switch, false);
        }