예제 #1
0
파일: Queries.cs 프로젝트: Limroto/ECH
        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();
                }
            }
        }
예제 #2
0
파일: GlobalValues.cs 프로젝트: Limroto/ECH
 private void UpdateMotorHandler(Motor obj)
 {
     Speed = obj.Speed;
     Activated = obj.Activated;
     Rotation = obj.Rotation;
 }
예제 #3
0
파일: Subscribers.cs 프로젝트: Limroto/ECH
 private void UpdateMotorHandler(Motor obj)
 {
     throw new System.NotImplementedException();
 }
예제 #4
0
 public void ActivateMoterHandler(Motor motor)
 {
     SystemSounds.Asterisk.Play();
 }