public void LogUpdateMotorEvent(Motor motor) { var log = new Settings { Active = motor.Activated, Direction = (motor.Rotation == RotationDirection.Clockwise ? "Clockwise" : "AntiClockwise"), Speed = motor.Speed }; using(var session = _factory.OpenSession()) { using(var transaction = session.BeginTransaction()) { session.SaveOrUpdate(log); transaction.Commit(); } } }
private void UpdateMotorHandler(Motor obj) { Speed = obj.Speed; Activated = obj.Activated; Rotation = obj.Rotation; }
private void UpdateMotorHandler(Motor obj) { throw new System.NotImplementedException(); }
public void ActivateMoterHandler(Motor motor) { SystemSounds.Asterisk.Play(); }