Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@

# IDE0090: Use 'new(...)'
csharp_style_implicit_object_creation_when_type_is_apparent = false

dotnet_diagnostic.CA1416.severity = none
dotnet_diagnostic.CS8600.severity = none
dotnet_diagnostic.CS8601.severity = none
dotnet_diagnostic.CS8602.severity = none
dotnet_diagnostic.CS8603.severity = none
dotnet_diagnostic.CS8604.severity = none
dotnet_diagnostic.CS8618.severity = none
dotnet_diagnostic.CS8625.severity = none
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '9.0'
dotnet-version: '10.0'
include-prerelease: True

- name: Add package sources
Expand All @@ -54,7 +54,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -65,7 +65,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -79,4 +79,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
Binary file modified Assets/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Helper Applications/Analyzer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static void Main()
}
}
}
catch (Exception ex)
catch (Exception)
{
// Debug: System.Windows.MessageBox.Show("Folgender Fehler ist beim Analysieren aufgetreten: " + ex.Message);
}
Expand Down
2 changes: 1 addition & 1 deletion Helper Applications/Analyzer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Code A Software")]
[assembly: AssemblyProduct("Analyzer")]
[assembly: AssemblyCopyright("Copyright © 2018-2024")]
[assembly: AssemblyCopyright("Copyright © 2018-2025")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
8 changes: 4 additions & 4 deletions Helper Applications/PDF2J/PDF2J.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Configurations>Debug;Release;Normal</Configurations>
</PropertyGroup>

Expand All @@ -16,9 +16,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="14.3.0" />
<PackageReference Include="Magick.NET.Core" Version="14.3.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="14.9.1" />
<PackageReference Include="Magick.NET.Core" Version="14.9.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.0.1" />
<PackageReference Include="WebhookAPI" Version="1.0.7" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion Helper Applications/PDF2J/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi;

namespace PDF2J
{
Expand Down
2 changes: 1 addition & 1 deletion Helper Applications/SJFileAssoc/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SJFileAssoc")]
[assembly: AssemblyCopyright("Copyright © 2018-2024")]
[assembly: AssemblyCopyright("Copyright © 2018-2025")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
2 changes: 1 addition & 1 deletion Helper Applications/Touch/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Code A Software")]
[assembly: AssemblyProduct("Touch")]
[assembly: AssemblyCopyright("Copyright © 2018-2024")]
[assembly: AssemblyCopyright("Copyright © 2018-2025")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Code A Software")]
[assembly: AssemblyProduct("Touch Device Manager")]
[assembly: AssemblyCopyright("Copyright © 2020-2024")]
[assembly: AssemblyCopyright("Copyright © 2020-2025")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0-windows7.0</TargetFramework>
<TargetFramework>net10.0-windows7.0</TargetFramework>
<OutputType>WinExe</OutputType>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
Expand Down Expand Up @@ -31,9 +31,8 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.6.0-preview3.19128.7" />
<PackageReference Include="System.Management" Version="9.0.0" />
<PackageReference Include="System.Management" Version="10.0.0" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion Shared Libraries/Device/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Code A Software")]
[assembly: AssemblyProduct("Device")]
[assembly: AssemblyCopyright("Copyright © 2020-2024")]
[assembly: AssemblyCopyright("Copyright © 2020-2025")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
25 changes: 11 additions & 14 deletions Shared Libraries/SimpleJournal.Common/Helper/FileSystemHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,16 @@ public static string BuildSHA1FromFile(string fileName)

private static string SHA1(byte[] input)
{
using (SHA1Managed sha1 = new SHA1Managed())
{
var hash = sha1.ComputeHash(input);
var sb = new StringBuilder(hash.Length * 2);

foreach (byte b in hash)
{
// can be "x2" if you want lowercase
sb.Append(b.ToString("x2"));
}
var hash = System.Security.Cryptography.SHA1.HashData(input);
var sb = new StringBuilder(hash.Length * 2);

return sb.ToString();
foreach (byte b in hash)
{
// can be "x2" if you want lowercase
sb.Append(b.ToString("x2"));
}

return sb.ToString();
}

public static void ExtractZipFile(byte[] data, string targetDirectoryPath)
Expand Down Expand Up @@ -124,9 +121,9 @@ public static void ExtractZipFile(byte[] data, string targetDirectoryPath)
continue;

// Write the file to disk
using (System.IO.FileStream stream = new System.IO.FileStream(targetPath, System.IO.FileMode.Create))
using (var e = entry.Open())
e.CopyTo(stream);
using System.IO.FileStream stream = new System.IO.FileStream(targetPath, System.IO.FileMode.Create);
using var e = entry.Open();
e.CopyTo(stream);
}
}
}
Expand Down
30 changes: 14 additions & 16 deletions Shared Libraries/SimpleJournal.Common/Helper/ZipFileHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,24 @@ namespace SimpleJournal.Common.Helper
/// </summary>
public static class ZipFileHelper
{
private static readonly byte[] ZipBytes1 = { 0x50, 0x4b, 0x03, 0x04, 0x0a };
private static readonly byte[] GzipBytes = { 0x1f, 0x8b };
private static readonly byte[] TarBytes = { 0x1f, 0x9d };
private static readonly byte[] LzhBytes = { 0x1f, 0xa0 };
private static readonly byte[] Bzip2Bytes = { 0x42, 0x5a, 0x68 };
private static readonly byte[] LzipBytes = { 0x4c, 0x5a, 0x49, 0x50 };
private static readonly byte[] ZipBytes2 = { 0x50, 0x4b, 0x05, 0x06 };
private static readonly byte[] ZipBytes3 = { 0x50, 0x4b, 0x07, 0x08 };
private static readonly byte[] ZipBytes4 = { 0x50, 0x4b, 0x03, 0x04 };
private static readonly byte[] ZipBytes1 = [0x50, 0x4b, 0x03, 0x04, 0x0a];
private static readonly byte[] GzipBytes = [0x1f, 0x8b];
private static readonly byte[] TarBytes = [0x1f, 0x9d];
private static readonly byte[] LzhBytes = [0x1f, 0xa0];
private static readonly byte[] Bzip2Bytes = [0x42, 0x5a, 0x68];
private static readonly byte[] LzipBytes = [0x4c, 0x5a, 0x49, 0x50];
private static readonly byte[] ZipBytes2 = [0x50, 0x4b, 0x05, 0x06];
private static readonly byte[] ZipBytes3 = [0x50, 0x4b, 0x07, 0x08];
private static readonly byte[] ZipBytes4 = [0x50, 0x4b, 0x03, 0x04];

public static byte[] GetFirstBytes(string filepath, int length)
{
using (var sr = new StreamReader(filepath))
{
sr.BaseStream.Seek(0, 0);
var bytes = new byte[length];
sr.BaseStream.Read(bytes, 0, length);
using var sr = new StreamReader(filepath);
sr.BaseStream.Seek(0, 0);
var bytes = new byte[length];
sr.BaseStream.ReadExactly(bytes, 0, length);

return bytes;
}
return bytes;
}

public static bool IsZipFile(string filepath)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Configurations>Debug;Release;Normal;UWPNew</Configurations>
Expand All @@ -27,10 +27,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="ByteUnit" Version="1.0.2" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="9.0.0" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="10.0.0" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions Shared Libraries/SimpleJournal.Common/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ namespace SimpleJournal.Common
{
public static class Strings
{
public const string Version = "0.6.7.0";
public const string StoreVersion = "1.670.0.0";
public const string Version = "0.7.0.0";
public const string StoreVersion = "1.700.0.0";
public const string Copyright = "Copyright © 2018-2025";

#if UWPNEW || NORMAL
public static readonly DateTime ReleaseDate = new DateTime(2024, 12, 28, 15, 10, 0);
public static readonly DateTime ReleaseDate = new DateTime(2025, 11, 15, 12, 0, 0);
#else
public static readonly DateTime ReleaseDate = DateTime.Now;
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;Normal;UWPNew</Configurations>
Expand All @@ -25,8 +25,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="14.3.0" />
<PackageReference Include="Magick.NET.Core" Version="14.3.0" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="14.9.1" />
<PackageReference Include="Magick.NET.Core" Version="14.9.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public ActionManager(DrawingCanvas canvas)
owner.OnChanged += Owner_OnChanged;
}

private void Owner_OnChanged(System.Windows.Ink.StrokeCollection strokes, System.Windows.UIElement child, ActionType value)
private void Owner_OnChanged(System.Windows.Ink.StrokeCollection? strokes, System.Windows.UIElement? child, ActionType value)
{
if ((strokes == null && child == null) || IgnoreEvents)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace SimpleJournal.Documents.UI.Controls
public partial class PageSplitter : UserControl
{
public delegate void onPageAdded(PageSplitter sender, PaperType paperType, Orientation orientation);
public event onPageAdded OnPageAdded;
public event onPageAdded OnPageAdded = null;

public PageSplitter()
{
Expand Down Expand Up @@ -46,9 +46,9 @@ private void ShowContextMenu(object sender, RoutedEventArgs e, PaperType type)
{
if (Settings.Instance.SkipOrientationMenu)
{
bool result = (bool)(OnCheckPages?.Invoke(new Func<IPaper, bool>((IPaper paper) => paper.Orientation == Orientation.Portrait)));
bool? result = OnCheckPages?.Invoke(new Func<IPaper, bool>((IPaper paper) => paper.Orientation == Orientation.Portrait));

if (result)
if (result == true)
{
// Hide menu and add the page in portrait format
OnPageAdded?.Invoke(this, type, Orientation.Portrait);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0-windows7.0</TargetFramework>
<TargetFramework>net10.0-windows7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
Expand Down
8 changes: 4 additions & 4 deletions Shared Libraries/SimpleJournal.Documents/Journal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Journal
private static readonly object sync = new object();

public delegate void onErrorOccurred(string message, string scope);
public static event onErrorOccurred OnErrorOccurred;
public static event onErrorOccurred OnErrorOccurred = null!;

[XmlIgnore]
private bool wasSavedAlready = false;
Expand Down Expand Up @@ -52,11 +52,11 @@ public class Journal
public string OriginalPath { get; set; } = "";

#region Pattern
public ChequeredPattern ChequeredPattern { get; set; }
public ChequeredPattern ChequeredPattern { get; set; } = null!;

public RuledPattern RuledPattern { get; set; }
public RuledPattern RuledPattern { get; set; } = null!;

public DottedPattern DottedPattern { get; set; }
public DottedPattern DottedPattern { get; set; } = null!;
#endregion

#region Load, Save, Update Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public XmlCDataSection ShapeCData
}

[XmlIgnore]
public string ShapeXML { get; set; }
public string ShapeXML { get; set; } = null!;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;Normal;UWPNew</Configurations>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0-windows7.0</TargetFramework>
<TargetFramework>net10.0-windows7.0</TargetFramework>
<Configurations>Debug;Release;Normal;UWPNew</Configurations>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
Expand Down
Loading
Loading