using EEMSCenterUI.ViewModels;
using EEMSCenterUI.Views;
using Hardcodet.Wpf.TaskbarNotification;
using System.Configuration;
using System.Data;
using System.Diagnostics.Contracts;
using System.Windows;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
using UICommon.CommonContainer;

namespace EEMSCenterUI;

/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : PrismApplication
{
    protected override Window CreateShell()
    {
        return Container.Resolve<MainWindow>();
    }

    protected override void RegisterTypes(IContainerRegistry containerRegistry)
    {
        containerRegistry.RegisterSingleton<TaskBarViewModel>();
        _taskbar = (TaskbarIcon)FindResource("Taskbar");
        _taskbar.DataContext = Container.Resolve<TaskBarViewModel>();
    }


    private static TaskbarIcon? _taskbar;
    protected override void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);
    }

    public static void  ShowBalloonTip(string title, string message, BalloonIcon symbol)
    {
        _taskbar?.ShowBalloonTip(title, message, symbol);
    }
}
