Exemplo n.º 1
0
        private async Task RunAlarmOffAnimation()
        {
            animating = true;
            await AlarmIcon.Offset(0, 400).StartAsync();

            animating = false;
        }
Exemplo n.º 2
0
 private void LoadElements()
 {
     this.backgroundImage = this.images.Pick(this.json.Background.Image.ImageIndex);
     this.clock           = SeparatedClock.FromJson(this.json, this.images);
     this.date            = FlexDate.FromJson(this.json, this.images);
     this.dow             = Models.UIElements.DayOfWeek.FromJson(this.json, this.images);
     this.alarm           = AlarmIcon.FromJson(this.json, this.images);
     this.locked          = LockIcon.FromJson(this.json, this.images);
     this.noBluetooth     = BluetoothDisconnectedIcon.FromJson(this.json, this.images);
 }
Exemplo n.º 3
0
        private async Task RunAlarmAnimation()
        {
            if (!animating)
            {
                animating = true;
                var centerY = (float)AlarmIcon.ActualHeight / 2;
                var centerX = (float)AlarmIcon.ActualWidth / 2;
                await AlarmIcon.Rotate(10, centerX, centerY).Offset().Then()
                .Rotate(-10, centerX, centerY).Then()
                .Rotate(10, centerX, centerY).Then()
                .Rotate(-10, centerX, centerY).SetDurationForAll(100).StartAsync();

                await Task.Delay(400);

                animating = false;
            }
        }