예제 #1
0
        public override void onSetFrom(Connector connector, Client client)
        {
            APlay.Common.Logging.Logger.LogDesigned(2, "Connection.onSetFrom called", "APlayTest.Server.Connection");

            var undoable = new ConnectionUndoable(this);

            this.From = connector;
            _undoService.AddUpdate(undoable, new ConnectionUndoable(this), "Set From-Connector: " + connector.Id, client.Id);
        }
예제 #2
0
        public override void onSetPosition(AplayPoint position__, Client client__)
        {
            if (Math.Abs(PositionX - position__.X) < double.Epsilon && Math.Abs(PositionY - position__.Y) < double.Epsilon)
            {
                return;
            }

            var oldState = new ConnectorUndoable(this);

            PositionX = position__.X;
            PositionY = position__.Y;

            _undoService.AddUpdate(oldState, new ConnectorUndoable(this), "Position of connector changed", client__.Id);
        }
예제 #3
0
        public override void onSetName(string name, Client client)
        {
            if (Name == name)
            {
                return;
            }

            var oldState = new SheetUndoable(this);

            Name = name;

            var newState = new SheetUndoable(this);

            _undoService.AddUpdate(oldState, newState, "Sheet name changed", client.Id);
        }