Skip to content

Commit

Permalink
DeleteNewline Windows alerts now simply serve as 'notifications thems…
Browse files Browse the repository at this point in the history
…elves'.

Clicking the notification window does not create a new application instance.
  • Loading branch information
Cyp9715 committed Jun 29, 2023
1 parent 651a8ca commit ed98575
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion DeleteNewline/Windows/Notification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,29 @@ public static void Send(string title, string content, int expirationTime = 5)
new ToastContentBuilder()
.AddText(title)
.AddText(content)
.SetBackgroundActivation()
.Show(toast =>
{
toast.ExpirationTime = DateTime.Now.AddSeconds(expirationTime);
});


}
catch (ArgumentException)
{
new ToastContentBuilder()
.AddText("SUCCESS... BUT")
.AddText("INCLUDE INVALID CHARACTER.")
.SetBackgroundActivation()
.Show(toast =>
{
toast.ExpirationTime = DateTime.Now.AddSeconds(expirationTime);
});
}

});



task_notify.Start();
task_notify.Wait();
}
Expand Down

0 comments on commit ed98575

Please sign in to comment.