public StockingCtrl(ICompressionCtrl compressionCtrl, IVibrator vibratorCtrl, ILED ledCtrlGreen, ILED ledCtrlRed)
 {
     _compressionCtrl = compressionCtrl;
     _vibratorCtrl    = vibratorCtrl;
     _LEDCtrlGreen    = ledCtrlGreen;
     _LEDCtrlRed      = ledCtrlRed;
 }
Beispiel #2
0
        protected override void OnButtonPressed()
        {
            blackFillPaint.Color = SKColors.Red;
            IVibrator vibrator = DependencyService.Get <IVibrator>();

            vibrator.Vibrate();
        }
 public static void SetVibrationOn(bool on)
 {
     if (on)
     {
         Generate();
     }
     else
     {
         vibrator = null;
     }
 }
    public static void Generate()
    {
        if (vibrator == null)
        {
            if (vibrator == null)
            {
#if UNITY_EDITOR
                return;
#elif UNITY_ANDROID
                vibrator = new IAndroidVibrator();
#elif UNITY_IOS
                vibrator = new IPhoneVibrator();
#endif
            }
        }
    }
Beispiel #5
0
 /// <summary>
 /// Default class constructor.
 /// </summary>
 public Vibrator()
 {
     _service = DependencyService.Get <IVibrator>();
 }
Beispiel #6
0
 public StockingController(ICompressionCtrl iCompressionCtrl, IVibrator vibrator, ILEDController ledController)
 {
     _compressionCtrl = iCompressionCtrl;
     _vibrator        = vibrator;
     _ledController   = ledController;
 }