Пример #1
0
        private void SelectLayer(IRoomEditorFilter layer)
        {
            if (!_editorConstructed)
            {
                return;
            }
            if (layer == _layer)
            {
                return;
            }

            if (_layer != null)
            {
                _layer.FilterOff();
            }
            _layer = layer ?? _emptyLayer;

            SetDefaultPropertyGridList();
            SetPropertyGridObject(_room);
            lblTransparency.Visible    = _layer.ShowTransparencySlider;
            sldTransparency.Visible    = _layer.ShowTransparencySlider;
            chkCharacterOffset.Visible = _layer is CharactersEditorFilter;

            _layer.FilterOn();

            bufferedPanel1.Invalidate();
            // ensure that shortcut keys do not move the combobox
            bufferedPanel1.Focus();
        }
Пример #2
0
        private void cmbViewType_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (_editorConstructed)
            {
                _filter.FilterOff();
                _filter = _filters[cmbViewType.SelectedIndex];

                SetDefaultPropertyGridList();
                Factory.GUIController.SetPropertyGridObject(_room);
                lblTransparency.Visible    = _filter.ShowTransparencySlider;
                sldTransparency.Visible    = _filter.ShowTransparencySlider;
                chkCharacterOffset.Visible = ((string)cmbViewType.SelectedItem == "Characters");

                _filter.FilterOn();

                bufferedPanel1.Invalidate();
                // ensure that shortcut keys do not move the combobox
                bufferedPanel1.Focus();
            }
        }