I feel a bit out of my depths with this.
I have a seperate timer thread which ticks once a second. If a value hits <= 0, then this bit of code is run:
...
EnemyHP = EnemyMaxHP;
//Toast t = new Toast("You died!", "Oh no, you died! the " + Enemies[CurrentEnemy].Name + " killed you, and you lost " + lost + " GP!", NotificationType.Warning);
Log.Info("Player Died!!! Enemy responsible: " + Enemies[CurrentEnemy].Name + ". GP Lost: " + lost + ".");
If I run that as is, The Log.Info line is run, and the log line appears in the file. If, however, I uncomment the middle line, it starts to run that, but seems to stop soon and then NEVER runs the logfile line. Here is the CTOR in Toast upon which it is calling:
public Toast(string Title, string Description, NotificationType Type = NotificationType.Information)
{
toast = new ToastPopUp(Title, Description, "", Type);
toast.Background = new SolidColorBrush(Colors.AliceBlue);
toast.BorderBrush = new SolidColorBrush(Colors.Black);
toast.FontColor = new SolidColorBrush(Colors.Black);
//toast.HyperlinkClicked += this.ToastHyperlinkClicked;
//toast.ClosedByUser += this.ToastClosedByUser;
toast.Show();
}
ToastPopUp refers to https://toastspopuphelpballoon.codeplex.com/ - I am using this. The toast popup does not show up when run through this code, but runs fine when using identical code elsewhere in the code.