Skip to content

Commit

Permalink
Merge pull request #62 from andyld97/dev
Browse files Browse the repository at this point in the history
feat: Next update
  • Loading branch information
andyld97 authored Mar 26, 2024
2 parents c5b1d65 + 0a47313 commit 39a7c78
Show file tree
Hide file tree
Showing 41 changed files with 368 additions and 325 deletions.
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/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-2022")]
[assembly: AssemblyCopyright("Copyright © 2018-2024")]
[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>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Configurations>Debug;Release;Normal</Configurations>
</PropertyGroup>

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

<ItemGroup>
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="13.5.0" />
<PackageReference Include="Magick.NET.Core" Version="13.5.0" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="13.6.0" />
<PackageReference Include="Magick.NET.Core" Version="13.6.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="WebhookAPI" Version="1.0.4" />
<PackageReference Include="WebhookAPI" Version="1.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Helper Applications/PDF2J/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void Main(string[] args)
preInitalizationLogMessage = "Successfully initialized config file!";

if (!string.IsNullOrEmpty(GlobalConfig.WebHookUrl))
Webhook = new Webhook(GlobalConfig.WebHookUrl, "PDF2J");
Webhook = new Webhook(GlobalConfig.WebHookUrl, "PDF2J", true);
}
else
{
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-2023")]
[assembly: AssemblyCopyright("Copyright © 2018-2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
4 changes: 2 additions & 2 deletions Helper Applications/Touch/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("Touch")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Code A Software")]
[assembly: AssemblyCompany("Code A Software")]
[assembly: AssemblyProduct("Touch")]
[assembly: AssemblyCopyright("Copyright © 2018-2023")]
[assembly: AssemblyCopyright("Copyright © 2018-2024")]
[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-2023")]
[assembly: AssemblyCopyright("Copyright © 2020-2024")]
[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>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<OutputType>WinExe</OutputType>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
Expand All @@ -27,7 +27,7 @@
<ProjectReference Include="..\..\Shared Libraries\SimpleJournal.SharedResources\SimpleJournal.SharedResources.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DotnetRuntimeBootstrapper" Version="2.5.1">
<PackageReference Include="DotnetRuntimeBootstrapper" Version="2.5.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Code A Software (Andy)
Copyright (c) 2021-2024 Code A Software (Andy)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Welcome to the offical GitHub-Repo of SimpleJournal. SimpleJournal is a simple t
## Info

There are two versions of SimpleJournal due to compability issues, e.g. like supporting older versions of Windows. So we have the `normal version` which is running also on Windows 7 and the `store version`. If you want to download the non-store version [click here.](https://simplejournal.ca-soft.net/en/download)
Due to store-restrictions both versions are different: The normal version supports more features than the other, so therefore there are different builds: `UWP` and `Normal`. As you might have noticed that SimpleJournal is written in `WPF` (`.NET 7`), the Store-Version is not a real UWP-App. It is converted with the `Desktop Brdige` (`MSIX Packaging Tool`)
Due to store-restrictions both versions are different: The normal version supports more features than the other, so therefore there are different builds: `UWP` and `Normal`. As you might have noticed that SimpleJournal is written in `WPF` (`.NET 8`), the Store-Version is not a real UWP-App. It is converted with the `Desktop Bridge` (`MSIX Packaging Tool`)

### Features & Version Matrix

Expand Down Expand Up @@ -58,7 +58,7 @@ Converting large pdf files takes some time and require much computing power, so

### Limit: 100 Pages per document
Either using SimpleJournal itself or the converter api there is a limit of 100 pages per document. For large documents (`> 100 pages`) multiple journals gets created. This limition is to reduce the amount of memory the programm uses when displaying large documents.
A feature to "concat" the document (load the next document at the end of the current document or load the previous document at the end of the current document) is already planned to simplify the workflow using PDF journals.
To simplify the workflow regarding large PDF-documents, you can navigate between these documents. At the top you can load the previous document (if available) and at the bottom you can load the next document (if available). This can also be disabeld in the settings dialog.

## Build
In order to work with form or text-recognition you need to compile `Analyzer` and then all files should be copied automatically while publishing!
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-2022")]
[assembly: AssemblyCopyright("Copyright © 2020-2024")]
[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>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Configurations>Debug;Release;Normal;UWPNew</Configurations>
Expand Down Expand Up @@ -31,6 +31,6 @@
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.0" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.3" />
</ItemGroup>
</Project>
8 changes: 4 additions & 4 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.5.0";
public const string StoreVersion = "1.651.0.0";
public const string Copyright = "Copyright © 2018-2023";
public const string Version = "0.6.6.0";
public const string StoreVersion = "1.660.0.0";
public const string Copyright = "Copyright © 2018-2024";

#if UWPNEW || NORMAL
public static readonly DateTime ReleaseDate = new DateTime(2023, 12, 20, 18, 43, 0);
public static readonly DateTime ReleaseDate = new DateTime(2024, 03, 26, 13, 02, 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>net7.0</TargetFramework>
<TargetFramework>net8.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="13.5.0" />
<PackageReference Include="Magick.NET.Core" Version="13.5.0" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="13.6.0" />
<PackageReference Include="Magick.NET.Core" Version="13.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
22 changes: 11 additions & 11 deletions Shared Libraries/SimpleJournal.Documents.UI/Consts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,47 @@ public static class Consts
public const int TrapezeOffset = 30;
public const int DefaultLineStrokeDashOffset = 1;
public const int RulerCompensationOffset = 10;
public static readonly DoubleCollection LineStrokeDottedDashArray = new DoubleCollection() { 0.03, 2 };
public static readonly DoubleCollection LineStrokeDashedDashArray = new DoubleCollection() { 4, 3 };
public static readonly DoubleCollection LineStrokeDottedDashArray = [0.03, 2];
public static readonly DoubleCollection LineStrokeDashedDashArray = [4, 3];
public static readonly string AnalyzerPath = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "Analyzer.exe");

#region Pen and Stroke Sizes
/// <summary>
/// The sizes for the stylus
/// </summary>
public static readonly List<Size> StrokeSizes = new List<Size>()
{
public static readonly List<Size> StrokeSizes =
[
// Default size of InkCanvas
new Size(1, 1),
new Size(2.0031496062992127, 2.0031496062992127),
new Size(3, 3),
new Size(6, 6),
new Size(9, 9),
};
];

/// <summary>
/// The sizes for the rubber
/// </summary>
public static readonly List<Size> RubberSizes = new List<Size>()
{
public static readonly List<Size> RubberSizes =
[
new Size(8, 8),
new Size(15, 15),
new Size(30, 30),
new Size(35, 35),
new Size(40, 40),
};
];

/// <summary>
/// The sizes for the textmarker
/// </summary>
public static readonly List<Size> TextMarkerSizes = new List<Size>()
{
public static readonly List<Size> TextMarkerSizes =
[
new Size(15, 20),
new Size(20, 20),
new Size(30, 20),
new Size(40, 20),
new Size(50, 20),
};
];

#endregion
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ public bool ConvertSelectedStrokesToShape()

public static string[] StartAnalyzingProcess(StrokeCollection sc, Operation operation, string[]? additionalArguments = null)
{
List<string> lines = new List<string>();
List<string> lines = [];

try
{
Expand Down Expand Up @@ -1191,11 +1191,8 @@ protected override void OnPreviewKeyDown(KeyEventArgs e)
{
e.Handled = true;
// Handle to make sure object will disappear from object bar (side bar)
List<UIElement> temp = new List<UIElement>();
foreach (UIElement child in GetSelectedElements())
{
temp.Add(child);
}
List<UIElement> temp = [.. GetSelectedElements()];

foreach (UIElement elem in temp)
Children.Remove(elem);

Expand All @@ -1210,7 +1207,7 @@ protected override void OnSelectionMoving(InkCanvasSelectionEditingEventArgs e)
base.OnSelectionMoving(e);
DrawingCanvas.Change = true;

List<PropertyChangedAction> actions = new List<PropertyChangedAction>();
List<PropertyChangedAction> actions = [];

// Idea:
// Get current positions and calculate the new ones to get all necessary values for the PropertyChangedAction
Expand Down
8 changes: 4 additions & 4 deletions Shared Libraries/SimpleJournal.Documents.UI/Data/Clipboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ public class Clipboard
/// <summary>
/// Elements like shapes, images ...
/// </summary>
public List<UIElement> Children { get; set; } = new List<UIElement>();
public List<UIElement> Children { get; set; } = [];

/// <summary>
/// Position of elements
/// </summary>
public List<Point> ChildPoints { get; set; } = new List<Point>();
public List<Point> ChildPoints { get; set; } = [];

/// <summary>
/// Drawn strokes from user
/// </summary>
public StrokeCollection Strokes { get; set; } = new StrokeCollection();
public StrokeCollection Strokes { get; set; } = [];

/// <summary>
/// Determines if the clipboard is empty
Expand Down Expand Up @@ -49,7 +49,7 @@ public void Clear()
public void Renew()
{
Strokes = Strokes.Clone();
List<UIElement> newElements = new List<UIElement>();
List<UIElement> newElements = [];
foreach (UIElement child in Children)
newElements.Add(UIHelper.CloneElement(child));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ public static System.Windows.Media.Color BuildConstrastColor(this System.Windows

public static void ClearAll(this ObservableCollection<UIElement> collection, DrawingCanvas canvas)
{
List<UIElement> childs = new List<UIElement>();
foreach (UIElement child in collection)
childs.Add(child);
List<UIElement> childs = [.. collection];

foreach (UIElement child in childs)
canvas.Children.Remove(child);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.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>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<Configurations>Debug;Release;Normal;UWPNew</Configurations>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
Expand Down
1 change: 1 addition & 0 deletions SimpleJournal.sln
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Store Packages", "Store Pac
Store Packages\ReferencePackage (SimpleJournal) (80) (1.630.0.0) (05.08.23).msix = Store Packages\ReferencePackage (SimpleJournal) (80) (1.630.0.0) (05.08.23).msix
Store Packages\ReferencePackage (SimpleJournal) (81) (1.630.1.0) (06.08.23) HotFix.msix = Store Packages\ReferencePackage (SimpleJournal) (81) (1.630.1.0) (06.08.23) HotFix.msix
Store Packages\ReferencePackage (SimpleJournal) (82) (1.640.0.0) (01.11.23).msix = Store Packages\ReferencePackage (SimpleJournal) (82) (1.640.0.0) (01.11.23).msix
Store Packages\ReferencePackage (SimpleJournal) (85) (1.660.0.0) (26.03.24).msix = Store Packages\ReferencePackage (SimpleJournal) (85) (1.660.0.0) (26.03.24).msix
EndProjectSection
EndProject
Global
Expand Down
2 changes: 1 addition & 1 deletion SimpleJournal/Consts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static class Consts
/// <summary>
/// The .NET version which was used to compile SJ
/// </summary>
public static readonly Version CompiledDotnetVersion = new Version(8, 0, 0);
public static readonly Version CompiledDotnetVersion = new Version(8, 0, 3);

/// <summary>
/// Polling interval for NotificationService
Expand Down
3 changes: 1 addition & 2 deletions SimpleJournal/Data/RecentlyOpenedDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ private static List<Document> Load()
// Silence is golden
}


if (result == null)
{
result = new List<Document>();
result = [];
Save(result);
}

Expand Down
11 changes: 6 additions & 5 deletions SimpleJournal/Dialogs/RecoverAutoBackupFileDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public partial class RecoverAutoBackupFileDialog : Window
{
private bool ignoreOnClosingEvent = false;

private List<System.IO.FileInfo> BackupFiles { get; set; } = new List<System.IO.FileInfo>();
private List<System.IO.FileInfo> BackupFiles { get; set; } = [];

private List<BackupDataItem> BackupItems { get; set; } = new List<BackupDataItem>();
private List<BackupDataItem> BackupItems { get; set; } = [];

public RecoverAutoBackupFileDialog()
{
Expand Down Expand Up @@ -101,7 +101,7 @@ private async void Bi_OnRecievedAction(bool discard, BackupDataItem item)

private async Task<List<System.IO.FileInfo>> GetAllBackupFiles()
{
List<System.IO.FileInfo> backupFiles = new List<System.IO.FileInfo>();
List<System.IO.FileInfo> backupFiles = [];

if (!System.IO.Directory.Exists(Consts.AutoSaveDirectory))
return backupFiles;
Expand Down Expand Up @@ -327,8 +327,9 @@ private async void ButtonRecoverAll_Click(object sender, RoutedEventArgs e)
}
}

List<string> filesToOpen = new List<string>();
var temp = new List<BackupDataItem>(BackupItems);
List<string> filesToOpen = [];
List<BackupDataItem> temp = [.. BackupItems];

foreach (var item in temp)
{
// Pass path to make sure opening the FolderBrowserDialog only once!
Expand Down
Loading

0 comments on commit 39a7c78

Please sign in to comment.