# HG changeset patch
# User totetm <>
# Date 1263483590 -3600
# Node ID 644e3cd48034035c54597e2274a504191db90b9f
# Parent 5f8d275750e7b86e867fb1ad21c049894cd796c3
Introduce in Web context
diff -r 5f8d275750e7 -r 644e3cd48034 .hgignore
--- a/.hgignore Fri Jan 08 11:33:24 2010 +0100
+++ b/.hgignore Thu Jan 14 16:39:50 2010 +0100
@@ -6,3 +6,6 @@
glob:Backup/*
glob:_UpgradeReport_Files/*
glob:UpgradeLog.XML
+glob:Content/*
+glob:ClientBin/*
+glob:bin/*
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/Iri.Modernisation.Controls.csproj
--- a/client/src/Iri.Modernisation.Controls/Iri.Modernisation.Controls.csproj Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/Iri.Modernisation.Controls.csproj Thu Jan 14 16:39:50 2010 +0100
@@ -226,6 +226,11 @@
+
+ Templates_CommonTemplate.xaml
+ MSBuild:Compile
+ Designer
+
MSBuild:MarkupCompilePass1
Designer
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml.cs Thu Jan 14 16:39:50 2010 +0100
@@ -16,11 +16,12 @@
{
// Required to initialize variables
InitializeComponent();
- // RectPolemic.Resources.Add("PolemicType", PolemicElementType.Polemic);
+ //RectPolemic.Resources.Add("PolemicType", PolemicElementType.Polemic);
//RectAdhesion.Resources.Add("PolemicType", PolemicElementType.Adhesion);
//RectQuestion.Resources.Add("PolemicType", PolemicElementType.Question);
//RectReferences.Resources.Add("PolemicType", PolemicElementType.Reference);
+
}
}
}
\ No newline at end of file
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenu.xaml
--- a/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenu.xaml Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenu.xaml Thu Jan 14 16:39:50 2010 +0100
@@ -7,6 +7,7 @@
xmlns:local="clr-namespace:Iri.Modernisation.Controls.View"
x:Class="Iri.Modernisation.Controls.View.ClickMenu" BorderThickness="2,2,0,0" Height="120" Width="152"
xmlns:Input="clr-namespace:SLExtensions.Input;assembly=SLExtensions"
+ Visibility="Collapsed"
>
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenu.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenu.xaml.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenu.xaml.cs Thu Jan 14 16:39:50 2010 +0100
@@ -29,6 +29,8 @@
public ClickMenu()
{
// Required to initialize variables
+
+ /**/
InitializeComponent();
/*Animation*/
Commands.PolemicElement.ElementSelected.Executed += new EventHandler(MenuClick_Executed);
@@ -47,7 +49,6 @@
_contextualiserPanel._polemicItem.ClickMenuItemSelected += Commands.Action.Execute;
_contextualiserPanel._questionItem.ClickMenuItemSelected += Commands.Action.Execute;
_contextualiserPanel._referenceItem.ClickMenuItemSelected += Commands.Action.Execute;
- _annoterPanel._videoItem.ClickMenuItemSelected += Commands.Action.Execute;
_annoterPanel._textItem.ClickMenuItemSelected += Commands.ClickMenu.CreateNewTextualAnnotation.Execute;
}
@@ -57,11 +58,6 @@
MessageBox.Show("Action - Command:"+((ClickMenuItem)e.Parameter).Title);
}
- void ClickMenuItemSelected(object sender, ClickMenuItemSelectedEventArgs e)
- {
- MessageBox.Show("Action");
- }
-
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/HeaderControl/ButtonHeaderControl.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/HeaderControl/ButtonHeaderControl.xaml.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/HeaderControl/ButtonHeaderControl.xaml.cs Thu Jan 14 16:39:50 2010 +0100
@@ -17,15 +17,15 @@
{
public ButtonHeaderControl()
{
- _isMouseInside = false;
+
InitializeComponent();
}
- private bool _isMouseInside;
+
Point tempPoint = new Point();
private void LayoutRoot_MouseMove(object sender, MouseEventArgs e)
{
- _isMouseInside = true;
+
Point p = e.GetPosition(this);
tempPoint.X = 1- (p.X / ActualWidth);
//tempPoint.Y = p.Y / ActualHeight;
@@ -83,13 +83,13 @@
private void LayoutRoot_MouseEnter(object sender, MouseEventArgs e)
{
- _isMouseInside = true;
+
animEnter.Begin();
}
private void LayoutRoot_MouseLeave(object sender, MouseEventArgs e)
{
- _isMouseInside = false;
+
animLeave.Begin();
}
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/NavigationBar/ConsultMenu.xaml
--- a/client/src/Iri.Modernisation.Controls/View/NavigationBar/ConsultMenu.xaml Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/NavigationBar/ConsultMenu.xaml Thu Jan 14 16:39:50 2010 +0100
@@ -11,8 +11,14 @@
xmlns:Input="clr-namespace:SLExtensions.Input;assembly=SLExtensions" Height="280"
>
+
-
+
+
+
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/NavigationBar/PersonnalChutier.xaml
--- a/client/src/Iri.Modernisation.Controls/View/NavigationBar/PersonnalChutier.xaml Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/NavigationBar/PersonnalChutier.xaml Thu Jan 14 16:39:50 2010 +0100
@@ -6,6 +6,9 @@
>
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/NavigationBar/ProductionMenu.xaml
--- a/client/src/Iri.Modernisation.Controls/View/NavigationBar/ProductionMenu.xaml Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/NavigationBar/ProductionMenu.xaml Thu Jan 14 16:39:50 2010 +0100
@@ -11,6 +11,9 @@
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/NavigationBar/ReferencesChutier.xaml
--- a/client/src/Iri.Modernisation.Controls/View/NavigationBar/ReferencesChutier.xaml Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/NavigationBar/ReferencesChutier.xaml Thu Jan 14 16:39:50 2010 +0100
@@ -11,7 +11,10 @@
>
-
+
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableVideoElement.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableVideoElement.xaml.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableVideoElement.xaml.cs Thu Jan 14 16:39:50 2010 +0100
@@ -25,6 +25,11 @@
{
SetValue(TrimLeftProperty, value);
((CustomableVideoElementVM)DataContext).BeginTrim = ((CustomableVideoElementVM)DataContext).BeginTrim.Add(new TimeSpan(0, 0, 0, 0, (int)((value) / ProductionTimeLine.ScaleTime)));
+ if (((CustomableVideoElementVM)DataContext).Duration < 1)
+ {
+ ((CustomableVideoElementVM)DataContext).BeginTrim= ((CustomableVideoElementVM)DataContext).RunTime - ((CustomableVideoElementVM)DataContext).EndTrim - TimeSpan.FromSeconds(1);
+
+ }
this.Width = ((CustomableVideoElementVM)DataContext).Duration ;
}
}
@@ -44,7 +49,16 @@
{
SetValue(TrimRightProperty, value);
((CustomableVideoElementVM)DataContext).EndTrim = ((CustomableVideoElementVM)DataContext).EndTrim.Add(new TimeSpan(0, 0, 0, 0, (int)((value) / ProductionTimeLine.ScaleTime)));
- this.Width = ((CustomableVideoElementVM)DataContext).Duration;
+
+ if (((CustomableVideoElementVM)DataContext).Duration<1)
+ {
+ ((CustomableVideoElementVM)DataContext).EndTrim = ((CustomableVideoElementVM)DataContext).RunTime -((CustomableVideoElementVM)DataContext).BeginTrim - TimeSpan.FromSeconds(1);
+
+ }
+
+
+ this.Width = ((CustomableVideoElementVM)DataContext).Duration;
+
}
}
}
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs Thu Jan 14 16:39:50 2010 +0100
@@ -19,10 +19,7 @@
{
public static double ScaleTime
{
- get
- ;
-
-
+ get;
set;
}
public ProductionTimeLine()
@@ -32,7 +29,6 @@
InitializeComponent();
Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler(EditorPartSelected_Executed);
Commands.ProductionView.VideoRecordUpdated.Executed += new EventHandler(VideoRecordUpdated_Executed);
- Commands.Action.Executed += new EventHandler(Action_Executed);
TimeSlider.MouseLeftButtonUp += new MouseButtonEventHandler(TimeSlider_MouseLeftButtonUp);
//TimeSlider.ValueChanged += new RoutedPropertyChangedEventHandler(TimeSlider_ValueChanged);
TimeSlider.Maximum = TimeSlider.ActualWidth / ProductionTimeLine.ScaleTime;
@@ -67,13 +63,8 @@
{
UpdateElements();
}
-
+ private double _sumOfLengh=0;
- void Action_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
- {
- AddSequenceButton.Content = ((MouseEventArgs)e.Parameter).GetPosition(this).X;
- }
- private double _sumOfLengh=0;
public void UpdateElements()
{
TimeSlider.Maximum = TimeSlider.ActualWidth / ProductionTimeLine.ScaleTime;
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml
--- a/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml Thu Jan 14 16:39:50 2010 +0100
@@ -15,7 +15,7 @@
-
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml
--- a/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml Thu Jan 14 16:39:50 2010 +0100
@@ -11,11 +11,11 @@
-
+
-
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml.cs
--- a/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml.cs Thu Jan 14 16:39:50 2010 +0100
@@ -108,7 +108,7 @@
void Play_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
- if (e.Parameter == DataContext || e.Parameter == null)
+ if ((e.Parameter == DataContext || e.Parameter == null) && VideoScreen.Source != null)
{
_isPlayed = true;
VideoScreen.Play();
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Thu Jan 14 16:39:50 2010 +0100
@@ -39,12 +39,12 @@
_refElement = value;
_newAnnotation = new Annotation(((PolemicElement)value).Chapter);
- Begin = ((PolemicElement)value).TimerIn.TotalMilliseconds;
- End = ((PolemicElement)value).TimerOut.TotalMilliseconds;
+
BasicRelation = new PolemicLink() { FromElement = ((PolemicElement)value), ToElement = _newAnnotation, Type = null};
PolemicRelation = new PolemicLink();
PolemicRelation.FromElement = _newAnnotation;
-
+ Begin = ((PolemicElement)value).TimerIn.TotalMilliseconds;
+ End = ((PolemicElement)value).TimerOut.TotalMilliseconds;
OnPropertyChanged(String.Empty);
//OnPropertyChanged("RefElement");
//OnPropertyChanged("IsControlEnable");
@@ -334,19 +334,15 @@
/// Element référant
public AnnotationMakerVM(PolemicElement refAParam)
{
-
-
RefElement = refAParam;
-
-
-
_newAnnotation = new Annotation(RefElement.Chapter);
- _begin = RefElement.TimerIn;
- _end = RefElement.TimerOut;
+
_basicRelation = new PolemicLink() { FromElement = RefElement, ToElement = _newAnnotation, Type = null};
_polemicRelation = new PolemicLink();
PolemicRelation.FromElement = _newAnnotation;
InitializeCommands();
+ Begin = RefElement.TimerIn.TotalMilliseconds;
+ End = RefElement.TimerOut.TotalMilliseconds;
}
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/ViewModel/ConsultationBookView/ConsultationBookViewVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationBookView/ConsultationBookViewVM.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationBookView/ConsultationBookViewVM.cs Thu Jan 14 16:39:50 2010 +0100
@@ -305,7 +305,7 @@
_title = param.SelectedBook.Title;
_author = param.SelectedBook.Author;
_chapters = param.SelectedBook.Chapters;
- //
+
if (param.SelectedBook.Chapters[0].VideoSequences.Count != 0)
{
ActualVideoSourceVM = new VideoViewerVM(true,false) { Source = param.SelectedBook.MediaPath };
@@ -323,17 +323,20 @@
private void ActualVideoSourceVM_Tick(object sender, VideoViewerVMEventArgs e)
{
- TimeSpan Pos = e.Position;
- SelectedBookVM.Position = Pos.TotalMilliseconds;
- if (SelectedIndex.TimerOut < Pos || SelectedIndex.TimerIn > Pos)
+ if(SelectedBook!=null)
{
- foreach (SegmentIndex Index in SelectedIndex.Chapter.Index)
+ TimeSpan Pos = e.Position;
+ SelectedBookVM.Position = Pos.TotalMilliseconds;
+ if (SelectedIndex.TimerOut < Pos || SelectedIndex.TimerIn > Pos)
{
- if (Index.TimerIn <= Pos && Index.TimerOut >= Pos)
+ foreach (SegmentIndex Index in SelectedIndex.Chapter.Index)
{
- SelectedIndex = Index;
+ if (Index.TimerIn <= Pos && Index.TimerOut >= Pos)
+ {
+ SelectedIndex = Index;
+ }
+
}
-
}
}
}
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/ViewModel/ConsultationView/ConsultationViewVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationView/ConsultationViewVM.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ConsultationView/ConsultationViewVM.cs Thu Jan 14 16:39:50 2010 +0100
@@ -132,16 +132,21 @@
{
return _annotationMakerVM;
}
+ set
+ {
+ _annotationMakerVM = value;
+ OnPropertyChanged("ViewModelAnnotationMaker");
+ }
}
private void CreateNewTextualAnnotation_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
- ViewModelAnnotationMaker.RefElement = SelectedElement;
+ ViewModelAnnotationMaker.RefElement=SelectedElement;
}
public ConsultationViewVM()
{
InitializeCommands();
_consultationBookViewContextMenu = new ConsultationBookViewVM();
- _annotationMakerVM = new AnnotationMakerVM();
+ ViewModelAnnotationMaker = new AnnotationMakerVM();
SelectedVideoBooks = new SLExtensions.Collections.ObjectModel.ObservableCollection();
}
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionVM.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/HeaderProduction/HeaderProductionVM.cs Thu Jan 14 16:39:50 2010 +0100
@@ -99,7 +99,7 @@
if(_productionChapters.Count > 1)
{
_productionChapters[_productionChapters.Count - 2].EditEnded+=new HeaderProductionChapterVM.EditEndedDelegate(temp.Enable);
-
+
}
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs Thu Jan 14 16:39:50 2010 +0100
@@ -132,7 +132,7 @@
Commands.ProductionView.ClickAddSelectedRecord.Executed += new EventHandler(ClickAddSelectedRecord_Executed);
ViewModelProductionTimeLine.SwitchVideo += new EventHandler(ViewModelProductionTimeLine_SwitchVideo);
ViewModelMasterVideoViewer.Tick += new EventHandler(ViewModelMasterVideoViewer_Tick);
-
+ ViewModelHeaderProduction.Change += new EventHandler(ViewModelHeaderProduction_Change);
}
public ProductionViewVM()
{
@@ -162,7 +162,7 @@
EndTrim = new TimeSpan(0, 0, 0),
});
}
- ViewModelHeaderProduction.Change += new EventHandler(ViewModelHeaderProduction_Change);
+
InitializeCommands();
OnPropertyChanged(String.Empty);
@@ -187,7 +187,6 @@
{
ViewModelProductionTimeLine.ActualVideoSequence = ViewModelProductionTimeLine.TimeLine[ViewModelProductionTimeLine.TimeLine.IndexOf(ViewModelProductionTimeLine.ActualVideoSequence) + 1];
ViewModelMasterVideoViewer.Source = ViewModelProductionTimeLine.ActualVideoSequence.Path;
-
ViewModelMasterVideoViewer.GoTo(ViewModelProductionTimeLine.ActualVideoSequence.BeginTrim);
}
ViewModelProductionTimeLine.Position = newPos;
@@ -195,7 +194,7 @@
private void ClickAddSelectedRecord_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
{
- if (ViewModelProductionTimeLine.SelectedChapter != -1)
+ if (ViewModelHeaderProduction.SelectedChapter != null && ViewModelHeaderProduction.SelectedChapter.IsActive)
{
if (!ViewModelProductionTimeLine.IsIndexing)
{
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Data/Iri.Modernisation.Data.csproj
--- a/client/src/Iri.Modernisation.Data/Iri.Modernisation.Data.csproj Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Iri.Modernisation.Data.csproj Thu Jan 14 16:39:50 2010 +0100
@@ -89,6 +89,8 @@
+
+
@@ -96,6 +98,7 @@
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Data/Ldt/LDTFile.cs
--- a/client/src/Iri.Modernisation.Data/Ldt/LDTFile.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Ldt/LDTFile.cs Thu Jan 14 16:39:50 2010 +0100
@@ -56,15 +56,15 @@
public void Load(String _path)
{
Path = _path;
- Load();
+ // Load();
}
- public void Load()
+ public void Load(XDocument xdoc)
{
- if(Path == String.Empty)
+ /*if(Path == String.Empty)
{
throw new Exception("Load Path Needed");
}
- XDocument xdoc = XDocument.Load(Path);
+ = XDocument.Load(Path);*/
Project = new LDTProject(xdoc.Root.Element("project"));
foreach (XElement Elem in xdoc.Root.Element("medias").Elements())
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Data/Ldt/Readers.cs
--- a/client/src/Iri.Modernisation.Data/Ldt/Readers.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Ldt/Readers.cs Thu Jan 14 16:39:50 2010 +0100
@@ -9,33 +9,16 @@
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Iri.Modernisation.Data.Models;
-
+using System.Xml.Linq;
namespace Iri.Modernisation.Data.LDTClass
{
public class LDTFileReader
{
- private LDTFile _ldtFile;
- private VideoBook _videoBook;
- public VideoBook VideoBook
- {
- get
- {
- return _videoBook;
- }
- }
- public LDTFileReader(String LDTPath)
+ public static VideoBook ConvertToVideoBook(XDocument Path)
{
- _ldtFile = new LDTFile();
- _ldtFile.Load(LDTPath);
- ConvertLdtToVideoBook();
- }
- public LDTFileReader(LDTFile ldtFile)
- {
- _ldtFile = ldtFile;
- ConvertLdtToVideoBook();
- }
- private void ConvertLdtToVideoBook()
- {
+ LDTFile _ldtFile = new LDTFile();
+ _ldtFile.Load(Path);
+ VideoBook _videoBook = new VideoBook();
if (_ldtFile != null)
{
// Initialisation du VideoBook
@@ -111,6 +94,7 @@
}
}
+ return _videoBook;
// Initialisation des Annotations
//Initialisation des Liens
}
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Data/Models/FactoryVideoLivre.cs
--- a/client/src/Iri.Modernisation.Data/Models/FactoryVideoLivre.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/FactoryVideoLivre.cs Thu Jan 14 16:39:50 2010 +0100
@@ -33,15 +33,16 @@
}
static public void Initialize()
{
- LoadXMLFile();
+ // LoadXMLFile();
}
- static private void LoadXMLFile()
+ public static void LoadXMLFile(String path)
{
xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(XMLFileLoaded);
- xmlClient.DownloadStringAsync(new Uri("ProjectConfig.xml",UriKind.Relative));
+ Uri uri = new Uri(path, UriKind.RelativeOrAbsolute);
+ xmlClient.DownloadStringAsync(uri);
}
@@ -54,23 +55,33 @@
_configDoc = XDocument.Parse(e.Result);
List temp = new List();
+ List temp_an = new List();
int nb = 0;
foreach (XElement XChapter in _configDoc.Root.Element("VideoBook").Elements())
{
temp.Add(new VideoChapterDescription(nb, XChapter.Attribute("name").Value, XChapter.Attribute("color").Value));
nb++;
}
- MessageBox.Show(nb.ToString());
+ foreach (XElement XAnnotation in _configDoc.Root.Element("PolemicTypes").Elements())
+ {
+ temp_an.Add(new PolemicTypeDescription(XAnnotation.Attribute("name").Value, XAnnotation.Attribute("color").Value));
+ }
+
VideoChapterDescriptions = temp.ToArray();
+ AnnotationDescriptions = temp_an.ToArray();
+ FactoryReady(null, new EventArgs());
}
else
{
- //MessageBox.Show(e.Error.Message);
+ MessageBox.Show(e.Error.Message);
}
+
}
+ public static event EventHandler FactoryReady;
static public void Load(string path)
{
+
_configDoc = XDocument.Load(path);
List temp_vl = new List();
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Data/Models/IVideoBookConverter.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Models/IVideoBookConverter.cs Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,18 @@
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace Iri.Modernisation.Data.Models
+{
+ public interface IVideoBookConverter
+ {
+ VideoBook ConvertToVideoBook();
+ }
+}
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Data/Models/Loader.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Models/Loader.cs Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,66 @@
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.Xml.Linq;
+using System.IO;
+using System.Collections.Generic;
+using System.Threading;
+namespace Iri.Modernisation.Data.Models
+{
+ ///
+ /// Classe permettant de charger un XML et de convertir son contenu en un type ReturnType désiré
+ ///
+ /// Type Désiré
+ public class Loader
+ {
+ ///
+ /// WebClient qui permet de charger le XML distant
+ ///
+ private WebClient xmlClient = new WebClient();
+ private String _path{get;set;}
+ private Func ProcessFunction { get; set; }
+
+ public Loader(Func processFunction)
+ {
+ ProcessFunction = processFunction;
+
+ }
+ public void LoadAvailableVideoBooks(String path)
+ {
+ _path = path;
+ xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(xmlClient_DownloadStringCompleted);
+ xmlClient.DownloadStringAsync(new Uri(path,UriKind.RelativeOrAbsolute));
+
+ }
+
+ void xmlClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
+ {
+ ResultType result = ProcessFunction.Invoke(XDocument.Parse(e.Result));
+ if (LoaderFinished != null)
+ {
+
+ LoaderFinished(this, new LoaderEventArgs(result));
+ }
+ }
+
+ public event EventHandler> LoaderFinished;
+
+
+ }
+ public class LoaderEventArgs : EventArgs
+ {
+ public ResultType CreatedObject { get; private set; }
+ public LoaderEventArgs(ResultType createdObject)
+ {
+ CreatedObject = createdObject;
+ }
+ }
+
+}
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Data/Models/SettingsProject.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Models/SettingsProject.cs Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,67 @@
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.Collections.Generic;
+using System.Threading;
+namespace Iri.Modernisation.Data.Models
+{
+ ///
+ ///
+ ///
+ public static class SettingsProject
+ {
+ ///
+ /// Liste des vidéoLivre Disponible
+ ///
+ static public List ListVideoBook { get; set; }
+
+ static SettingsProject()
+ {
+ }
+ ///
+ /// (Télé)Chargement des données;
+ ///
+ ///
+ static public void Load(String configFileURI)
+ {
+ FactoryVideoLivre.Initialize();
+ FactoryVideoLivre.FactoryReady += new EventHandler(FactoryVideoLivre_FactoryReady);
+ FactoryVideoLivre.LoadXMLFile(configFileURI);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ static void FactoryVideoLivre_FactoryReady(object sender, EventArgs e)
+ {
+ /*Loader> LoaderVideoBook = new Loader>(VideoBook.LoadFromXml);
+ LoaderVideoBook.LoadAvailableVideoBooks("/Content/AvailableVideoBooks.xml");
+ LoaderVideoBook.LoaderFinished += new EventHandler>>(LoaderVideoBook_LoaderFinished);*/
+ VideoBookLoaderHelper LoaderVideoBook = new VideoBookLoaderHelper("/Content/AvailableVideoBooks.xml");
+ LoaderVideoBook.LoaderFinished += new EventHandler>>(LoaderVideoBook_LoaderFinished);
+
+ }
+
+
+
+ static void LoaderVideoBook_LoaderFinished(object sender, LoaderEventArgs> e)
+ {
+ SettingsProject.ListVideoBook = e.CreatedObject;
+ if (SettingsLoaded != null)
+ SettingsLoaded(sender, e);
+ }
+ ///
+ /// Evenement prévenant quand tout est pret
+ ///
+ static public event EventHandler SettingsLoaded;
+ }
+}
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation.Data/Models/VideoBook.cs
--- a/client/src/Iri.Modernisation.Data/Models/VideoBook.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/VideoBook.cs Thu Jan 14 16:39:50 2010 +0100
@@ -9,6 +9,9 @@
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
+using System.Xml.Linq;
+using System.Threading;
+using Iri.Modernisation.Data.LDTClass;
namespace Iri.Modernisation.Data.Models
{
///
@@ -58,9 +61,66 @@
}
+
+
+
+
}
+ public class VideoBookLoaderHelper
+ {
+ private WebClient webclient;
+ private List returnVideoBookList;
+ private int nbOfBook;
+ public VideoBookLoaderHelper(String path)
+ {
+ nbOfBook = 0;
+ returnVideoBookList = new List();
+ webclient = new WebClient();
+ webclient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webclient_DownloadStringCompleted);
+ webclient.DownloadStringAsync(new Uri(path,UriKind.RelativeOrAbsolute ));
+ }
+ void webclient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
+ {
+ XDocument XDoc = XDocument.Parse(e.Result);
+ List ListReturn = new List();
+
+ foreach (XElement XVideoBook in XDoc.Root.Elements())
+ {
+ Loader LoaderVideoBook = new Loader(LDTFileReader.ConvertToVideoBook);
+ LoaderVideoBook.LoaderFinished += new EventHandler>(LoaderVideoBook_LoaderFinished);
+
+ LoaderVideoBook.LoadAvailableVideoBooks(XVideoBook.Attribute("metafile").Value);
+
+
+
+ nbOfBook++;
+
+ }
+
+
+ }
+
+ void LoaderVideoBook_LoaderFinished(object sender, LoaderEventArgs e)
+ {
+ returnVideoBookList.Add(e.CreatedObject);
+ if(returnVideoBookList.Count == nbOfBook)
+ {
+ if(LoaderFinished!=null)
+ {
+ LoaderFinished(this,new LoaderEventArgs>(returnVideoBookList));
+ }
+ }
+ }
+ public event EventHandler>> LoaderFinished;
+ /*public List LoadFromXml(XDocument XDoc)
+ {
+
+
+ }*/
+
+ }
///
/// Comparateur pour Trier les livres
///
@@ -71,4 +131,5 @@
return x.Title.CompareTo(y.Title);
}
}
+
}
diff -r 5f8d275750e7 -r 644e3cd48034 client/src/Iri.Modernisation/App.xaml
--- a/client/src/Iri.Modernisation/App.xaml Fri Jan 08 11:33:24 2010 +0100
+++ b/client/src/Iri.Modernisation/App.xaml Thu Jan 14 16:39:50 2010 +0100
@@ -7,9 +7,10 @@
-
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest.Web/ProjectConfig.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest.Web/ProjectConfig.xml Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest.Web/Properties/AssemblyInfo.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest.Web/Properties/AssemblyInfo.cs Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("WebTest.Web")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Centre Georges Pompidou")]
+[assembly: AssemblyProduct("WebTest.Web")]
+[assembly: AssemblyCopyright("Copyright © Centre Georges Pompidou 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("50517894-8acc-4c68-8d30-0451c49bff73")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest.Web/Silverlight.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest.Web/Silverlight.js Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,2 @@
+//v2.0.30511.0
+if(!window.Silverlight)window.Silverlight={};Silverlight._silverlightCount=0;Silverlight.__onSilverlightInstalledCalled=false;Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=";Silverlight.__installationEventFired=false;Silverlight.onGetSilverlight=null;Silverlight.onSilverlightInstalled=function(){window.location.reload(false)};Silverlight.isInstalled=function(b){if(b==undefined)b=null;var a=false,m=null;try{var i=null,j=false;if(window.ActiveXObject)try{i=new ActiveXObject("AgControl.AgControl");if(b===null)a=true;else if(i.IsVersionSupported(b))a=true;i=null}catch(l){j=true}else j=true;if(j){var k=navigator.plugins["Silverlight Plug-In"];if(k)if(b===null)a=true;else{var h=k.description;if(h==="1.0.30226.2")h="2.0.30226.2";var c=h.split(".");while(c.length>3)c.pop();while(c.length<4)c.push(0);var e=b.split(".");while(e.length>4)e.pop();var d,g,f=0;do{d=parseInt(e[f]);g=parseInt(c[f]);f++}while(f");delete a.id;delete a.width;delete a.height;for(var c in a)if(a[c])b.push('');b.push("");return b.join("")};Silverlight.createObjectEx=function(b){var a=b,c=Silverlight.createObject(a.source,a.parentElement,a.id,a.properties,a.events,a.initParams,a.context);if(a.parentElement==null)return c};Silverlight.buildPromptHTML=function(b){var a="",d=Silverlight.fwlinkRoot,c=b.version;if(b.alt)a=b.alt;else{if(!c)c="";a="
";a=a.replace("{1}",c);a=a.replace("{2}",d+"108181")}return a};Silverlight.getSilverlight=function(e){if(Silverlight.onGetSilverlight)Silverlight.onGetSilverlight();var b="",a=String(e).split(".");if(a.length>1){var c=parseInt(a[0]);if(isNaN(c)||c<2)b="1.0";else b=a[0]+"."+a[1]}var d="";if(b.match(/^\d+\056\d+$/))d="&v="+b;Silverlight.followFWLink("149156"+d)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(c){var a,b="";if(c==null)return null;for(var d=0;d96&&a<123||a>64&&a<91||a>43&&a<58&&a!=47||a==95)b=b+String.fromCharCode(a);else b=b+""+a+";"}return b};Silverlight.default_error_handler=function(e,b){var d,c=b.ErrorType;d=b.ErrorCode;var a="\nSilverlight error message \n";a+="ErrorCode: "+d+"\n";a+="ErrorType: "+c+" \n";a+="Message: "+b.ErrorMessage+" \n";if(c=="ParserError"){a+="XamlFile: "+b.xamlFile+" \n";a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}else if(c=="RuntimeError"){if(b.lineNumber!=0){a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}a+="MethodName: "+b.methodName+" \n"}alert(a)};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--)window["__slEvent"+a]=null;Silverlight._silverlightCount=0;if(window.removeEventListener)window.removeEventListener("unload",Silverlight.__cleanup,false);else window.detachEvent("onunload",Silverlight.__cleanup)};Silverlight.__getHandlerName=function(b){var a="";if(typeof b=="string")a=b;else if(typeof b=="function"){if(Silverlight._silverlightCount==0)if(window.addEventListener)window.addEventListener("onunload",Silverlight.__cleanup,false);else window.attachEvent("onunload",Silverlight.__cleanup);var c=Silverlight._silverlightCount++;a="__slEvent"+c;window[a]=b}else a=null;return a};Silverlight.onRequiredVersionAvailable=function(){};Silverlight.onRestartRequired=function(){};Silverlight.onUpgradeRequired=function(){};Silverlight.onInstallRequired=function(){};Silverlight.IsVersionAvailableOnError=function(d,a){var b=false;try{if(a.ErrorCode==8001&&!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==8002&&!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==5014||a.ErrorCode==2106){if(Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost()))b=true}else b=true}catch(c){}return b};Silverlight.IsVersionAvailableOnLoad=function(b){var a=false;try{if(Silverlight.__verifySilverlight2UpgradeSuccess(b.getHost()))a=true}catch(c){}return a};Silverlight.__verifySilverlight2UpgradeSuccess=function(d){var c=false,b="2.0.31005",a=null;try{if(d.IsVersionSupported(b+".99")){a=Silverlight.onRequiredVersionAvailable;c=true}else if(d.IsVersionSupported(b+".0"))a=Silverlight.onRestartRequired;else a=Silverlight.onUpgradeRequired;if(a&&!Silverlight.__installationEventFired){a();Silverlight.__installationEventFired=true}}catch(e){}return c}
\ No newline at end of file
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest.Web/Web.Debug.config
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest.Web/Web.Debug.config Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest.Web/Web.Release.config
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest.Web/Web.Release.config Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest.Web/Web.config
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest.Web/Web.config Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest.Web/WebTest.Web.csproj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest.Web/WebTest.Web.csproj Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,98 @@
+
+
+
+ Debug
+ AnyCPU
+
+
+ 2.0
+ {34E05E7B-6D92-4E90-A719-947EBB38D77A}
+ {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Library
+ Properties
+ WebTest.Web
+ WebTest.Web
+ v4.0
+ {1E06DD06-54FD-4C46-893D-66EB1D52488A}|..\WebTest\WebTest.csproj|ClientBin|False
+
+
+ true
+ full
+ false
+ bin\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Web.config
+
+
+ Web.config
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+ True
+ 2342
+ /
+
+
+ False
+ False
+
+
+ False
+
+
+
+
+
+
\ No newline at end of file
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest.Web/WebTestTestPage.aspx
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest.Web/WebTestTestPage.aspx Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,74 @@
+<%@ Page Language="C#" AutoEventWireup="true" %>
+
+
+
+
+ WebTest
+
+
+
+
+
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest.Web/WebTestTestPage.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest.Web/WebTestTestPage.html Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,73 @@
+
+
+
+
+ WebTest
+
+
+
+
+
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest.sln
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest.sln Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebTest", "WebTest\WebTest.csproj", "{1E06DD06-54FD-4C46-893D-66EB1D52488A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebTest.Web", "WebTest.Web\WebTest.Web.csproj", "{34E05E7B-6D92-4E90-A719-947EBB38D77A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {1E06DD06-54FD-4C46-893D-66EB1D52488A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1E06DD06-54FD-4C46-893D-66EB1D52488A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1E06DD06-54FD-4C46-893D-66EB1D52488A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1E06DD06-54FD-4C46-893D-66EB1D52488A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {34E05E7B-6D92-4E90-A719-947EBB38D77A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {34E05E7B-6D92-4E90-A719-947EBB38D77A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {34E05E7B-6D92-4E90-A719-947EBB38D77A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {34E05E7B-6D92-4E90-A719-947EBB38D77A}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest/App.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest/App.xaml Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest/App.xaml.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest/App.xaml.cs Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,94 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Iri.Modernisation.Data.Models;
+namespace WebTest
+{
+ public partial class App : Application
+ {
+
+ public App()
+ {
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+
+
+ }
+
+ void xmlClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
+ {
+
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+
+ /* FactoryVideoLivre.Initialize();
+
+ FactoryVideoLivre.FactoryReady += new EventHandler(FactoryVideoLivre_FactoryReady);
+ FactoryVideoLivre.LoadXMLFile("/ProjectConfig.xml");*/
+ SettingsProject.SettingsLoaded += new EventHandler(SettingsProject_SettingsLoaded);
+ SettingsProject.Load("/ProjectConfig.xml");
+
+
+ }
+
+ void SettingsProject_SettingsLoaded(object sender, EventArgs e)
+ {
+ InitializeComponent();
+ object o = FactoryVideoLivre.AnnotationDescriptions;
+ this.RootVisual = new MainPage();
+ }
+
+ /* void FactoryVideoLivre_FactoryReady(object sender, EventArgs e)
+ {
+ InitializeComponent();
+ object o = FactoryVideoLivre.AnnotationDescriptions;
+ this.RootVisual = new MainPage();
+
+ }*/
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight 2 Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest/MainPage.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest/MainPage.xaml Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest/MainPage.xaml.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest/MainPage.xaml.cs Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.Windows.Browser;
+using Iri.Modernisation.Controls.ViewModel;
+using Iri.Modernisation.BaseMVVM.Commands;
+using Iri.Modernisation.Data.LDTClass;
+using Iri.Modernisation.Data.Models;
+namespace WebTest
+{
+
+ public partial class MainPage : UserControl
+ {
+ public MainPage()
+ {
+ Commands.Initialize();
+
+ //FactoryVideoLivre.xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(xmlClient_DownloadStringCompleted);
+
+ List SelectedVideoBooks = new List();
+ SelectedVideoBooks = SettingsProject.ListVideoBook;
+
+ //Loader.RegisterType("ldt", LDTFileReader.ConvertToVideoBook);
+
+
+
+ // Loader.LoadAvailableVideoBooks("Content/AvailableVideoBooks.xml");
+ // Loader.xmlClient.DownloadStringCompleted+=new DownloadStringCompletedEventHandler(xmlClient_DownloadStringCompleted);
+ // SelectedVideoBooks = Loader.ListVideoBook;
+
+ InitializeComponent();
+ MainElement.DataContext = new MainVM(SelectedVideoBooks);
+
+
+
+
+
+ }
+
+ void xmlClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
+ {
+ if (e.Error == null)
+ {
+
+
+ }
+ else
+ {
+ //MessageBox.Show(e.Error.InnerException.Message);
+ }
+ }
+
+
+
+
+
+ }
+
+}
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest/Properties/AppManifest.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest/Properties/AppManifest.xml Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,6 @@
+
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest/Properties/AssemblyInfo.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest/Properties/AssemblyInfo.cs Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("WebTest")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Centre Georges Pompidou")]
+[assembly: AssemblyProduct("WebTest")]
+[assembly: AssemblyCopyright("Copyright © Centre Georges Pompidou 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("3c4bfd98-9bac-468e-a175-eda6064e7dcf")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/WebTest/WebTest/WebTest/WebTest.csproj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/WebTest/WebTest/WebTest/WebTest.csproj Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,130 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {1E06DD06-54FD-4C46-893D-66EB1D52488A}
+ {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Library
+ Properties
+ WebTest
+ WebTest
+ Silverlight
+ v4.0
+ $(TargetFrameworkVersion)
+ true
+ fr-FR;en-US
+ true
+ true
+ WebTest.xap
+ Properties\AppManifest.xml
+ WebTest.App
+ TestPage.html
+ true
+ true
+ false
+ Properties\OutOfBrowserSettings.xml
+ false
+ true
+
+
+ true
+ 3.1.11111.0
+
+
+
+ v3.5
+
+
+ true
+ full
+ false
+ Bin\Debug
+ DEBUG;TRACE;SILVERLIGHT
+ true
+ true
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ Bin\Release
+ TRACE;SILVERLIGHT
+ true
+ true
+ prompt
+ 4
+
+
+
+ ..\..\..\..\res\lib\Berico.Windows.Controls.dll
+
+
+ ..\..\..\..\res\lib\HackingSilverlightLibrary.dll
+
+
+ ..\..\..\..\src\Iri.Modernisation\Bin\Debug\Iri.Modernisation.BaseMVVM.dll
+
+
+ ..\..\..\..\src\Iri.Modernisation\Bin\Debug\Iri.Modernisation.Controls.dll
+
+
+ ..\..\..\..\src\Iri.Modernisation\Bin\Debug\Iri.Modernisation.Data.dll
+
+
+ ..\..\..\..\src\Iri.Modernisation\Bin\Debug\Iri.Modernisation.Styles.dll
+
+
+
+ ..\..\..\..\res\lib\SLExtensions.dll
+
+
+
+
+
+
+
+
+
+
+ App.xaml
+
+
+ MainPage.xaml
+
+
+
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/mainInterface/Iri.Modernisation.Test.MainInterface/AvailableVideoBooks.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/AvailableVideoBooks.xml Thu Jan 14 16:39:50 2010 +0100
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/mainInterface/Iri.Modernisation.Test.MainInterface/Iri.Modernisation.Test.MainInterface.csproj
--- a/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/Iri.Modernisation.Test.MainInterface.csproj Fri Jan 08 11:33:24 2010 +0100
+++ b/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/Iri.Modernisation.Test.MainInterface.csproj Thu Jan 14 16:39:50 2010 +0100
@@ -14,7 +14,7 @@
Properties
Iri.Modernisation.Test.MainInterface
Iri.Modernisation.Test.MainInterface
- v3.0
+ v4.0
true
fr-FR;en-US
true
@@ -38,12 +38,13 @@
3.5
+
true
full
false
- Bin\Debug
+ Bin\Debug\
DEBUG;TRACE;SILVERLIGHT
true
true
@@ -123,6 +124,9 @@
+
+ Designer
+
diff -r 5f8d275750e7 -r 644e3cd48034 client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs
--- a/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs Fri Jan 08 11:33:24 2010 +0100
+++ b/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs Thu Jan 14 16:39:50 2010 +0100
@@ -25,12 +25,18 @@
//FactoryVideoLivre.xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(xmlClient_DownloadStringCompleted);
FactoryVideoLivre.Load("ProjectConfig.xml");
List SelectedVideoBooks = new List();
+
+
/*************** Content Demo ***************/
/* Pour pouvoir tester avec des vidéos :
* - Placer les video dans le dossier Bin
* - Rajouter Application.Current.Host.Source.Host devant le nom du fichier
*/
- LDTFile file = new LDTFile();
+ Loader.RegisterType("ldt", LDTFileReader.ConvertToVideoBook);
+
+
+ //SelectedVideoBooks = Loader.LoadAvailableVideoBooks("Content/AvailableVideoBooks.xml");
+ /* LDTFile file = new LDTFile();
// file.Load(new Uri("Modernisation.FileConvertor;component/ENMI08-I-bernard_stiegler-jauffret.ldt", UriKind.Relative).ToString());
file.Load("Content/ENMI08-I-bernard_stiegler-jauffret.ldt");
@@ -45,6 +51,9 @@
temp.MediaPath = Application.Current.Host.Source.Host + @"/video.mp4";
SelectedVideoBooks.Add(temp);
SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-III_elizabethrosse-psychologie_et_reseaux_sociaux-jauffret.ldt").VideoBook);
+ */
+
+
// SelectedVideoBooks.Add(new LDTFileReader("Content/ENMI08-IV-dominiquepasquier-jauffret.ldt").VideoBook);
/********************************************/