public TrayToolTip(StoffiWindow parent) { ParentWindow = parent; //U.L(LogLevel.Debug, "TRAY TOOLTIP", "Initialize"); InitializeComponent(); //U.L(LogLevel.Debug, "TRAY TOOLTIP", "Initialized"); }
/// <summary> /// /// </summary> /// <param name="track"></param> /// <param name="parent"></param> public TrayNotification(TrackData track, StoffiWindow parent) { ParentWindow = parent; InitializeComponent(); TrackArtist.Text = track.Artist; TrackTitle.Text = track.Title; AlbumArt.Source = Utilities.GetImageTag(track); }
/// <summary> /// /// </summary> /// <param name="numberOfUpgrades"></param> /// <param name="parent"></param> public TrayNotification(StoffiWindow parent) { U.L(LogLevel.Debug, "TRAY NOTIFICATION", "Initialize"); InitializeComponent(); U.L(LogLevel.Debug, "TRAY NOTIFICATION", "Initialized"); TrackInformation.Visibility = System.Windows.Visibility.Collapsed; NewUpgrades.Visibility = System.Windows.Visibility.Visible; UpgradeTitle.Text = "New Upgrade Available"; UpgradeDescription.Text = "Found new upgrade"; ParentWindow = parent; }
/// <summary> /// Event handler for when the application crashes due to an unhandled exception /// </summary> /// <param name="sender">The sender of the event</param> /// <param name="e">The event data</param> private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) { U.L(LogLevel.Error, "APP", "Crashing due to unforseen problems: " + e.Exception.Message); U.L(LogLevel.Error, "APP", e.Exception.StackTrace); U.L(LogLevel.Error, "APP", e.Exception.Source); Stoffi.SettingsManager.Save(); if (Application.Current != null) { StoffiWindow stoffi = Application.Current.MainWindow as StoffiWindow; if (stoffi != null && stoffi.trayIcon != null) { stoffi.trayIcon.Visibility = Visibility.Collapsed; } } }