You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.6 KiB
53 lines
1.6 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using Business;
|
|
using Persistance;
|
|
|
|
namespace WpfApp1
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for App.xaml
|
|
/// </summary>
|
|
public partial class App : Application
|
|
{
|
|
/// <summary>
|
|
/// L'IPersistanceManager qui fait référence à notre DataContract
|
|
/// </summary>
|
|
public static IPersistanceManager strat { get; private set; }
|
|
= new DataContractPersistance();
|
|
/// <summary>
|
|
/// L'IPersistanceManager qui fait référence à notre stub
|
|
/// </summary>
|
|
public static IPersistanceManager stubtruc { get; private set; }
|
|
= new StubLib.Stub();
|
|
/// <summary>
|
|
/// Le Manager des requins qui contiendra toutes les listes
|
|
/// </summary>
|
|
public Manager LeManager { get; private set; } = new Manager(strat);
|
|
/// <summary>
|
|
/// Le Manager des utilisateurs qui contiendra toutes les listes
|
|
/// </summary>
|
|
public ManagerUsers LeManagerUsers { get; private set; } = new ManagerUsers(strat);
|
|
|
|
|
|
private void Application_Activated(object sender, EventArgs e)
|
|
{
|
|
LeManager.LoadRequins();
|
|
LeManagerUsers.LoadUsers();
|
|
LeManager.LoadFunFacts();
|
|
}
|
|
|
|
private void Application_Deactivated(object sender, EventArgs e)
|
|
{
|
|
LeManager.SaveRequins();
|
|
LeManagerUsers.SaveUsers();
|
|
LeManager.SaveFunFacts();
|
|
}
|
|
}
|
|
}
|