From f7c0511d17d653444cfc6c451e4efb2557d6a380 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 14 Jul 2022 00:55:08 +0200 Subject: [PATCH] Revert "Rename IsCompleted to IsRunning (#127)" This reverts commit ce6c5c03f322a120d881b8311431f3b7a54e3c84. --- docs/api/ui-forms/skconfettiview.md | 6 +-- docs/api/ui-forms/sklottieview.md | 2 +- docs/api/ui-maui/skconfettiview.md | 7 ++-- docs/api/ui-maui/sklottieview.md | 2 +- .../Converters/InvertedBooleanConverter.cs | 18 --------- .../Demos/Confetti/ConfettiPage.xaml | 7 +--- .../Demos/Lottie/LottiePage.xaml | 8 +--- .../Converters/InvertedBoolConverter.cs | 16 -------- .../Demos/Confetti/ConfettiPage.xaml | 7 +--- .../Demos/Lottie/LottiePage.xaml | 7 +--- .../Confetti/SKConfettiEmitter.shared.cs | 33 ++++++--------- .../Confetti/SKConfettiParticle.shared.cs | 10 ++--- .../Confetti/SKConfettiSystem.shared.cs | 33 ++++++++------- .../Confetti/SKConfettiView.shared.cs | 40 ++++++++----------- .../Controls/Lottie/SKLottieView.shared.cs | 25 ++++++------ .../Confetti/SKConfettiEmitterTest.cs | 30 +++++++------- .../Controls/Confetti/SKConfettiSystemTest.cs | 11 ++--- 17 files changed, 95 insertions(+), 167 deletions(-) delete mode 100644 samples/Forms/SkiaSharpDemo/Converters/InvertedBooleanConverter.cs delete mode 100644 samples/Maui/SkiaSharpDemo/Converters/InvertedBoolConverter.cs diff --git a/docs/api/ui-forms/skconfettiview.md b/docs/api/ui-forms/skconfettiview.md index e4772d21..48527ac3 100644 --- a/docs/api/ui-forms/skconfettiview.md +++ b/docs/api/ui-forms/skconfettiview.md @@ -14,7 +14,7 @@ The main property of a confetti view is the `Systems` property: | :--------------------- | :---------------------------- | :---------- | | **Systems** | `SKConfettiSystemCollection` | The collection of [systems](#system) in the view. | | **IsAnimationEnabled** | `bool` | Determines whether the control will play the animation provided. | -| **IsRunning** | `bool` | Determines whether the control is currently rendering confetti. | +| **IsComplete** | `bool` | A value that indicates whether all systems are complete. | ## Parts @@ -52,7 +52,7 @@ Every confetti view consists up one or more systems (`SKConfettiSystem`). Each s | **FadeOut** | `bool` | Whether or not the particle should fade out at the end of its life. | | **Lifetime** | `double` | The duration in seconds for how long the particle is allowed to live. | | **IsAnimationEnabled** | `bool` | Controls whether the system is running or not. | -| **IsRunning** | `bool` | Determines whether the system is complete and all systems and particles are also complete. | +| **IsComplete** | `bool` | A value that indicates whether the system is complete and all systems and particles are also complete. | # Emitter @@ -63,7 +63,7 @@ Each system has an emitter instance that controls how the confetti particles are | **ParticleRate** | `int` | The number of particles to generate each second. | | **MaxParticles** | `int` | The maximum number of particles allowed by the emitter. A value of `-1` indicates no limit. | | **Duration** | `double` | The duration in seconds of how long the emitter runs for. A value of `0` indicates that all particles are emitted instantly. | -| **IsRunning** | `bool` | Determines whether the emitter has generated all the particles and they have all disappeared. | +| **IsComplete** | `bool` | A value that indicates whether the emitter has generated all the particles and they have all disappeared. | ## Helper Emitters diff --git a/docs/api/ui-forms/sklottieview.md b/docs/api/ui-forms/sklottieview.md index 274d1302..4d7567d8 100644 --- a/docs/api/ui-forms/sklottieview.md +++ b/docs/api/ui-forms/sklottieview.md @@ -18,7 +18,7 @@ There are several properties that can be used to control th animation playback: | **RepeatCount** | `int` | The number of times to repeat the animation. Default is 0 (no repeat). | | **RepeatMode** | `SKLottieRepeatMode` | The way in which to repeat the animation. Default is `Restart`. | | **IsAnimationEnabled** | `bool` | Determines whether the control will play the animation provided. | -| **IsRunning** | `bool` | Determines whether the control is currently rendering the animation. | +| **IsComplete** | `bool` | A value that indicates whether all systems are complete. | ## Events diff --git a/docs/api/ui-maui/skconfettiview.md b/docs/api/ui-maui/skconfettiview.md index 6c6b239d..48527ac3 100644 --- a/docs/api/ui-maui/skconfettiview.md +++ b/docs/api/ui-maui/skconfettiview.md @@ -14,7 +14,7 @@ The main property of a confetti view is the `Systems` property: | :--------------------- | :---------------------------- | :---------- | | **Systems** | `SKConfettiSystemCollection` | The collection of [systems](#system) in the view. | | **IsAnimationEnabled** | `bool` | Determines whether the control will play the animation provided. | -| **IsRunning** | `bool` | Determines whether the control is currently rendering confetti. | +| **IsComplete** | `bool` | A value that indicates whether all systems are complete. | ## Parts @@ -52,7 +52,7 @@ Every confetti view consists up one or more systems (`SKConfettiSystem`). Each s | **FadeOut** | `bool` | Whether or not the particle should fade out at the end of its life. | | **Lifetime** | `double` | The duration in seconds for how long the particle is allowed to live. | | **IsAnimationEnabled** | `bool` | Controls whether the system is running or not. | -| **IsRunning** | `bool` | Determines whether the system is complete and all systems and particles are also complete. | +| **IsComplete** | `bool` | A value that indicates whether the system is complete and all systems and particles are also complete. | # Emitter @@ -63,8 +63,7 @@ Each system has an emitter instance that controls how the confetti particles are | **ParticleRate** | `int` | The number of particles to generate each second. | | **MaxParticles** | `int` | The maximum number of particles allowed by the emitter. A value of `-1` indicates no limit. | | **Duration** | `double` | The duration in seconds of how long the emitter runs for. A value of `0` indicates that all particles are emitted instantly. | -| **IsRunning** | `bool` | Determines whether the control is currently rendering confetti. | -| **IsRunning** | `bool` | Determines whether the emitter has generated all the particles and they have all disappeared. | +| **IsComplete** | `bool` | A value that indicates whether the emitter has generated all the particles and they have all disappeared. | ## Helper Emitters diff --git a/docs/api/ui-maui/sklottieview.md b/docs/api/ui-maui/sklottieview.md index 274d1302..4d7567d8 100644 --- a/docs/api/ui-maui/sklottieview.md +++ b/docs/api/ui-maui/sklottieview.md @@ -18,7 +18,7 @@ There are several properties that can be used to control th animation playback: | **RepeatCount** | `int` | The number of times to repeat the animation. Default is 0 (no repeat). | | **RepeatMode** | `SKLottieRepeatMode` | The way in which to repeat the animation. Default is `Restart`. | | **IsAnimationEnabled** | `bool` | Determines whether the control will play the animation provided. | -| **IsRunning** | `bool` | Determines whether the control is currently rendering the animation. | +| **IsComplete** | `bool` | A value that indicates whether all systems are complete. | ## Events diff --git a/samples/Forms/SkiaSharpDemo/Converters/InvertedBooleanConverter.cs b/samples/Forms/SkiaSharpDemo/Converters/InvertedBooleanConverter.cs deleted file mode 100644 index 017ce72e..00000000 --- a/samples/Forms/SkiaSharpDemo/Converters/InvertedBooleanConverter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Globalization; -using Xamarin.Forms; - -namespace SkiaSharpDemo.Converters -{ - public class InvertedBooleanConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => - value switch - { - bool b => !b, - _ => throw new ArgumentException("Value was not a bool.", nameof(value)), - }; - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => Convert(value, targetType, parameter, culture); - } -} diff --git a/samples/Forms/SkiaSharpDemo/Demos/Confetti/ConfettiPage.xaml b/samples/Forms/SkiaSharpDemo/Demos/Confetti/ConfettiPage.xaml index d68ec70e..c331e5ce 100644 --- a/samples/Forms/SkiaSharpDemo/Demos/Confetti/ConfettiPage.xaml +++ b/samples/Forms/SkiaSharpDemo/Demos/Confetti/ConfettiPage.xaml @@ -1,15 +1,10 @@  - - - -