Skip to content

Commit

Permalink
格式化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
laolarou726 committed Jun 21, 2022
1 parent e2e4328 commit f95bfd7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
22 changes: 11 additions & 11 deletions AnimationX/AnimationX.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<Version>1.5.0</Version>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<Version>1.5.0</Version>
</PropertyGroup>

<ItemGroup>
<Folder Include="Class\Helper\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Class\Helper\" />
</ItemGroup>

</Project>
</Project>
16 changes: 8 additions & 8 deletions AnimationX/Class/Helper/AnimationHelper.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using AnimationX.Class.Model.Animations;
using AnimationX.Interface;
using System;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Windows;
using System.Windows.Media;
using AnimationX.Class.Model.Animations;
using AnimationX.Interface;

namespace AnimationX.Class.Helper;

public static class AnimationHelper
{
private static readonly ReaderWriterLockSlim Lock = new (LockRecursionPolicy.NoRecursion);
private static readonly ReaderWriterLockSlim Lock = new(LockRecursionPolicy.NoRecursion);
private static readonly List<IComputableAnimation> AnimationList;
private static long _lastTick = DateTime.Now.Ticks;

Expand All @@ -19,7 +19,7 @@ static AnimationHelper()
SleepTime = TimeSpan.FromSeconds(1d / TimeLineAnimationBase.DesiredFrameRate).TotalSeconds *
TimeSpan.TicksPerSecond;
AnimationList = new List<IComputableAnimation>();

CompositionTarget.Rendering += CompositionTargetOnRendering;
}

Expand All @@ -42,7 +42,7 @@ private static void Compute()
Lock.ExitReadLock();

if (count == 0) return;

for (var i = count - 1; i >= 0; i--)
{
Lock.TryEnterReadLock(100);
Expand All @@ -62,7 +62,7 @@ private static void Compute()
}

animation.ComputeNextFrame();
}
}
}

internal static void CommitAnimation(this IComputableAnimation ani)
Expand All @@ -73,7 +73,7 @@ internal static void CommitAnimation(this IComputableAnimation ani)
AnimationList.Remove(ani);

AnimationList.Add(ani);

Lock.ExitWriteLock();
}

Expand Down

0 comments on commit f95bfd7

Please sign in to comment.