Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 820187c19d | |||
| b76ed1e627 | |||
| 23d1d202d0 | |||
| 615f8e3f61 | |||
| 55b5013184 | |||
| f3dedb0a2e | |||
| a1b1e24bea | |||
| c9206bb065 | |||
| 3b04f73270 | |||
| dbcbdfe452 | |||
| a57c5f7af6 | |||
| 96aaa43d1c | |||
| 07a369e462 | |||
| 5b03ab8dc3 | |||
| 4166da1eb2 | |||
| 2531beab05 | |||
| 08f0db97c1 | |||
| b18a8ead6a | |||
| 0d4c1b90c2 | |||
| 83f2ea88b5 | |||
| b501abf447 | |||
| e9eaa0c98c | |||
| 460da5dda8 | |||
| b3b9aa5c79 | |||
| ff38722e6c | |||
| f9294be2dd | |||
| 4f569c6fa7 |
@@ -7,7 +7,7 @@
|
||||
xmlns:behaviors="clr-namespace:DialogHostAvalonia;assembly=DialogHost.Avalonia"
|
||||
xmlns:helpers="clr-namespace:ReceiptPDFBuilder.Helpers"
|
||||
RequestedThemeVariant="Default"
|
||||
Name="Receipt PDF Builder">
|
||||
Name="MayShow">
|
||||
<Application.Styles>
|
||||
<FluentTheme />
|
||||
<StyleInclude Source="avares://AvaloniaProgressRing/Styles/ProgressRing.xaml"/>
|
||||
@@ -116,8 +116,8 @@
|
||||
<PathGeometry x:Key="IconGrabberGeometry">M15 18a1 1 0 100-2 1 1 0 000 2zm1-6a1 1 0 11-2 0 1 1 0 012 0zm-7 6a1 1 0 100-2 1 1 0 000 2zm0-5a1 1 0 100-2 1 1 0 000 2zm7-6a1 1 0 11-2 0 1 1 0 012 0zM9 8a1 1 0 100-2 1 1 0 000 2z</PathGeometry>
|
||||
<GeometryDrawing x:Key="IconGrabber" Brush="{DynamicResource DragDropBrush}" Geometry="{StaticResource IconGrabberGeometry}" />
|
||||
|
||||
<FontFamily x:Key="FontAwesomeRegular">avares://ReceiptPDFBuilder/Assets/Fonts/FontAwesome/Font Awesome 7 Free-Regular-400.otf#Font Awesome 7 Free Regular</FontFamily>
|
||||
<FontFamily x:Key="FontAwesomeSolid">avares://ReceiptPDFBuilder/Assets/Fonts/FontAwesome/Font Awesome 7 Free-Solid-900.otf#Font Awesome 7 Free Solid</FontFamily>
|
||||
<FontFamily x:Key="FontAwesomeRegular">avares://MayShow/Assets/Fonts/FontAwesome/Font Awesome 7 Free-Regular-400.otf#Font Awesome 7 Free Regular</FontFamily>
|
||||
<FontFamily x:Key="FontAwesomeSolid">avares://MayShow/Assets/Fonts/FontAwesome/Font Awesome 7 Free-Solid-900.otf#Font Awesome 7 Free Solid</FontFamily>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
<NativeMenu.Menu>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 421 KiB |
@@ -5,7 +5,7 @@ namespace ReceiptPDFBuilder.Helpers;
|
||||
|
||||
class Constants
|
||||
{
|
||||
public static string AppVersion = "1.0.0";
|
||||
public static string AppVersion = "1.1.0";
|
||||
|
||||
public static string[] GetQuotes()
|
||||
{
|
||||
@@ -17,7 +17,7 @@ class Constants
|
||||
return [
|
||||
"When in the crucible of life, always remember to take your friends with you.",
|
||||
"What do you call a paper airplane that won't fly? Stationary.",
|
||||
"I used to be addicted to Dad jokes, but now I'm all groan up.",
|
||||
"I used to be addicted to dad jokes, but now I'm all groan up.",
|
||||
"I used to have a phobia about speed bumps. But I'm slowly getting over it.",
|
||||
"Be careful trusting stairs. They're always up to something.",
|
||||
"What do you call a fish with no eye? A fsh",
|
||||
|
||||
+20
-5
@@ -1,11 +1,26 @@
|
||||
The MIT with no AI License
|
||||
MIT NON-AI License
|
||||
|
||||
Copyright (c) 2026 Deadpikle
|
||||
Copyright (c) 2026, Deadpikle
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
In addition, the following restrictions apply:
|
||||
|
||||
Under no circumstances can this software, its builds, its information, or its code be used for any AI-related training, code, programs, etc.
|
||||
1. The Software and any modifications made to it may not be used for the purpose of training or improving machine learning algorithms,
|
||||
including but not limited to artificial intelligence, natural language processing, or data mining. This condition applies to any derivatives,
|
||||
modifications, or updates based on the Software code. Any usage of the Software in an AI-training dataset is considered a breach of this License.
|
||||
|
||||
2. The Software may not be included in any dataset used for training or improving machine learning algorithms,
|
||||
including but not limited to artificial intelligence, natural language processing, or data mining.
|
||||
|
||||
3. Any person or organization found to be in violation of these restrictions will be subject to legal action and may be held liable
|
||||
for any damages resulting from such use.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+3
-3
@@ -4,14 +4,14 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="ReceiptPDFBuilder.MainWindow"
|
||||
Title="Receipt PDF Builder"
|
||||
Title="MayShow"
|
||||
xmlns:vm="clr-namespace:ReceiptPDFBuilder.ViewModels"
|
||||
xmlns:dialogHost="clr-namespace:DialogHostAvalonia;assembly=DialogHost.Avalonia"
|
||||
x:DataType="vm:MainWindowViewModel"
|
||||
Width="800"
|
||||
MinWidth="400"
|
||||
MinWidth="550"
|
||||
Height="650"
|
||||
MinHeight="450">
|
||||
MinHeight="550">
|
||||
<dialogHost:DialogHost CloseOnClickAway="False"
|
||||
Identifier="DialogHost">
|
||||
<dialogHost:DialogHost.DialogContent>
|
||||
|
||||
+13
-1
@@ -60,7 +60,13 @@ class ReportFile : ChangeNotifier
|
||||
public string FilePath
|
||||
{
|
||||
get => _filePath;
|
||||
set { _filePath = value; NotifyPropertyChanged(); }
|
||||
set
|
||||
{
|
||||
_filePath = value;
|
||||
NotifyPropertyChanged();
|
||||
NotifyPropertyChanged(nameof(FileName));
|
||||
NotifyPropertyChanged(nameof(IsFileFoundOnDisk));
|
||||
}
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
@@ -68,4 +74,10 @@ class ReportFile : ChangeNotifier
|
||||
{
|
||||
get => Path.GetFileName(_filePath);
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public bool IsFileFoundOnDisk
|
||||
{
|
||||
get => File.Exists(FilePath);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
Throws a folder of images and PDFs into a single PDF. Simple tool for my own use, really, but maybe helpful to someone else.
|
||||
|
||||
Icon from [Font Awesome](https://fontawesome.com/license/free).
|
||||

|
||||
|
||||
Icon is from [Font Awesome](https://fontawesome.com/license/free) and generated via [Gauger's FontAwesome icon tool](https://gauger.me/fonticon/) and the macOS software [Icon Composer](https://developer.apple.com/icon-composer/).
|
||||
|
||||
Most contributions are welcome; however, no contributions made from AI tools or related software are allowed.
|
||||
@@ -11,8 +11,8 @@
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<PublishAot>true</PublishAot>
|
||||
<AssemblyName>ReceiptPDFBuilder</AssemblyName>
|
||||
<AssemblyVersion>1.0.0</AssemblyVersion> <!-- Also update Constants version -->
|
||||
<AssemblyName>MayShow</AssemblyName>
|
||||
<AssemblyVersion>1.1.0</AssemblyVersion> <!-- Also update Constants version -->
|
||||
<ApplicationIcon>ReceiptPDFBuilder-icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
*-add preview or open button or something to each item
|
||||
https://gitflic.ru/project/jackhammer/pdf-forge-net/file?commit=7bdce6132a70ab12664a8f2482003836c7af2ab6
|
||||
|
||||
*-check if last remembered dir exists on auto-load!
|
||||
*-show working directory
|
||||
*-set DMG title in publish
|
||||
*-Get linux publish command working and zip up/publish
|
||||
dotnet publish -c Release -r linux-x64 -p:StripSymbols=False -p:PublishAot=False
|
||||
dotnet publish -c Release -r linux-arm64 -p:StripSymbols=False -p:PublishAot=False
|
||||
|
||||
---Publishing---
|
||||
*-Published app has unneeded .DSYM file (fixed via .app builder)
|
||||
*-Published app has Assets folder already copied to it; don't want that in output macOS folder but it's being copied there anyway (fixed via .app builder)
|
||||
|
||||
+120
-12
@@ -44,7 +44,7 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
var quotes = Constants.GetQuotes();
|
||||
Random random = new Random();
|
||||
var quoteIndex = random.Next(0, quotes.Length);
|
||||
_createPDFLog = "----- Receipt PDF Builder v" + Constants.AppVersion + "------" + Environment.NewLine;
|
||||
_createPDFLog = "----- MayShow v" + Constants.AppVersion + "------" + Environment.NewLine;
|
||||
_createPDFLog += quotes[quoteIndex] + Environment.NewLine;
|
||||
_createPDFLog += "---------------------------------------" + Environment.NewLine;
|
||||
_createPDFLog += "Ready to create PDF!";
|
||||
@@ -75,7 +75,13 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
public bool IsCreatingPDF
|
||||
{
|
||||
get => _isCreatingPDF;
|
||||
set { _isCreatingPDF = value; NotifyPropertyChanged(); NotifyPropertyChanged(nameof(IsCreatePDFButtonEnabled)); }
|
||||
set
|
||||
{
|
||||
_isCreatingPDF = value;
|
||||
NotifyPropertyChanged();
|
||||
NotifyPropertyChanged(nameof(IsCreatePDFButtonEnabled));
|
||||
NotifyPropertyChanged(nameof(HasWorkingFolderAndNotMakingPDF));
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsCreatePDFButtonEnabled
|
||||
@@ -83,6 +89,28 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
get => !_isCreatingPDF && _reportFiles.Count > 0;
|
||||
}
|
||||
|
||||
public bool HasWorkingFolder
|
||||
{
|
||||
get => !string.IsNullOrWhiteSpace(_workingFolder) && Directory.Exists(_workingFolder);
|
||||
}
|
||||
|
||||
public bool HasWorkingFolderAndNotMakingPDF
|
||||
{
|
||||
get => !string.IsNullOrWhiteSpace(_workingFolder) && Directory.Exists(_workingFolder) && !_isCreatingPDF;
|
||||
}
|
||||
|
||||
public string WorkingFolder
|
||||
{
|
||||
get => _workingFolder;
|
||||
set
|
||||
{
|
||||
_workingFolder = value;
|
||||
NotifyPropertyChanged();
|
||||
NotifyPropertyChanged(nameof(HasWorkingFolder));
|
||||
NotifyPropertyChanged(nameof(HasWorkingFolderAndNotMakingPDF));
|
||||
}
|
||||
}
|
||||
|
||||
public string CreatePDFLog
|
||||
{
|
||||
get => _createPDFLog;
|
||||
@@ -92,7 +120,15 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
public ObservableCollection<ReportFile> ReportFiles
|
||||
{
|
||||
get => _reportFiles;
|
||||
set { _reportFiles = value; NotifyPropertyChanged(); }
|
||||
set
|
||||
{
|
||||
_reportFiles = value;
|
||||
NotifyPropertyChanged();
|
||||
_reportFiles.CollectionChanged += ( sender, e ) =>
|
||||
{
|
||||
NotifyPropertyChanged(nameof(IsCreatePDFButtonEnabled));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private void LogInfo(string message, params object[]? arguments)
|
||||
@@ -129,7 +165,7 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
{
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
_workingFolder = path;
|
||||
WorkingFolder = path;
|
||||
NotifyPropertyChanged(nameof(IsTitleBoxVisible));
|
||||
var reportFilePath = Path.Combine(path, GetReportSavedDataFileName());
|
||||
var successfullyLoadedPriorReport = false;
|
||||
@@ -143,7 +179,7 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
{
|
||||
ReportFiles = new ObservableCollection<ReportFile>(report.Files);
|
||||
ReportTitle = report.Title;
|
||||
_workingFolder = report.BaseFolder;
|
||||
WorkingFolder = report.BaseFolder;
|
||||
_lastGeneratedTime = report.LastGenerated ?? null;
|
||||
LogInfo("Reloaded report last saved at {0}", report.LastSaved);
|
||||
successfullyLoadedPriorReport = true;
|
||||
@@ -152,6 +188,8 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
if (!successfullyLoadedPriorReport)
|
||||
{
|
||||
// Scan folder for files and display in DataGrid
|
||||
ReportFiles.Clear();
|
||||
ReportTitle = "";
|
||||
var filePaths = Directory.GetFiles(_workingFolder);
|
||||
foreach (var filePath in filePaths)
|
||||
{
|
||||
@@ -160,6 +198,11 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
ResortPDFItemsByDate();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogInfo("Error: The directory {0} does not exist. Please select another folder.", path);
|
||||
}
|
||||
NotifyPropertyChanged(nameof(IsCreatePDFButtonEnabled));
|
||||
}
|
||||
|
||||
public void ShowAbout()
|
||||
@@ -253,7 +296,7 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
var didMatch = false;
|
||||
foreach (var fileExtension in fileExtensions)
|
||||
{
|
||||
if (filePath.EndsWith("." + fileExtension))
|
||||
if (filePath.ToLower().EndsWith("." + fileExtension.ToLower()))
|
||||
{
|
||||
didMatch = true;
|
||||
break;
|
||||
@@ -277,6 +320,41 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
}
|
||||
}
|
||||
|
||||
public void LocateFile(object f) => LocateFileImpl((ReportFile) f);
|
||||
public async void LocateFileImpl(ReportFile reportFile)
|
||||
{
|
||||
var topLevel = TopLevelGrabber?.GetTopLevel();
|
||||
if (topLevel is not null)
|
||||
{
|
||||
var files = await topLevel.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions()
|
||||
{
|
||||
Title = "Choose image or PDF file...",
|
||||
AllowMultiple = false,
|
||||
FileTypeFilter = [
|
||||
new FilePickerFileType("All Types")
|
||||
{
|
||||
Patterns = GetAllowedFileExtensionPatterns(),
|
||||
AppleUniformTypeIdentifiers = [ "public.image", "com.adobe.pdf", "public.heic" ],
|
||||
MimeTypes = [ "image/*", "application/pdf", "image/heic" ]
|
||||
},
|
||||
FilePickerFileTypes.ImageAll,
|
||||
new FilePickerFileType("HEIC Images")
|
||||
{
|
||||
Patterns = [ "*.heic" ],
|
||||
AppleUniformTypeIdentifiers = [ "public.heic" ],
|
||||
MimeTypes = [ "image/heic" ]
|
||||
},
|
||||
FilePickerFileTypes.Pdf,
|
||||
],
|
||||
});
|
||||
if (files.Count > 0)
|
||||
{
|
||||
var file = files[0];
|
||||
reportFile.FilePath = file.Path.LocalPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/AvaloniaUI/Avalonia/issues/10075
|
||||
public void OpenFile(object f) => OpenFileImpl((ReportFile)f);
|
||||
public void OpenFileImpl(ReportFile file)
|
||||
@@ -507,7 +585,14 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
imageTitlePar.Format.Font.Size = 12;
|
||||
imageTitlePar.Format.Font.Bold = true;
|
||||
imageTitlePar.Format.Font.Name = "Noto Sans JP"; // has english letters in it, too
|
||||
if (string.IsNullOrWhiteSpace(file.Title))
|
||||
{
|
||||
imageTitlePar.AddText(file.FileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageTitlePar.AddText(file.Title);
|
||||
}
|
||||
var receiptDatePar = section.AddParagraph();
|
||||
receiptDatePar.Format.Alignment = ParagraphAlignment.Center;
|
||||
receiptDatePar.Format.Font.Size = 12;
|
||||
@@ -525,35 +610,58 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
}
|
||||
section.AddParagraph(); // add empty line for spacing
|
||||
// now add the image
|
||||
var isPDF = fileName.EndsWith(".pdf");
|
||||
var lowerName = fileName.ToLower();
|
||||
var isPDF = lowerName.EndsWith(".pdf");
|
||||
// convert heic, webp, or png to JPEG for size and ease of use
|
||||
// (and probably compat reasons too, though I haven't tested that...)
|
||||
var lowerName = fileName.ToLower();
|
||||
var isHEIC = lowerName.EndsWith(".heic");
|
||||
var isWebp = lowerName.EndsWith(".webp");
|
||||
var isPNG = lowerName.EndsWith(".png");
|
||||
var info = new FileInfo(file.FilePath);
|
||||
uint loadedImageWidth = 0;
|
||||
uint loadedImageHeight = 0;
|
||||
if (isHEIC || isWebp || isPNG)
|
||||
{
|
||||
// Save image as jpg
|
||||
var convertedDir = Path.Combine(folderPath, "converted");
|
||||
if (!Directory.Exists(convertedDir))
|
||||
{
|
||||
Directory.CreateDirectory(convertedDir);
|
||||
}
|
||||
var info = new FileInfo(file.FilePath);
|
||||
using var mImage = new MagickImage(info.FullName);
|
||||
// Save frame as jpg
|
||||
var outputPath = Path.Combine(convertedDir, info.Name + ".jpg");
|
||||
using var mImage = new MagickImage(info.FullName);
|
||||
loadedImageWidth = mImage.Width;
|
||||
loadedImageHeight = mImage.Height;
|
||||
mImage.Quality = 80;
|
||||
mImage.Scale((uint)Math.Floor(mImage.Width * 0.5), (uint)Math.Floor(mImage.Height * 0.5));
|
||||
if (mImage.Width >= 400 || mImage.Height >= 400)
|
||||
{
|
||||
loadedImageWidth = (uint)Math.Floor(mImage.Width * 0.5);
|
||||
loadedImageHeight = (uint)Math.Floor(mImage.Height * 0.5);
|
||||
mImage.Scale(loadedImageWidth, loadedImageHeight);
|
||||
}
|
||||
await mImage.WriteAsync(outputPath);
|
||||
filePath = Path.Combine("Converted", info.Name + ".jpg");
|
||||
LogInfo(string.Format("Converted image to JPEG; fileName is now {0}", file.FilePath));
|
||||
}
|
||||
else if (!isPDF)
|
||||
{
|
||||
// load height/width
|
||||
using var mImage = new MagickImage(info.FullName);
|
||||
loadedImageWidth = mImage.Width;
|
||||
loadedImageHeight = mImage.Height;
|
||||
}
|
||||
var paragraph = section.AddParagraph();
|
||||
paragraph.Format.Alignment = ParagraphAlignment.Center;
|
||||
var image = paragraph.AddImage(filePath);
|
||||
image.LockAspectRatio = true;
|
||||
if (!isPDF && loadedImageHeight > 600)
|
||||
{
|
||||
image.Height = 550; // make sure it will fit on one page
|
||||
}
|
||||
else
|
||||
{
|
||||
image.Width = imageWidth; // can't be too wide now...not sure why...maybe due to margins...
|
||||
}
|
||||
LogInfo(string.Format("Added image: {0} ({1})", file.Title, filePath));
|
||||
if (isPDF)
|
||||
{
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
x:DataType="vm:AboutViewModel">
|
||||
<StackPanel Orientation="Vertical"
|
||||
Spacing="4">
|
||||
<TextBlock Text="Receipt PDF Builder"
|
||||
<TextBlock Text="MayShow"
|
||||
HorizontalAlignment="Center"
|
||||
TextWrapping="Wrap"
|
||||
FontSize="18"
|
||||
FontWeight="Bold"/>
|
||||
<TextBlock Text="Receipt PDF Builder was built by MB for A in 2026. May the quacking of ducks always be in your favor. Thanks for using!"
|
||||
<TextBlock Text="MayShow (an intentional mispelling of 明証, pronounced may-shō, a Japanese word meaning proof, evidence, or corroboration) is a PDF report creation tool. It was built by MB for A in 2026. May the quacking of ducks always be in your favor. Thanks for using our software!"
|
||||
MaxWidth="300"
|
||||
TextWrapping="Wrap"
|
||||
FontSize="14"/>
|
||||
@@ -23,6 +23,12 @@
|
||||
MaxWidth="300"
|
||||
TextWrapping="Wrap"
|
||||
FontSize="14"/>
|
||||
<TextBlock Text="Copyright 2026 - Quickity Quack Productions"
|
||||
MaxWidth="300"
|
||||
TextWrapping="Wrap"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,4,0,4"
|
||||
FontSize="12"/>
|
||||
<Button Command="{Binding Close}"
|
||||
Classes="accent"
|
||||
Content="Close"
|
||||
|
||||
+92
-20
@@ -6,6 +6,7 @@
|
||||
x:Class="ReceiptPDFBuilder.Views.MainView"
|
||||
xmlns:helpers="clr-namespace:ReceiptPDFBuilder.Helpers"
|
||||
xmlns:models="clr-namespace:ReceiptPDFBuilder.Models"
|
||||
xmlns:views="clr-namespace:ReceiptPDFBuilder.Views"
|
||||
xmlns:vm="clr-namespace:ReceiptPDFBuilder.ViewModels"
|
||||
xmlns:progRing="clr-namespace:AvaloniaProgressRing;assembly=AvaloniaProgressRing"
|
||||
x:DataType="vm:MainViewModel">
|
||||
@@ -20,19 +21,35 @@
|
||||
</Button>
|
||||
<StackPanel Orientation="Vertical"
|
||||
Spacing="2">
|
||||
<Label Content="Easy Receipt Folder -> PDF Builder"
|
||||
<Label Content="MayShow: Report Builder"
|
||||
FontSize="20"
|
||||
FontWeight="Bold"
|
||||
HorizontalAlignment="Center"/>
|
||||
<Grid ColumnDefinitions="Auto, *"
|
||||
Margin="4,0,0,0">
|
||||
<Button Content="Choose Receipt Folder"
|
||||
Command="{Binding ChooseFolder}"
|
||||
IsEnabled="{Binding !IsCreatingPDF}" />
|
||||
IsEnabled="{Binding !IsCreatingPDF}"
|
||||
Grid.Column="0" />
|
||||
<TextBlock Text="{Binding WorkingFolder}"
|
||||
VerticalAlignment="Center"
|
||||
TextWrapping="NoWrap"
|
||||
Margin="4,0,4,0"
|
||||
TextTrimming="PrefixCharacterEllipsis"
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
<Label Content="Report Title"
|
||||
IsVisible="{Binding IsTitleBoxVisible}" />
|
||||
<TextBox Text="{Binding ReportTitle}"
|
||||
IsVisible="{Binding IsTitleBoxVisible}"
|
||||
Watermark="Receipts December 2024"
|
||||
Margin="2,0,2,4"/>
|
||||
Margin="2,0,2,4"
|
||||
Classes="clearButton"
|
||||
Name="TitleTextBox">
|
||||
<TextBox.KeyBindings>
|
||||
<KeyBinding Command="{Binding $parent[views:MainView].UnfocusTextbox}" Gesture="Enter" />
|
||||
</TextBox.KeyBindings>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
<DataGrid x:Name="FilesGrid"
|
||||
Classes="DragAndDrop ItemsDragAndDrop"
|
||||
@@ -61,19 +78,60 @@
|
||||
<Style Selector="TextBox">
|
||||
<Setter Property="TextWrapping" Value="NoWrap" />
|
||||
</Style>
|
||||
<Style Selector="ToolTip">
|
||||
<Setter Property="MaxWidth" Value="1000" />
|
||||
</Style>
|
||||
</DataGrid.Styles>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Title"
|
||||
Binding="{Binding Title}"
|
||||
IsReadOnly="False"
|
||||
Width="*"/>
|
||||
<DataGridTemplateColumn Header="Receipt Date"
|
||||
<DataGridTemplateColumn Header="Title"
|
||||
IsReadOnly="False"
|
||||
Width="*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Label Content="{Binding ReceiptDate}"
|
||||
<Grid ColumnDefinitions="Auto, *">
|
||||
<Button Command="{Binding $parent[DataGrid].((vm:MainViewModel)DataContext).LocateFile}"
|
||||
CommandParameter="{Binding}"
|
||||
IsVisible="{Binding !IsFileFoundOnDisk}"
|
||||
Margin="2"
|
||||
Content=""
|
||||
VerticalContentAlignment="Center"
|
||||
Background="Transparent"
|
||||
Grid.Column="0"
|
||||
FontFamily="{StaticResource FontAwesomeSolid}"
|
||||
ToolTip.Tip="File not found; click to locate..."
|
||||
IsEnabled="{Binding !$parent[DataGrid].((vm:MainViewModel)DataContext).IsCreatingPDF}"/>
|
||||
<TextBlock Text="{Binding Title}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="NoWrap"
|
||||
ToolTip.Tip="{Binding Title}"
|
||||
Grid.Column="1"
|
||||
Margin="8,0,4,0"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
<DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataTemplate DataType="models:ReportFile">
|
||||
<TextBox Text="{Binding Title}"
|
||||
Watermark="Title"
|
||||
ToolTip.Tip="{Binding Title}"
|
||||
Classes="clearButton">
|
||||
<TextBox.KeyBindings>
|
||||
<KeyBinding Command="{Binding $parent[views:MainView].UnfocusTextbox}" Gesture="Enter" />
|
||||
</TextBox.KeyBindings>
|
||||
</TextBox>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellEditingTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Receipt Date"
|
||||
IsReadOnly="False"
|
||||
Width="125">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Label Content="{Binding ReceiptDate}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="8,0,8,0"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
<DataGridTemplateColumn.CellEditingTemplate>
|
||||
@@ -83,10 +141,19 @@
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellEditingTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Header="File Name"
|
||||
Binding="{Binding FileName}"
|
||||
<DataGridTemplateColumn Header="File Name"
|
||||
IsReadOnly="True"
|
||||
Width="*" />
|
||||
Width="*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding FileName}"
|
||||
VerticalAlignment="Center"
|
||||
ToolTip.Tip="{Binding FileName}"
|
||||
Margin="8,0,8,0"
|
||||
HorizontalAlignment="Left"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header=""
|
||||
IsReadOnly="True"
|
||||
Width="*">
|
||||
@@ -119,11 +186,18 @@
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.RowDetailsTemplate>
|
||||
<DataTemplate x:DataType="models:ReportFile">
|
||||
<TextBlock TextWrapping="Wrap" Margin="4,4,4,0">
|
||||
<Grid ColumnDefinitions="*"
|
||||
RowDefinitions="Auto, Auto, Auto">
|
||||
<TextBlock TextWrapping="Wrap" Margin="4" Grid.Row="0">
|
||||
<Run FontWeight="Bold" Text="File Path"/>: <Run Text="{Binding FilePath}"/>
|
||||
<LineBreak/>
|
||||
</TextBlock>
|
||||
<TextBlock TextWrapping="Wrap" Margin="4" Grid.Row="1">
|
||||
<Run FontWeight="Bold" Text="Notes"/>: <Run Text="{Binding Notes}"/>
|
||||
</TextBlock>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Spacing="8">
|
||||
Spacing="8"
|
||||
Margin="4"
|
||||
Grid.Row="2">
|
||||
<Button Command="{Binding $parent[DataGrid].((vm:MainViewModel)DataContext).OpenFileLocation}"
|
||||
CommandParameter="{Binding}">
|
||||
<Button.Content>
|
||||
@@ -137,9 +211,7 @@
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<LineBreak/>
|
||||
<Run FontWeight="Bold" Text="Notes"/>: <Run Text="{Binding Notes}"/>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowDetailsTemplate>
|
||||
</DataGrid>
|
||||
@@ -151,11 +223,11 @@
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Spacing="4">
|
||||
<Button Command="{Binding AddItem}"
|
||||
IsEnabled="{Binding IsCreatePDFButtonEnabled}">
|
||||
IsEnabled="{Binding !IsCreatingPDF}">
|
||||
<TextBlock><Run Text="+" FontFamily="{StaticResource FontAwesomeSolid}"/> Add Item</TextBlock>
|
||||
</Button>
|
||||
<Button Command="{Binding SaveInterimReportInfo}"
|
||||
IsEnabled="{Binding IsCreatePDFButtonEnabled}">
|
||||
IsEnabled="{Binding HasWorkingFolderAndNotMakingPDF}">
|
||||
<TextBlock><Run Text="" FontFamily="{StaticResource FontAwesomeSolid}"/> Save Report Info</TextBlock>
|
||||
</Button>
|
||||
<Button Command="{Binding ResortPDFItemsByDate}"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace ReceiptPDFBuilder.Views
|
||||
@@ -20,5 +21,11 @@ namespace ReceiptPDFBuilder.Views
|
||||
LogScrollView.ScrollToEnd();
|
||||
}
|
||||
}
|
||||
|
||||
public void UnfocusTextbox()
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
topLevel?.FocusManager?.ClearFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
; Non-commercial use only
|
||||
|
||||
#define MyAppName "Receipt PDF Builder"
|
||||
#define MyAppVersion "1.0.0"
|
||||
#define MyAppName "MayShow"
|
||||
#define MyAppVersion "1.1.0"
|
||||
#define MyAppPublisher "Quickity Quack Productions"
|
||||
#define MyAppExeName "ReceiptPDFBuilder.exe"
|
||||
#define MyAppExeName "MayShow.exe"
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
|
||||
|
||||
+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.0.0.0" name="ReceiptPDFBuilder.Desktop"/>
|
||||
<assemblyIdentity version="1.1.0.0" name="ReceiptPDFBuilder.Desktop"/>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
|
||||
Reference in New Issue
Block a user