Beispiel #1
0
        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();
                }
            }
        }
Beispiel #2
0
 private void UpdateMotorHandler(Motor obj)
 {
     Speed = obj.Speed;
     Activated = obj.Activated;
     Rotation = obj.Rotation;
 }
Beispiel #3
0
 private void UpdateMotorHandler(Motor obj)
 {
     throw new System.NotImplementedException();
 }
Beispiel #4
0
 public void ActivateMoterHandler(Motor motor)
 {
     SystemSounds.Asterisk.Play();
 }