using EEMSUIClient.Services;
using EEMSUIClient.Views;
using Hardcodet.Wpf.TaskbarNotification;
using System.Configuration;
using System.Data;
using System.Windows;
namespace EEMSUIClient
{
    /// 
    /// Interaction logic for App.xaml
    /// 
    public partial class App : PrismApplication
    {
        protected override Window CreateShell()
        {
            return Container.Resolve();
        }
        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterSingleton();
        }
        protected override void OnInitialized()
        {
            base.OnInitialized();
            Container.Resolve().Tray = (TaskbarIcon)App.Current.FindResource("TrayIcon");
            Container.Resolve().ShowBalloonTip();
        }
        private void TrayIcon_TrayMouseDoubleClick(object sender, RoutedEventArgs e)
        {
            Container.Resolve().ShowMainWindow();
        }
        private void ShowMenu_Click(object sender, RoutedEventArgs e)
        {
            Container.Resolve().ShowMainWindow();
        }
        private void ExitMenu_Click(object sender, RoutedEventArgs e)
        {
            Container.Resolve().Exit();
        }
        private void OnExit(object sender, ExitEventArgs e)
        {
            Container.Resolve().Dispose();
        }
    }
}