Beispiel #1
0
        private async Task SaveChangesAsync()
        {
            var result = await _context.TrySaveChangesAsync(_app.Cts.Token);

            if (result.HasError)
            {
                await Log.ReportErrorFormatAsync(_app.Cts.Token, "Error saving scheduled task. {0}", result.Message);
            }

            SignalImg.Opacity = 1;
            var da = new DoubleAnimation {
                From = 1, To = 0, Duration = new Duration(TimeSpan.FromSeconds(.8))
            };

            SignalImg.BeginAnimation(OpacityProperty, da);
        }
        private async Task SendCommandAsync()
        {
            if (SendCommandAction == null)
            {
                return;
            }

            SignalImg.Opacity = 1;

            await SendCommandAction(TextBox.Text);

            var da = new DoubleAnimation {
                From = 1, To = 0, Duration = new Duration(TimeSpan.FromSeconds(.8))
            };

            SignalImg.BeginAnimation(OpacityProperty, da);
        }