Skip to content

Commit

Permalink
Update Entity Framework to v5.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sabihoshi committed May 16, 2021
1 parent ced933d commit 77d263a
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 30 deletions.
6 changes: 3 additions & 3 deletions GenshinLyreMidiPlayer.Data/GenshinLyreMidiPlayer.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

<ItemGroup>
<PackageReference Include="Melanchall.DryWetMidi" Version="5.2.1-prerelease5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.6" />
<PackageReference Include="Stylet" Version="1.3.6" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions GenshinLyreMidiPlayer.Data/Git/GitVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ public class GitVersion

[JsonPropertyName("prerelease")] public bool Prerelease { get; set; }

[JsonPropertyName("tag_name")] public string TagName { get; set; }

[JsonPropertyName("name")] public string Name { get; set; }

[JsonPropertyName("tag_name")] public string TagName { get; set; }

[JsonPropertyName("html_url")] public string Url { get; set; }

public Version Version => new(TagName.Replace("v", string.Empty));
Expand Down
4 changes: 2 additions & 2 deletions GenshinLyreMidiPlayer.Data/Midi/MidiTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public MidiTrack(IEventAggregator events, TrackChunk track)
TrackName = track.Events.OfType<SequenceTrackNameEvent>().FirstOrDefault()?.Text;
}

public bool CanBePlayed => Track.Events.Count(e => e is NoteEvent) > 0;

public bool IsChecked
{
get => _isChecked;
Expand All @@ -28,8 +30,6 @@ public bool IsChecked
}
}

public bool CanBePlayed => Track.Events.Count(e => e is NoteEvent) > 0;

public string? TrackName { get; }

public TrackChunk Track { get; }
Expand Down
7 changes: 2 additions & 5 deletions GenshinLyreMidiPlayer.WPF/ModernWPF/Animation/Animation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,12 @@ private void OnCurrentStateInvalidated(object? sender, EventArgs e)
if (sender is Clock clock) _currentState = clock.CurrentState;
}

private void OnCompleted(object? sender, EventArgs e)
{
Completed?.Invoke(this, EventArgs.Empty);
}
private void OnCompleted(object? sender, EventArgs e) { Completed?.Invoke(this, EventArgs.Empty); }

private BitmapCache GetBitmapCache()
{
#if NETCOREAPP || NET462
return new BitmapCache(VisualTreeHelper.GetDpi(_element).PixelsPerDip);
return new(VisualTreeHelper.GetDpi(_element).PixelsPerDip);
#else
return _defaultBitmapCache;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected override Animation GetEnterAnimation(FrameworkElement element, bool mo
element.SetCurrentValue(UIElement.RenderTransformProperty, new ScaleTransform());
element.SetCurrentValue(UIElement.RenderTransformOriginProperty, new Point(0.5, 0.5));

return new Animation(element, storyboard);
return new(element, storyboard);
}

protected override Animation GetExitAnimation(FrameworkElement element, bool movingBackwards)
Expand All @@ -107,7 +107,7 @@ protected override Animation GetExitAnimation(FrameworkElement element, bool mov
Storyboard.SetTargetProperty(opacityAnim, OpacityPath);
storyboard.Children.Add(opacityAnim);

return new Animation(element, storyboard);
return new(element, storyboard);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected override Animation GetEnterAnimation(FrameworkElement element, bool mo
element.SetCurrentValue(UIElement.RenderTransformProperty, new TranslateTransform());
}

return new Animation(element, storyboard);
return new(element, storyboard);
}

protected override Animation GetExitAnimation(FrameworkElement element, bool movingBackwards)
Expand Down Expand Up @@ -94,7 +94,7 @@ protected override Animation GetExitAnimation(FrameworkElement element, bool mov
storyboard.Children.Add(opacityAnim);
}

return new Animation(element, storyboard);
return new(element, storyboard);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ public enum Direction
/// </summary>
public sealed class SlideTransition : Transition, ISlideNavigationTransitionInfo2
{
public SlideTransition(Direction effect)
{
Effect = effect;
}
public SlideTransition(Direction effect) { Effect = effect; }

protected override Animation GetEnterAnimation(FrameworkElement element, bool movingBackwards)
{
Expand Down Expand Up @@ -105,7 +102,7 @@ protected override Animation GetEnterAnimation(FrameworkElement element, bool mo
element.SetCurrentValue(UIElement.RenderTransformProperty, new TranslateTransform());
}

return new Animation(element, storyboard);
return new(element, storyboard);
}

protected override Animation GetExitAnimation(FrameworkElement element, bool movingBackwards)
Expand Down Expand Up @@ -188,7 +185,7 @@ protected override Animation GetExitAnimation(FrameworkElement element, bool mov
element.SetCurrentValue(UIElement.RenderTransformProperty, new TranslateTransform());
}

return new Animation(element, storyboard);
return new(element, storyboard);
}

#region Effect
Expand Down
5 changes: 1 addition & 4 deletions GenshinLyreMidiPlayer.WPF/ModernWPF/CaptionedObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ public CaptionedObject(T o, string? caption = null)

public class CaptionedObject<T, TEnum> : CaptionedObject<T> where T : Enum
{
public CaptionedObject(T o, TEnum type, string? caption = null) : base(o, caption)
{
Type = type;
}
public CaptionedObject(T o, TEnum type, string? caption = null) : base(o, caption) { Type = type; }

public TEnum Type { get; }

Expand Down
4 changes: 2 additions & 2 deletions GenshinLyreMidiPlayer.WPF/ModernWPF/Theme/AppTheme.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ private AppTheme(string name, ApplicationTheme? value)

public ApplicationTheme? Value { get; }

public static AppTheme Light { get; } = new("Light", ApplicationTheme.Light);

public static AppTheme Dark { get; } = new("Dark", ApplicationTheme.Dark);

public static AppTheme Default { get; } = new("Use system setting", null);

public static AppTheme Light { get; } = new("Light", ApplicationTheme.Light);

public string Name { get; }

public override string ToString() => Name;
Expand Down
4 changes: 2 additions & 2 deletions GenshinLyreMidiPlayer.WPF/Views/SettingsPageView.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<UserControl
<UserControl
x:Class="GenshinLyreMidiPlayer.WPF.Views.SettingsPageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand Down Expand Up @@ -98,7 +98,7 @@
<ui:RadioButtons
SelectedItem="{Binding Transition}"
SelectedIndex="{Binding Default.SelectedTransition, Source={StaticResource Settings}}"
ItemsSource="{x:Static transitions:TransitionCollection.Transitions}"/>
ItemsSource="{x:Static transitions:TransitionCollection.Transitions}" />
</Expander>

<GroupBox Header="License">
Expand Down

0 comments on commit 77d263a

Please sign in to comment.