client/src/Iri.Modernisation.Data/Models/SettingsProject.cs
author totetm <>
Fri, 15 Jan 2010 11:31:05 +0100
changeset 32 36302cc9688d
parent 30 644e3cd48034
child 35 43bb1b8ed555
permissions -rw-r--r--
Web InitParams
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
     1
using System;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
     2
using System.Net;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
     3
using System.Windows;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
     4
using System.Windows.Controls;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
     5
using System.Windows.Documents;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
     6
using System.Windows.Ink;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
     7
using System.Windows.Input;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
     8
using System.Windows.Media;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
     9
using System.Windows.Media.Animation;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    10
using System.Windows.Shapes;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    11
using System.Collections.Generic;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    12
using System.Threading;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    13
namespace Iri.Modernisation.Data.Models
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    14
{
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    15
    /// <summary>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    16
    /// 
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    17
    /// </summary>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    18
    public static class SettingsProject
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    19
    {
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    20
        /// <summary>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    21
        /// Liste des vidéoLivre Disponible
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    22
        /// </summary>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    23
        static public List<VideoBook> ListVideoBook { get; set; }
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    24
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    25
        static SettingsProject()
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    26
        {
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    27
        }
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    28
        /// <summary>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    29
        /// (Télé)Chargement des données;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    30
        /// </summary>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    31
        /// <param name="configFileURI"></param>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    32
        static public void Load(String configFileURI)
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    33
        {
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    34
            FactoryVideoLivre.Initialize();
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    35
            FactoryVideoLivre.FactoryReady += new EventHandler(FactoryVideoLivre_FactoryReady);
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    36
            FactoryVideoLivre.LoadXMLFile(configFileURI);
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    37
        }
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    38
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    39
        /// <summary>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    40
        /// 
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    41
        /// </summary>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    42
        /// <param name="sender"></param>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    43
        /// <param name="e"></param>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    44
        static void FactoryVideoLivre_FactoryReady(object sender, EventArgs e)
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    45
        {
32
36302cc9688d Web InitParams
totetm <>
parents: 30
diff changeset
    46
           
36302cc9688d Web InitParams
totetm <>
parents: 30
diff changeset
    47
            VideoBookLoaderHelper LoaderVideoBook = new VideoBookLoaderHelper(FactoryVideoLivre.VideoBookListPath);
30
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    48
            LoaderVideoBook.LoaderFinished += new EventHandler<LoaderEventArgs<List<VideoBook>>>(LoaderVideoBook_LoaderFinished);
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    49
           
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    50
        }
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    51
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    52
       
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    53
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    54
        static void LoaderVideoBook_LoaderFinished(object sender, LoaderEventArgs<List<VideoBook>> e)
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    55
        {
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    56
            SettingsProject.ListVideoBook = e.CreatedObject;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    57
            if (SettingsLoaded != null)
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    58
                SettingsLoaded(sender, e);
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    59
        }
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    60
        /// <summary>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    61
        /// Evenement prévenant quand tout est pret
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    62
        /// </summary>
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    63
        static public event EventHandler SettingsLoaded;
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    64
    }
644e3cd48034 Introduce in Web context
totetm <>
parents:
diff changeset
    65
}