Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| df11b65c05 | |||
| fc963d88f7 | |||
| 600ae58f25 | |||
| 0783e0b544 | |||
| d90cd1354f | |||
| f4dd498d22 | |||
| cd71df8a8e | |||
| de621fe9dc |
@@ -3,7 +3,7 @@
|
||||
; Non-commercial use only
|
||||
|
||||
#define MyAppName "MayShow"
|
||||
#define MyAppVersion "1.4.1"
|
||||
#define MyAppVersion "1.4.2"
|
||||
#define MyAppPublisher "Quickity Quack Productions"
|
||||
#define MyAppExeName "MayShow.exe"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
VERSION="1.4.1"
|
||||
VERSION="1.4.2"
|
||||
SRC_DIR="src" # user ran script from main folder
|
||||
if [ ! -d "$SRC_DIR" ]; then
|
||||
SRC_DIR= "../src" # try
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<AvaloniaVersion>11.3.12</AvaloniaVersion>
|
||||
<AvaloniaVersion>12.0.0</AvaloniaVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace MayShow.Helpers;
|
||||
|
||||
class Constants
|
||||
{
|
||||
public static string AppVersion = "1.4.1";
|
||||
public static string AppVersion = "1.4.2";
|
||||
|
||||
public static string[] AllowedFileExtensionPatterns = [ "*.png", "*.jpg", "*.jpeg", "*.gif", "*.bmp", "*.webp", "*.pdf", "*.heic", ];
|
||||
public static string[] AllowedFileExtensionsNoStar = [ "png", "jpg", "jpeg", "gif", "bmp", "webp", "pdf", "heic", ];
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Text.RegularExpressions;
|
||||
using Tmds.DBus.Protocol;
|
||||
|
||||
namespace MayShows.Helpers;
|
||||
|
||||
@@ -23,16 +25,27 @@ class Utilities
|
||||
public static DateOnly? CheckValidDateInString(string str)
|
||||
{
|
||||
// https://stackoverflow.com/a/14918404/3938401
|
||||
var rgx = new Regex(@"\d{4}-\d{2}-\d{2}");
|
||||
var mat = rgx.Match(str);
|
||||
if (mat.Success)
|
||||
// formats = regex format -> DateTime parsing format
|
||||
var formats = new Dictionary<string, string>
|
||||
{
|
||||
var dtStr = mat.ToString();
|
||||
string[] formats = ["yyyy-MM-dd"];
|
||||
DateTime parsedDateTime;
|
||||
var didWork = DateTime.TryParseExact(dtStr, formats, CultureInfo.InvariantCulture,
|
||||
DateTimeStyles.None, out parsedDateTime);
|
||||
return didWork ? DateOnly.FromDateTime(parsedDateTime) : null;
|
||||
{@"\d{4}-\d{2}-\d{2}", "yyyy-MM-dd"},
|
||||
{@"\d{4}.d{2}.d{2}", "yyyy.MM.dd"},
|
||||
{@"\d{8}", "yyyyMMdd"}
|
||||
};
|
||||
foreach (var data in formats)
|
||||
{
|
||||
var rgx = new Regex(data.Key);
|
||||
var mat = rgx.Match(str);
|
||||
if (mat.Success)
|
||||
{
|
||||
var dtStr = mat.ToString();
|
||||
var didWork = DateTime.TryParseExact(dtStr, [data.Value], CultureInfo.InvariantCulture,
|
||||
DateTimeStyles.None, out var parsedDateTime);
|
||||
if (didWork)
|
||||
{
|
||||
return DateOnly.FromDateTime(parsedDateTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
+7
-7
@@ -12,7 +12,7 @@
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<PublishAot>true</PublishAot>
|
||||
<AssemblyName>MayShow</AssemblyName>
|
||||
<AssemblyVersion>1.4.1</AssemblyVersion> <!-- Also update Constants version -->
|
||||
<AssemblyVersion>1.4.2</AssemblyVersion> <!-- Also update Constants version -->
|
||||
<ApplicationIcon>MayShow-icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
@@ -53,15 +53,15 @@
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersion)" />
|
||||
<PackageReference Include="Avalonia.Fonts.Inter" Version="$(AvaloniaVersion)" />
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)" />
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)">
|
||||
<!-- <PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)">
|
||||
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</PackageReference> -->
|
||||
<PackageReference Include="PDFsharp-MigraDoc" Version="6.2.4" />
|
||||
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="14.10.4" />
|
||||
<PackageReference Include="Deadpikle.AvaloniaProgressRing" Version="0.10.11-preview20251127001" />
|
||||
<PackageReference Include="DialogHost.Avalonia" Version="0.10.4" />
|
||||
<PackageReference Include="Xaml.Behaviors.Interactions.DragAndDrop.DataGrid" Version="11.3.9.5" />
|
||||
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="14.11.1" />
|
||||
<PackageReference Include="Deadpikle.AvaloniaProgressRing" Version="0.11.0" />
|
||||
<PackageReference Include="DialogHost.Avalonia" Version="0.11.1" />
|
||||
<PackageReference Include="Xaml.Behaviors.Interactions.DragAndDrop.DataGrid" Version="12.0.0-rc1" />
|
||||
<PackageReference Include="Docnet.Core" Version="2.6.0" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12" />
|
||||
</ItemGroup>
|
||||
|
||||
+12
-1
@@ -17,5 +17,16 @@ class Program
|
||||
=> AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.WithInterFont()
|
||||
.LogToTrace();
|
||||
.LogToTrace()
|
||||
.With(new AvaloniaNativePlatformOptions
|
||||
{
|
||||
// https://github.com/AvaloniaUI/Avalonia/issues/20971
|
||||
RenderingMode =
|
||||
[
|
||||
// put OpenGL first, to have higher priority over Metal
|
||||
AvaloniaNativeRenderingMode.OpenGl,
|
||||
AvaloniaNativeRenderingMode.Metal,
|
||||
AvaloniaNativeRenderingMode.Software
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ using SixLabors.ImageSharp.Processing;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
using Docnet.Core.Readers;
|
||||
using MigraDoc.DocumentObjectModel.Visitors;
|
||||
using Avalonia.Input.Platform;
|
||||
|
||||
namespace MayShow.ViewModels;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ using PdfSharp.Snippets.Font;
|
||||
using MayShow.Interfaces;
|
||||
using MayShow.Models;
|
||||
using MayShow.Helpers;
|
||||
using MayShows.Helpers;
|
||||
|
||||
namespace MayShow.ViewModels;
|
||||
|
||||
@@ -126,6 +127,18 @@ class SettingsViewModel: ChangeNotifier
|
||||
}
|
||||
}
|
||||
|
||||
public void OpenSettingsDir()
|
||||
{
|
||||
var topLevel = _topLevelGrabber?.GetTopLevel();
|
||||
Console.WriteLine(Utilities.GetInternalDataPath());
|
||||
var dirName = Utilities.GetInternalDataPath();
|
||||
if (topLevel is not null && dirName != null)
|
||||
{
|
||||
var launcher = topLevel.Launcher;
|
||||
launcher.LaunchUriAsync(new Uri(dirName));
|
||||
}
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
DialogHost.Close("DialogHost", null);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
MaxWidth="450">
|
||||
<StackPanel Orientation="Vertical"
|
||||
Spacing="4">
|
||||
<TextBlock Text="MayShow 1.4.1"
|
||||
<TextBlock Text="MayShow 1.4.2"
|
||||
HorizontalAlignment="Center"
|
||||
TextWrapping="Wrap"
|
||||
FontSize="18"
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
FontSize="16"
|
||||
FontWeight="Bold" />
|
||||
<Label Content="Title" />
|
||||
<TextBox Watermark="Title"
|
||||
<TextBox PlaceholderText="Title"
|
||||
Text="{Binding ClonedFile.Title}"
|
||||
VerticalAlignment="Stretch"
|
||||
TextWrapping="Wrap" />
|
||||
<Label Content="Notes" />
|
||||
<TextBox Watermark="Notes"
|
||||
<TextBox PlaceholderText="Notes"
|
||||
Text="{Binding ClonedFile.Notes}"
|
||||
VerticalAlignment="Stretch"
|
||||
AcceptsReturn="True"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
IsVisible="{Binding IsTitleBoxVisible}" />
|
||||
<TextBox Text="{Binding ReportTitle}"
|
||||
IsVisible="{Binding IsTitleBoxVisible}"
|
||||
Watermark="Receipts December 2024"
|
||||
PlaceholderText="Receipts December 2024"
|
||||
Margin="2,0,2,4"
|
||||
Classes="clearButton"
|
||||
Name="TitleTextBox">
|
||||
@@ -121,7 +121,7 @@
|
||||
<DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataTemplate DataType="models:ReportFile">
|
||||
<TextBox Text="{Binding Title}"
|
||||
Watermark="Title"
|
||||
PlaceholderText="Title"
|
||||
ToolTip.Tip="{Binding Title}"
|
||||
Classes="clearButton">
|
||||
<TextBox.KeyBindings>
|
||||
|
||||
@@ -27,7 +27,7 @@ public partial class MainView : UserControl
|
||||
public void UnfocusTextbox()
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
topLevel?.FocusManager?.ClearFocus();
|
||||
topLevel?.FocusManager?.Focus(null);
|
||||
if (DataContext is MainViewModel mvm)
|
||||
{
|
||||
mvm?.HasUnsavedWork = true;
|
||||
|
||||
@@ -47,6 +47,11 @@
|
||||
VerticalAlignment="Top"/>
|
||||
</Grid>
|
||||
<CheckBox IsChecked="{Binding SaveReportJsonDataInInternalDir}">Save report data (names, notes, etc.) in MayShow settings directory (saves in working directory by default)</CheckBox>
|
||||
<Button Command="{Binding OpenSettingsDir}">
|
||||
<TextBlock>
|
||||
<Run Text=""
|
||||
FontFamily="{StaticResource FontAwesomeSolid}" /> Open MayShow Settings Directory</TextBlock>
|
||||
</Button>
|
||||
<TextBlock TextWrapping="Wrap"
|
||||
Foreground="Red"
|
||||
Text="{Binding ErrorMessage}"
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
<!-- This manifest is used on Windows only.
|
||||
Don't remove it as it might cause problems with window transparency and embedded controls.
|
||||
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
|
||||
<assemblyIdentity version="1.4.1.0" name="MayShow.Desktop"/>
|
||||
<assemblyIdentity version="1.4.2.0" name="MayShow.Desktop"/>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
|
||||
Reference in New Issue
Block a user