From de57ef9e2cf1e76dc99319177e80662d795e5bf9 Mon Sep 17 00:00:00 2001 From: Michael Babienco Date: Tue, 17 Feb 2026 09:14:08 +0900 Subject: [PATCH] Add message of the day --- Helpers/Constants.cs | 53 +++++++++++++++++++++++++++++++++++++ ViewModels/MainViewModel.cs | 8 +++++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 Helpers/Constants.cs diff --git a/Helpers/Constants.cs b/Helpers/Constants.cs new file mode 100644 index 0000000..6bf0724 --- /dev/null +++ b/Helpers/Constants.cs @@ -0,0 +1,53 @@ + +using System; + +namespace ReceiptPDFBuilder.Helpers; + +class Constants +{ + public static string[] GetQuotes() + { + // sources: + // https://www.reddit.com/r/dadjokes/comments/1ehid23/dads_of_reddit_whats_a_short_clean_joke_that/ + // https://www.thepioneerwoman.com/home-lifestyle/a35617884/best-dad-jokes/ + // https://www.today.com/life/dad-jokes-rcna27325 + // https://www.microscooters.com.au/blogs/family/100-dad-jokes-that-are-the-best-worst-in-the-book?srsltid=AfmBOopcTDq26iDYUsqaTjvUcVW6yxE-u942tatHC7Arns85unMMNfEO + 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 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", + "How do you throw a party in outer space? You planet.", + "Why don't eggs tell jokes? They might crack up!", + "What do you call a snowman with a six-pack? An abdominal snowman!", + "Why did the math book look sad? Because it had too many problems!", + "I was going to tell you a joke about time travel, but you didn't like it.", + "I'm writing a book about glue, but I'm stuck on the first chapter.", + "If two vegetarians get in an argument, is it still called beef?", + "How do you stop a bull from charging? Cancel its credit card.", + "Why do seagulls fly over the sea? If they flew over the bay, they would be bagels.", + "What vegetable is cool, but not *that* cool? Radish.", + "How you fix a broken pumpkin? With a pumpkin patch.", + "Where do boats go when they're sick? To the dock.", + "Why was the broom late to class? It over-swept.", + "Wanna hear a joke about construction? I'm still workin' on it!", + "Which state has the most streets? Rhode Island.", + "What kind of car does a sheep like to drive? A lamborghini.", + "Where do surfers go for an education? Boarding school.", + "What do you get when you cross a fish with an elephant? Swimming trunks.", + "What did one eye say to the other? “Between us, something smells.”", + "When does a joke become a dad joke? When the punchline becomes apparent.", + "What do you call a cold puppy? A chili dog.", + "Why did the spider go to school? He wanted to be a web designer.", + "I was going to tell a sodium joke, then I thought, “Na.”", + "Did you hear about the two rowboats that got into an argument? It was an oar-deal.", + "What do you call birds that stick together? Velcrows.", + "How do birds learn to fly? They wing it.", + "Humpty Dumpty had a great fall. Summer wasn't too bad either.", + "How does the moon cut his hair? Eclipse it!", + "Why did the candle quit his job? He felt burned out." + ]; + } +} \ No newline at end of file diff --git a/ViewModels/MainViewModel.cs b/ViewModels/MainViewModel.cs index 13da6c0..af0ac0e 100644 --- a/ViewModels/MainViewModel.cs +++ b/ViewModels/MainViewModel.cs @@ -40,7 +40,13 @@ class MainViewModel : BaseViewModel, IFontResolver { _processDir = Path.GetDirectoryName(Environment.ProcessPath) ?? ""; _isCreatingPDF = false; - _createPDFLog = "Ready to create PDF! Choose a folder to begin..."; + var quotes = Constants.GetQuotes(); + Random random = new Random(); + var quoteIndex = random.Next(0, quotes.Length); + _createPDFLog = "----- Receipt PDF Builder ------" + Environment.NewLine; + _createPDFLog += quotes[quoteIndex] + Environment.NewLine; + _createPDFLog += "--------------------------------" + Environment.NewLine; + _createPDFLog += "Ready to create PDF! Choose a folder to begin..."; _workingFolder = ""; _reportFiles = new ObservableCollection(); _reportFiles.CollectionChanged += ( sender, e ) => { NotifyPropertyChanged(nameof(IsCreatePDFButtonEnabled)); };