Skip to content

Commit

Permalink
NET8
Browse files Browse the repository at this point in the history
  • Loading branch information
LiorBanai committed Nov 16, 2023
1 parent d83649d commit ab6e472
Show file tree
Hide file tree
Showing 18 changed files with 127 additions and 101 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ dotnet_diagnostic.SA1122.severity = suggestion
dotnet_diagnostic.SA1108.severity = silent
dotnet_diagnostic.SA1012.severity = error
dotnet_diagnostic.SA1500.severity = error
dotnet_diagnostic.SA1316.severity = error

[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = beginning_of_line
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dotnet-core-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3.0.3
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.1.3
uses: microsoft/setup-msbuild@v1.3.1

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
Expand Down
2 changes: 2 additions & 0 deletions Analogy.LogViewer.FFmpeg.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Analogy.LogViewer.FFmpeg",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1C4E160B-8277-4341-AB83-D96666B301C3}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
.github\workflows\dotnet-core-desktop.yml = .github\workflows\dotnet-core-desktop.yml
nuget.config = nuget.config
EndProjectSection
Expand Down
34 changes: 5 additions & 29 deletions Analogy.LogViewer.FFmpeg/Analogy.LogViewer.FFmpeg.csproj
Original file line number Diff line number Diff line change
@@ -1,38 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFrameworks>net7.0-windows;net6.0-windows;net48;net471</TargetFrameworks>
<VersionPrefix>5.0.3.1</VersionPrefix>
<TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net48;net471</TargetFrameworks>
<VersionPrefix>6.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<AssemblyTitle>Analogy.LogViewer.FFmpeg</AssemblyTitle>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<UseWindowsForms>true</UseWindowsForms>
<Company>Lior Banai</Company>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<Product>Analogy.LogViewer.FFmpeg</Product>
<Description>Analogy Log Viewer FFmpeg Tools</Description>
<Copyright>Lior Banai © 2023</Copyright>
<Copyright>Lior Banai © 2023-2024</Copyright>
<Authors>Lior Banai</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.FFmpeg</PackageProjectUrl>
<RepositoryUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.FFmpeg</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes></PackageReleaseNotes>
<PackageIcon>AnalogyIcon.png</PackageIcon>
<PackageIconUrl />
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<ApplicationIcon>AnalogyIcon.ico</ApplicationIcon>
<Platforms>AnyCPU;x64;x86</Platforms>
</PropertyGroup>
<ItemGroup>
<None Include="AnalogyIcon.png">
Expand All @@ -59,8 +41,8 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Analogy.LogViewer.Template" Version="5.0.3" />
<PackageReference Include="Analogy.LogViewer.Interfaces" Version="5.0.3" />
<PackageReference Include="Analogy.LogViewer.Template" Version="6.0.0" />
<PackageReference Include="Analogy.LogViewer.Interfaces" Version="6.0.0.1" />
<PackageReference Include="FFMpegCore" Version="5.1.0" />
<!--<PackageReference Include="LibVLCSharp.WinForms" Version="3.7.0" />
<PackageReference Include="VideoLAN.LibVLC.Windows" Version="3.0.18" />-->
Expand All @@ -69,12 +51,6 @@
<Version>4.5.4</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' or '$(TargetFramework)' == 'net472' ">
<PackageReference Include="PolySharp" Version="1.13.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Include="Resources\settings.png" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Analogy.LogViewer.FFmpeg/IAnalogy/DownloadInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ public override string InstalledVersionNumber
}
}
}
}
}
14 changes: 6 additions & 8 deletions Analogy.LogViewer.FFmpeg/IAnalogy/FFTools.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System;
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
using Analogy.Interfaces;
using Analogy.Interfaces;
using Analogy.Interfaces.DataTypes;
using Analogy.LogViewer.FFmpeg.Properties;
using Analogy.LogViewer.FFmpeg.UserControls;
using Microsoft.Extensions.Logging;
using System;
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Analogy.LogViewer.FFmpeg.IAnalogy
{
Expand All @@ -27,9 +27,7 @@ public Task InitializeUserControl(Control hostingControl, ILogger logger)

public Task UserControlRemoved()
{

return Task.CompletedTask;
}

}
}
}
11 changes: 4 additions & 7 deletions Analogy.LogViewer.FFmpeg/IAnalogy/FFmpegActionsFactory.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using Analogy.Interfaces;
using Analogy.Interfaces;
using Analogy.Interfaces.DataTypes;
using Analogy.Interfaces.Factories;
using Analogy.LogViewer.FFmpeg.Properties;
using Analogy.LogViewer.Template.Managers;
using System;
using System.Collections.Generic;
using System.Drawing;

namespace Analogy.LogViewer.FFmpeg.IAnalogy
{
Expand All @@ -21,10 +21,8 @@ public class FFmpegActionsFactory : IAnalogyCustomActionsFactory

private class Action1 : IAnalogyCustomAction
{

public Action Action { get; } = () =>
{

};

public Guid Id { get; set; } = new Guid("b6c5410d-5ef5-4b1c-84f1-0dcd7eac3966");
Expand All @@ -34,6 +32,5 @@ private class Action1 : IAnalogyCustomAction
public AnalogyCustomActionType Type { get; } = AnalogyCustomActionType.BelongsToProvider;
public AnalogyToolTip? ToolTip { get; set; }
}

}
}
11 changes: 5 additions & 6 deletions Analogy.LogViewer.FFmpeg/IAnalogy/FFmpegFactories.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using Analogy.Interfaces;
using Analogy.Interfaces;
using Analogy.LogViewer.FFmpeg.Properties;
using Analogy.LogViewer.Template;
using System;
using System.Collections.Generic;
using System.Drawing;

