diff --git a/8.0/Animations/Animations.sln b/8.0/Animations/Animations.sln deleted file mode 100644 index 8168b9c15..000000000 --- a/8.0/Animations/Animations.sln +++ /dev/null @@ -1,27 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31611.283 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Animations", "Animations\Animations.csproj", "{2B988494-145A-43E9-A5C9-BD5B6BB8AC51}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2B988494-145A-43E9-A5C9-BD5B6BB8AC51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2B988494-145A-43E9-A5C9-BD5B6BB8AC51}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2B988494-145A-43E9-A5C9-BD5B6BB8AC51}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {2B988494-145A-43E9-A5C9-BD5B6BB8AC51}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2B988494-145A-43E9-A5C9-BD5B6BB8AC51}.Release|Any CPU.Build.0 = Release|Any CPU - {2B988494-145A-43E9-A5C9-BD5B6BB8AC51}.Release|Any CPU.Deploy.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} - EndGlobalSection -EndGlobal diff --git a/8.0/Animations/Animations/Animations.csproj b/8.0/Animations/Animations/Animations.csproj deleted file mode 100644 index 7cd63d7d8..000000000 --- a/8.0/Animations/Animations/Animations.csproj +++ /dev/null @@ -1,65 +0,0 @@ - - - - net8.0-android;net8.0-ios;net8.0-maccatalyst - $(TargetFrameworks);net8.0-windows10.0.19041.0 - - - - - - - Exe - Animations - true - true - enable - - - Animations - - - com.companyname.animations - - - 1.0 - 1 - - 11.0 - 13.1 - 21.0 - 10.0.17763.0 - 10.0.17763.0 - 6.5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/8.0/Animations/Animations/App.xaml b/8.0/Animations/Animations/App.xaml deleted file mode 100644 index 936aa17a0..000000000 --- a/8.0/Animations/Animations/App.xaml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - diff --git a/8.0/Animations/Animations/App.xaml.cs b/8.0/Animations/Animations/App.xaml.cs deleted file mode 100644 index 7718edd16..000000000 --- a/8.0/Animations/Animations/App.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Animations; - -public partial class App : Application -{ - public App() - { - InitializeComponent(); - - MainPage = new AppShell(); - } -} diff --git a/8.0/Animations/Animations/AppShell.xaml b/8.0/Animations/Animations/AppShell.xaml deleted file mode 100644 index 104c3ea10..000000000 --- a/8.0/Animations/Animations/AppShell.xaml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/8.0/Animations/Animations/AppShell.xaml.cs b/8.0/Animations/Animations/AppShell.xaml.cs deleted file mode 100644 index 5b136e31c..000000000 --- a/8.0/Animations/Animations/AppShell.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Animations; - -public partial class AppShell : Shell -{ - public AppShell() - { - InitializeComponent(); - - Routing.RegisterRoute(nameof(EasingEditorPage), typeof(EasingEditorPage)); - } -} diff --git a/8.0/Animations/Animations/Extensions/AnimationExtensions.cs b/8.0/Animations/Animations/Extensions/AnimationExtensions.cs deleted file mode 100644 index 875225110..000000000 --- a/8.0/Animations/Animations/Extensions/AnimationExtensions.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace Animations.Extensions; - -public static class ViewExtensions -{ - public static Task ColorTo(this VisualElement self, Color fromColor, Color toColor, Action callback, uint length = 250, Easing easing = null) - { - Func transform = (t) => - Color.FromRgba(fromColor.Red + t * (toColor.Red - fromColor.Red), - fromColor.Green + t * (toColor.Green - fromColor.Green), - fromColor.Blue + t * (toColor.Blue - fromColor.Blue), - fromColor.Alpha + t * (toColor.Alpha - fromColor.Alpha)); - return ColorAnimation(self, "ColorTo", transform, callback, length, easing); - } - - public static void CancelAnimation(this VisualElement self) - { - self.AbortAnimation("ColorTo"); - } - - static Task ColorAnimation(VisualElement element, string name, Func transform, Action callback, uint length, Easing easing) - { - easing = easing ?? Easing.Linear; - var taskCompletionSource = new TaskCompletionSource(); - - element.Animate(name, transform, callback, 16, length, easing, (v, c) => taskCompletionSource.SetResult(c)); - return taskCompletionSource.Task; - } -} \ No newline at end of file diff --git a/8.0/Animations/Animations/Extensions/ExtensionMethods.cs b/8.0/Animations/Animations/Extensions/ExtensionMethods.cs deleted file mode 100644 index 1938a3b0d..000000000 --- a/8.0/Animations/Animations/Extensions/ExtensionMethods.cs +++ /dev/null @@ -1,163 +0,0 @@ -namespace Animations; - -public static class CustomEasing -{ - - public static readonly Easing BounceInOut = - new Easing(t => - (t < 0.5) - ? (1 - Easing.BounceOut.Ease(1 - (2 * t))) / 2 - : (1 + Easing.BounceOut.Ease((2 * t) - 1)) / 2 - ); - - public static readonly Easing QuadIn = - new Easing(t => - t * t - ); - - public static readonly Easing QuadOut = - new Easing(t => - 1 - (1-t) * (1-t) - ); - - public static readonly Easing QuadInOut = - new Easing(t => - (t < 0.5) - ? 2 * t * t - : 1 - Math.Pow(-2 * t + 2, 2) / 2 - ); - - public static readonly Easing QuartIn = - new Easing(t => - t * t * t * t - ); - - public static readonly Easing QuartOut = - new Easing(t => - 1 - Math.Pow(1-t,4) - ); - - public static readonly Easing QuartInOut = - new Easing(t => - (t < 0.5) - ? 8 * t * t * t * t - : 1 - Math.Pow(-2 * t + 2, 4) / 2 - ); - - public static readonly Easing ExpoIn = - new Easing(t => - (t == 0) - ? 0 - : Math.Pow(2, 10 * t - 10) - ); - - public static readonly Easing ExpoOut = - new Easing(t => - (t == 1) - ? 1 - : Math.Pow(2, -10 * t) - ); - - public static readonly Easing ExpoInOut = - new Easing(t => - (t == 0) - ? 0 - : (t == 1) - ? 1 - : (t < 0.5) ? Math.Pow(2, 20 * t - 10) / 2 : (2 - Math.Pow(2, -20 * t + 10)) / 2 - - ); - - private static double c1 = 1.70158; - private static double c2 = c1 + 1.525; - private static double c3 = c1 + 1; - private static double c4 = (2 * Math.PI) / 3; - private static double c5 = (2 * Math.PI) / 4.5; - - public static readonly Easing BackIn = - new Easing(t => - c3 * t * t * t - c1 * t * t - ); - - public static readonly Easing BackOut = - new Easing(t => - 1 + c3 * Math.Pow(t-1,3) + c1 * Math.Pow(t-1,2) - ); - - public static readonly Easing BackInOut = - new Easing(t => - (t < 0.5) - ? (Math.Pow(2*t, 2)*((c2 + 1)*2*t-c2)) / 2 - : (Math.Pow(2*t-2,2) * ((c2+1) * (t*2-2) + c2)+2)/2 - - ); - - public static readonly Easing QuintIn = - new Easing(t => - t*t*t*t*t - ); - - public static readonly Easing QuintOut = - new Easing(t => - 1 - Math.Pow(1-t,5) - ); - - public static readonly Easing QuintInOut = - new Easing(t => - (t < 0.5) - ? 16*t*t*t*t*t - : 1 - Math.Pow(-1 * t + 2,5) - - ); - - public static readonly Easing CircIn = - new Easing(t => - 1 - Math.Sqrt(1-Math.Pow(t,2)) - ); - - public static readonly Easing CircOut = - new Easing(t => - Math.Sqrt(1-Math.Pow(t-1,2)) - ); - - public static readonly Easing CircInOut = - new Easing(t => - (t < 0.5) - ? (1 - Math.Sqrt(1 - Math.Pow(2 * t, 2))) / 2 - : (Math.Sqrt(1 - Math.Pow(-2 * t + 2, 2)) + 1) / 2 - - ); - - public static readonly Easing ElasticIn = - new Easing(t => - (t==0) - ? 0 - : t == 1 - ? 1 - : -Math.Pow(2, 10 * t - 10) * Math.Sin((t * 10 - 10.75) * c4) - ); - - public static readonly Easing ElasticOut = - new Easing(t => - (t==0) - ? 0 - : t == 1 - ? 1 - : Math.Pow(2, -10 * t) * Math.Sin((t * 10 - 0.75) * c4) + 1 - ); - - public static readonly Easing ElasticInOut = - new Easing(t => - (t == 0) - ? 0 - : t == 1 - ? 1 - : t < 0.5 - ? -(Math.Pow(2, 20 * t - 10) * Math.Sin((20 * t - 11.125) * c5)) / 2 - : (Math.Pow(2, -20 * t + 10) * Math.Sin((20 * t - 11.125) * c5)) / 2 + 1 - - ); - - - -} \ No newline at end of file diff --git a/8.0/Animations/Animations/MauiProgram.cs b/8.0/Animations/Animations/MauiProgram.cs deleted file mode 100644 index d20312e6e..000000000 --- a/8.0/Animations/Animations/MauiProgram.cs +++ /dev/null @@ -1,22 +0,0 @@ -using CommunityToolkit.Maui; - -namespace Animations; - -public static class MauiProgram -{ - public static MauiApp CreateMauiApp() - { - var builder = MauiApp.CreateBuilder(); - builder - .UseMauiApp() - .UseMauiCommunityToolkit() - .ConfigureFonts(fonts => - { - fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); - fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); - fonts.AddFont("fa-solid-900.ttf", "FontAwesome"); - }); - - return builder.Build(); - } -} diff --git a/8.0/Animations/Animations/Pages/Controls/EasingCard.cs b/8.0/Animations/Animations/Pages/Controls/EasingCard.cs deleted file mode 100644 index de629e262..000000000 --- a/8.0/Animations/Animations/Pages/Controls/EasingCard.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System.Diagnostics; - -namespace Animations.Controls; - -public class EasingCard : ContentView -{ - public static readonly BindableProperty CardTitleProperty = BindableProperty.Create(nameof(CardTitle), typeof(string), typeof(EasingCard), string.Empty); - public static readonly BindableProperty CardDescriptionProperty = BindableProperty.Create(nameof(CardDescription), typeof(string), typeof(EasingCard), string.Empty); - public static readonly BindableProperty EasingStyleProperty = BindableProperty.Create(nameof(EasingStyle), typeof(Easing), typeof(EasingCard), Easing.Linear); - - public string CardTitle - { - get => (string)GetValue(CardTitleProperty); - set => SetValue(CardTitleProperty, value); - } - - public string CardDescription - { - get => (string)GetValue(CardDescriptionProperty); - set => SetValue(CardDescriptionProperty, value); - } - - - public Easing EasingStyle - { - get => (Easing)GetValue(EasingStyleProperty); - set => SetValue(EasingStyleProperty, value); - } - - public EasingCard() - { - this.GestureRecognizers.Add(new TapGestureRecognizer { - NumberOfTapsRequired = 2, - Command = new Command(OnDblTap) - }); - this.GestureRecognizers.Add(new TapGestureRecognizer() { - NumberOfTapsRequired = 1, - Command = new Command(OnTap) - }); - } - - private async void OnDblTap(object obj) - { - _cancelTapToken.Cancel(); - Debug.WriteLine("You DOUBLE tapped"); - var navigationParameter = new Dictionary - { - { "card", this } - }; - //await Shell.Current.GoToAsync($"{nameof(EasingEditorPage)}", navigationParameter); - } - - private async void OnTap(object obj) - { - await DebouncedTap().ConfigureAwait(false); - } - - private CancellationTokenSource _cancelTapToken = new CancellationTokenSource(); - - private async Task DebouncedTap() - { - try - { - Interlocked.Exchange(ref _cancelTapToken, new CancellationTokenSource()).Cancel(); - - //NOTE THE 500 HERE - WHICH IS THE TIME TO WAIT - await Task.Delay(TimeSpan.FromMilliseconds(300), _cancelTapToken.Token) - - //NOTICE THE "ACTUAL" SEARCH METHOD HERE - .ContinueWith(async task => - { - Debug.WriteLine("You tapped"); - var ag = (Grid) this.GetTemplateChild("AxisGrid"); - ag.Opacity = (ag.Opacity == 0) ? 1 : 0; - - if (ag.Opacity != 0) - { - var b = (BoxView) this.GetTemplateChild("Box"); - b.TranslationY = 0;// make sure it's reset - await Task.Delay(500); - await b.TranslateTo(b.TranslationX, ag.Height*-1, 1000, EasingStyle); - } - }, - CancellationToken.None, - TaskContinuationOptions.OnlyOnRanToCompletion, - TaskScheduler.FromCurrentSynchronizationContext()); - } - catch - { - //Ignore any Threading errors - } - - - } -} diff --git a/8.0/Animations/Animations/Pages/Controls/PickerCell.cs b/8.0/Animations/Animations/Pages/Controls/PickerCell.cs deleted file mode 100644 index d458e4416..000000000 --- a/8.0/Animations/Animations/Pages/Controls/PickerCell.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace Animations.Controls; - -public class PickerCell : ViewCell -{ - - private Label _label { get; set; } - private View _picker { get; set; } - private StackLayout _layout { get; set; } - - public string Label - { - get - { - return _label.Text; - } - set - { - _label.Text = value; - } - } - - public View Picker - { - set - { - //Remove picker if it exists - if (_picker != null) - { - _layout.Children.Remove(_picker); - } - - //Set its value - _picker = value; - //Add to layout - _layout.Children.Add(_picker); - - } - } - - public PickerCell() - { - - _label = new Label() - { - VerticalOptions = LayoutOptions.Center, - FontSize = 15 - }; - _layout = new StackLayout() - { - Orientation = StackOrientation.Horizontal, - HorizontalOptions = LayoutOptions.Center, - Padding = new Thickness(15, 5), - Children = - { - _label - } - }; - - this.View = _layout; - - } - -} \ No newline at end of file diff --git a/8.0/Animations/Animations/Pages/CustomAnimationPage.xaml b/8.0/Animations/Animations/Pages/CustomAnimationPage.xaml deleted file mode 100644 index 66db264ba..000000000 --- a/8.0/Animations/Animations/Pages/CustomAnimationPage.xaml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - -