public override void onAdd(BlockSymbol blockSymbol, Client client) { APlay.Common.Logging.Logger.LogDesigned(2, "OnAdd(blockSymbol) Pos: " + blockSymbol.PositionX + "/" + blockSymbol.PositionY, "AplayTest.Server.Sheet"); var undoObject = new BlockSymbolUndoable(blockSymbol); _undoService.AddInsert(Id, undoObject, BlockSymbols.Count, "Adding new Block", client.Id); BlockSymbols.Add(blockSymbol); }
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 BlockSymbolUndoable(Id, PositionX, PositionY); PositionX = position__.X; PositionY = position__.Y; _undoService.AddUpdate(oldState, new BlockSymbolUndoable(this), "Position of block changed", client__.Id); }