namespace Analogy.LogViewer.FFmpeg.IAnalogy
{
Expand Down Expand Up @@ -31,7 +31,6 @@ public class DataSourceFactory : DataProvidersFactory

public override IEnumerable<IAnalogyDataProvider> DataProviders { get; set; } = new List<IAnalogyDataProvider>
{

};
}
}
}
12 changes: 5 additions & 7 deletions Analogy.LogViewer.FFmpeg/IAnalogy/FFmpegUserControlFactory.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using Analogy.Interfaces;
using Analogy.Interfaces;
using Analogy.Interfaces.Factories;
using System;
using System.Collections.Generic;

namespace Analogy.LogViewer.FFmpeg.IAnalogy
{
Expand All @@ -12,9 +12,7 @@ internal class FFmpegUserControlFactory : IAnalogyCustomUserControlsFactory

public IEnumerable<IAnalogyCustomUserControl> UserControls { get; } = new List<IAnalogyCustomUserControl>
{
new FFTools()
new FFTools(),
};


}
}
}
15 changes: 6 additions & 9 deletions Analogy.LogViewer.FFmpeg/IAnalogy/FFmpegUserSettingsFactory.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
using System;
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
using Analogy.Interfaces;
using Analogy.Interfaces;
using Analogy.LogViewer.FFmpeg.Properties;
using Analogy.LogViewer.FFmpeg.UserControls;
using Microsoft.Extensions.Logging;
using System;
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Analogy.LogViewer.FFmpeg.IAnalogy
{
public class FFmpegUserSettingsFactory : Analogy.LogViewer.Template.TemplateUserSettingsFactory
{

public override Guid FactoryId { get; set; } = FFmpegFactories.Id;
public override Guid Id { get; set; } = new Guid("c84a5f45-c6a6-423a-86c2-a650581da0bf");
public override UserControl DataProviderSettings { get; set; }
Expand All @@ -21,7 +20,6 @@ public class FFmpegUserSettingsFactory : Analogy.LogViewer.Template.TemplateUser

public FFmpegUserSettingsFactory()

Check warning on line 21 in Analogy.LogViewer.FFmpeg/IAnalogy/FFmpegUserSettingsFactory.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Non-nullable property 'DataProviderSettings' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
{

}

public override void CreateUserControl(ILogger logger)
Expand All @@ -32,7 +30,6 @@ public override void CreateUserControl(ILogger logger)
public override Task SaveSettingsAsync()
{
return Task.CompletedTask;

}
}
}
}
3 changes: 1 addition & 2 deletions Analogy.LogViewer.FFmpeg/Managers/UserSettingsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public UserSettingsManager()
try
{
Settings = Utils.DeSerializeJsonFile<UserSettings>(FileName);

}
catch (Exception)
{
Expand All @@ -48,4 +47,4 @@ public void Save()
Utils.SerializeToJsonFile(Settings, FileName);
}
}
}
}
17 changes: 6 additions & 11 deletions Analogy.LogViewer.FFmpeg/UserControls/FFToolsUC.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using Analogy.Interfaces;
using Analogy.Interfaces;
using Analogy.LogViewer.FFmpeg.Managers;
using FFMpegCore;
using Microsoft.Extensions.Logging;
using System;
using System.IO;
using System.Linq;
using System.Windows.Forms;

namespace Analogy.LogViewer.FFmpeg.UserControls
{
Expand All @@ -18,7 +18,6 @@ public FFToolsUC()

public FFToolsUC(ILogger logger) : this()
{

}
private void FFToolsUC_Load(object sender, EventArgs e)
{
Expand Down Expand Up @@ -69,8 +68,6 @@ private void btnAnalyze_Click(object sender, EventArgs e)
packets.Select(p =>
$"pts time: {p.PtsTime}. Dts time: {p.DtsTime}. Duration: {p.Duration}."));
}


}
catch (Exception exception)
{
Expand All @@ -86,8 +83,6 @@ private void txtbVideoFile_TextChanged(object sender, EventArgs e)

private void btnPlay_Click(object sender, EventArgs e)
{


}
}
}
}
7 changes: 3 additions & 4 deletions Analogy.LogViewer.FFmpeg/UserControls/UserSettingsUC.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using System;
using Analogy.LogViewer.FFmpeg.Managers;
using System;
using System.Drawing;
using System.Windows.Forms;
using Analogy.LogViewer.FFmpeg.Managers;

namespace Analogy.LogViewer.FFmpeg.UserControls
{
public partial class UserSettingsUC : UserControl
{

public UserSettingsUC()
{
InitializeComponent();
Expand Down Expand Up @@ -40,4 +39,4 @@ private void txtbFFmpegEXELocation_TextChanged(object sender, EventArgs e)
SaveSettings();
}
}
}
}
7 changes: 3 additions & 4 deletions Analogy.LogViewer.FFmpeg/UserControls/VideoStreamInfoUC.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using FFMpegCore;
using System;
using System.Windows.Forms;
using FFMpegCore;

namespace Analogy.LogViewer.FFmpeg.UserControls
{
Expand All @@ -25,7 +25,6 @@ private void VideoStreamInfoUC_Load(object sender, EventArgs e)
tbStreamDimension.Text = $@"{Stream.Height} x {Stream.Width}";
tbStreamFrameRate.Text = Stream.FrameRate.ToString();
tbStreamPixelFormat.Text = Stream.PixelFormat;

}
}
}
}
2 changes: 1 addition & 1 deletion Analogy.LogViewer.FFmpeg/UserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public UserSettings()
{
}
}
}
}
Loading

0 comments on commit ab6e472

Please sign in to comment.