Esempio n. 1
0
        void SqlCopyPaste_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
            case "ExistsPaste":
            {
                _existsPaste = SqlCopyPaste.ExistsPaste;
            } break;

            case "TypeGeom":
            {
                _copyTypeGeom = SqlCopyPaste.TypeGeom;
            } break;

            default:
                break;
            }
        }
Esempio n. 2
0
        public void SetButtonsState(bool isCursorChange = false)
        {
            var oldTypeGeom = _typeGeom;

            if (_currentTablePg != null)
            {
                _writeTable = classesOfMetods.getWriteTable(_currentTablePg.idTable);
                _typeGeom   = _currentTablePg.TypeGeom;
            }
            else
            {
                _writeTable = false;
            }

            //if (!Program.IsV3)
            {
                //if (!_writeTable)
                if (!isCursorChange)
                {
                    switch (mv.CtlCursor)
                    {
                    case Cursors.mlAddDot:
                    case Cursors.mlAddLine:
                    case Cursors.mlAddPipe:
                    case Cursors.mlAddPolyLine:
                    case Cursors.mlAddPolygon:
                    case Cursors.mlAddVx:
                    case Cursors.mlRectangle:
                        mv.SetCursor(Cursors.mlSelect);
                        return;
                    }
                }
                //курсор добавления прямоугольника включенный в полигональном слое и переключенный в другой тип слоя
                // изменить курсор
                if (mv.CtlCursor == Cursors.mlRectangle && oldTypeGeom == TypeGeometry.MULTIPOLYGON && _typeGeom != TypeGeometry.MULTIPOLYGON)
                {
                    mv.SetCursor(Cursors.mlSelect);
                    return;
                }
            }

            switch (this.CurrStatePanel)
            {
            case StapeTypeLayerPanel.SelectLayer:
                SetButtonStateForSelectLayerInPanel();
                break;

            case StapeTypeLayerPanel.SelectVisible:
                SetButtonStateForSelectVisibleLayerInPanel();
                break;

            default:
                SetButtonStateForNoneInPanel();
                break;
            }
            switch (this.CurrState)
            {
            case StateType.None:
                SetButtonStateForNone();
                break;

            case StateType.SelectObject:
                SetButtonStateForSelectObject();
                break;

            case StateType.EditedLayer:
                SetButtonStateForEditedLayer();
                break;

            case StateType.SelectEditeObject:
                SetButtonStateForEditeObject();
                break;

            case StateType.SelectLayer:
                SetButtonStateForSelectLayer();
                break;

            default:
                SetButtonStateForNone();
                break;
            }

            var workSet = Program.WorkSets.CurrentWorkSet.IsDefault || Program.WorkSets.CurrentWorkSet.IsAccess;

            wm.TbbWorkSetSaveLocationLayers.IsEnabled = workSet;
        }