--- a/.hgignore Tue Jan 19 09:49:26 2010 +0100
+++ b/.hgignore Tue Jan 19 09:49:56 2010 +0100
@@ -9,3 +9,4 @@
glob:Content/*
glob:ClientBin/*
glob:bin/*
+glob:*.mp4
--- a/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml Tue Jan 19 09:49:56 2010 +0100
@@ -32,7 +32,7 @@
<Grid x:Name="AnnotationMakerPanel">
<StackPanel x:Name="HeaderAnnotationMarkerPanel" Height="33" Orientation="Horizontal" Margin="0,0,8,0" VerticalAlignment="Top">
<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="HeaderAnnotationMakerLabel" Text="{Binding AnnotationMakerTitle, Source={StaticResource LangLabels}}" TextWrapping="Wrap" Width="166" Height="19" VerticalAlignment="Top"/>
- <ListBox Style="{StaticResource HorizontalListBox}" ItemsSource="{Binding ListAnnotationDescription}" SelectedItem="{Binding SelectedType,Mode=TwoWay}" x:Name="TypeAnnotationList" Margin="-27,0,0,2" Width="137" >
+ <ListBox Style="{StaticResource HorizontalListBox}" ItemsSource="{Binding ListAnnotationDescription}" SelectedItem="{Binding SelectedType,Mode=TwoWay}" x:Name="TypeAnnotationList" Margin="-27,0,0,2" Width="137" SelectedIndex="-1" >
<ListBox.ItemTemplate>
<DataTemplate>
<Rectangle Fill="{Binding Color,Converter={StaticResource ColorToBrush}}" Stroke="Black" Height="20" Width="22"></Rectangle>
--- a/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml Tue Jan 19 09:49:56 2010 +0100
@@ -6,7 +6,7 @@
mc:Ignorable="d"
xmlns:Converter="clr-namespace:Iri.Modernisation.Controls.Converter"
xmlns:SLExtensions_Data="clr-namespace:SLExtensions.Data;assembly=SLExtensions"
- x:Class="Iri.Modernisation.Controls.View.BookTimeLine" Height="272" Width="640">
+ x:Class="Iri.Modernisation.Controls.View.BookTimeLine" Height="272" Width="640" Background="Transparent">
<UserControl.Resources>
<Converter:BoolToVisibility x:Key="BoolToVisibility"/>
<SLExtensions_Data:BoolConverter x:Key="BoolConverter"/>
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableIndexElement.xaml.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/CustomableIndexElement.xaml.cs Tue Jan 19 09:49:56 2010 +0100
@@ -28,6 +28,7 @@
SetValue(TrimRightProperty, value);
((CustomableIndexElementVM)DataContext).TimerOut = ((CustomableIndexElementVM)DataContext).TimerOut.Subtract(new TimeSpan(0, 0, 0, 0, (int)((value) / ProductionTimeLine.ScaleTime)));
this.Width = ((CustomableIndexElementVM)DataContext).Duration;
+
}
}
}
--- a/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionView/ProductionView.xaml Tue Jan 19 09:49:56 2010 +0100
@@ -14,8 +14,8 @@
<View:HeaderProduction DataContext="{Binding ViewModelHeaderProduction}" x:Name="HeaderProductionElement" HorizontalAlignment="Left" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment"/>
<View:ProductionTimeLine x:Name="ProductionTimeLineElement" Height="176" VerticalAlignment="Bottom" DataContext="{Binding ViewModelProductionTimeLine}"/>
- <View:ProductionEditor DataContext="{Binding ViewModelProductionEditor}" Margin="272,115,0,0" HorizontalAlignment="Left" Height="381" VerticalAlignment="Top"/>
- <View:VideoViewer DataContext="{Binding ViewModelMasterVideoViewer}" HorizontalAlignment="Right" Margin="0,153,10,0" Width="404" VerticalAlignment="Top" Height="343"/>
+ <View:ProductionEditor DataContext="{Binding ViewModelProductionEditor}" Margin="260,127,457,180" Height="381" Width="245" d:LayoutOverrides="HorizontalAlignment"/>
+ <View:VideoViewer DataContext="{Binding ViewModelMasterVideoViewer}" Margin="561,144,20,201" Height="343"/>
<StackPanel x:Name="RecordsPanel" HorizontalAlignment="Left" Margin="8,288,0,192" Width="248">
<TextBlock Style="{StaticResource CommonTextBlock}" Text="{Binding RecordsLabel, Source={StaticResource LangLabels}}" x:Name="RecordLabel" TextWrapping="Wrap"/>
<ListBox SelectedItem="{Binding SelectedVideoSequence,Mode=TwoWay}" x:Name="RecordsList" ItemsSource="{Binding RecordedVideoSequences}" Height="152">
--- a/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml Tue Jan 19 09:49:56 2010 +0100
@@ -7,12 +7,12 @@
xmlns:Converter="clr-namespace:Iri.Modernisation.Controls.Converter"
xmlns:Input="clr-namespace:SLExtensions.Input;assembly=SLExtensions"
xmlns:View="clr-namespace:Iri.Modernisation.Controls.View"
- x:Class="Iri.Modernisation.Controls.View.VideoViewer" Width="223" Height="173">
+ x:Class="Iri.Modernisation.Controls.View.VideoViewer" Height="173">
<UserControl.Resources>
<Converter:BoolToVisibility x:Key="BoolToVisibility"></Converter:BoolToVisibility>
</UserControl.Resources>
- <StackPanel x:Name="VideoViewerPanel" Margin="0,2,0,0" Background="#FF323232" HorizontalAlignment="Left" Width="215">
- <TextBlock x:Name="textBlock" Text="{Binding Info}" TextWrapping="Wrap"/>
+ <StackPanel x:Name="VideoViewerPanel" Margin="0,2,0,0" Background="#FF323232" HorizontalAlignment="Left">
+ <TextBlock x:Name="textBlock" TextWrapping="Wrap"/>
<!-- Source="{Binding Source,Mode=TwoWay}" -->
<MediaElement AutoPlay="{Binding AutoPlay}" x:Name="VideoScreen" Position="{Binding Position,Mode=TwoWay}" Source="{Binding USource,Mode=TwoWay}" Margin="8,0" MediaFailed="VideoScreen_MediaFailed" MarkerReached="VideoScreen_MarkerReached" VerticalAlignment="Top" />
@@ -20,7 +20,7 @@
<Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="PreviousVideo" x:Name="VideoControlPreviousChapter" Content="<<"/>
<Button Visibility="{Binding RecordControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="RecordVideo" x:Name="VideoControlRecord" Width="43" Content="O" />
<Button Visibility="{Binding RecordControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="LoadVideo" x:Name="VideoControlLoad" Width="30" Content="_" />
- <Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="PlayVideo" Input:CommandService.CommandParameter="{Binding}" x:Name="VideoControlPlay" Content="|>"/>
+ <Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="PlayVideo" Input:CommandService.CommandParameter="{Binding}" x:Name="VideoControlPlay" Content="|>"/>
<Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="PauseVideo" Input:CommandService.CommandParameter="{Binding}" x:Name="VideoControlPause" Content="||"/>
<Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="NextVideo" x:Name="VideoControlNextChapter" Content=">>"/>
<Button Visibility="{Binding RecordControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="CloseVideo" x:Name="VideoControlClose" Width="25" Content="X"/>
--- a/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Tue Jan 19 09:49:56 2010 +0100
@@ -15,6 +15,7 @@
using System.Collections.Generic;
using System.Linq;
using Iri.Modernisation.Controls.View;
+using Iri.Modernisation.Data.LDTClass;
namespace Iri.Modernisation.Controls.ViewModel
{
@@ -37,14 +38,19 @@
set
{
_refElement = value;
-
+ if(value!=null)
+ {
_newAnnotation = new Annotation(((PolemicElement)value).Chapter);
-
+ Title = String.Empty;
+ Description = String.Empty;
+ Tags = String.Empty;
+ SelectedType = FactoryVideoLivre.AnnotationDescriptions[0];
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");
@@ -304,18 +310,65 @@
private void OkClickAnnotationMaker_Executed(object sender, ExecutedEventArgs e)
{
- String message = "Ok clicked "+SelectedType.Title+" \n";
- message += _begin + "-->" + _end;
- message += "\n" + Title;
- message += "\n" + Description;
+ LDTElement newAnnotation = new LDTElement();
+ newAnnotation.Title = Title;
+ newAnnotation.Abstract = Description;
+ newAnnotation.Begin = Begin;
+ newAnnotation.Dur = End - Begin;
+ newAnnotation.Tags = _tags;
+
+ newAnnotation.Color = int.Parse(_selectedType.Color.A.ToString() + _selectedType.Color.R.ToString() + _selectedType.Color.G.ToString() + _selectedType.Color.B.ToString());
+
- foreach (string tag in _tags)
+ LDTFile newfile = new LDTFile()
+ {
+ Medias = new List<LDTMedia>()
+ {
+ new LDTMedia()
+ {
+ Src = _refElement.Chapter.Book.IriPath
+ }
+ },
+ Relations = new List<LDTRelation>()
{
- message += "\n|-" + tag;
+ new LDTRelation()
+ {
+ IdElementFrom = _basicRelation.FromElement.Id,
+ IdElementTo = _basicRelation.ToElement.Id,
+ //Title = _basicRelation.Title
+ }
+ },
+ Annotations = new List<LDTAnnotationsContent>()
+ {
+ new LDTAnnotationsContent()
+ {
+ Content = new List<LDTAnnotationsDecoupage>()
+ {
+ new LDTAnnotationsDecoupage()
+ {
+ Elements = new List<LDTElement>()
+ {
+ newAnnotation
+ }
+ }
+ }
+ }
}
- message += "PolemicLink "+PolemicRelation.Type.Title;
- MessageBox.Show(message);
+ };
+ if (this._polemicRelation.ToElement != null)
+ {
+ LDTRelation polemicRelation = new LDTRelation()
+ {
+ IdElementFrom = _polemicRelation.FromElement.Id,
+ IdElementTo = _polemicRelation.ToElement.Id,
+ Title = _polemicRelation.Title
+ };
+ newfile.Relations.Add(polemicRelation);
+ }
+ MessageBox.Show(newfile.ToString());
+ _refElement = null;
+ OnPropertyChanged("IsControlEnable");
}
/// <summary>
@@ -356,6 +409,7 @@
}
+
}
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ProductionView/ProductionViewVM.cs Tue Jan 19 09:49:56 2010 +0100
@@ -151,17 +151,16 @@
BeginTrim = new TimeSpan(0, 0, 0),
EndTrim = new TimeSpan(0, 0, 0),
});
- for (int i = 0; i < 10; i++)
- {
+
_recordedVideoSequences.Add(new VideoSequence()
{
- Path= Application.Current.Host.Source.Host.ToString()+"/video.mp4",
+ Path = "http://localhost:1942/video.mp4",
RunTime = new TimeSpan(0, rndNumbers.Next(10, 60), 0),
BeginTrim = new TimeSpan(0, 0, 0),
EndTrim = new TimeSpan(0, 0, 0),
});
- }
+
InitializeCommands();
OnPropertyChanged(String.Empty);
--- a/client/src/Iri.Modernisation.Data/ClassDiagram1.cd Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/ClassDiagram1.cd Tue Jan 19 09:49:56 2010 +0100
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="Iri.Modernisation.Data.Models.VideoSequence">
- <Position X="0.5" Y="1.75" Width="1.5" />
+ <Position X="0.5" Y="1" Width="1.5" />
<TypeIdentifier>
<HashCode>ACAAAAIAAAACAAIAAABAAAgAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Models\VideoSequence.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Iri.Modernisation.Data.Models.Annotation">
- <Position X="6" Y="4.75" Width="1.5" />
+ <Position X="4.25" Y="5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Models\Annotation.cs</FileName>
@@ -18,7 +18,7 @@
</ShowAsAssociation>
</Class>
<Class Name="Iri.Modernisation.Data.Models.AnnotationSession">
- <Position X="7" Y="0.5" Width="1.5" />
+ <Position X="7.75" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAABAAAAAAAAAAAACAAAAAAAQAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Models\AnnotationSession.cs</FileName>
@@ -27,7 +27,7 @@
<Class Name="Iri.Modernisation.Data.Models.PolemicElement">
<Position X="5" Y="1.75" Width="1.5" />
<TypeIdentifier>
- <HashCode>AAAAAAAAAAAgAEAAAAAAAAAAAAAAAEAAAgAAAAAAAAA=</HashCode>
+ <HashCode>AAACAAAAAAAgAEAAAAAAAAAAAAAAAEAAAgAAAAAAAAA=</HashCode>
<FileName>Models\PolemicElement.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
@@ -35,7 +35,7 @@
</ShowAsAssociation>
</Class>
<Class Name="Iri.Modernisation.Data.Models.PolemicLink">
- <Position X="10.25" Y="2" Width="1.5" />
+ <Position X="7.5" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAEAAAAAAAAEAAAAAAIAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
<FileName>Models\PolemicLink.cs</FileName>
@@ -53,30 +53,32 @@
</TypeIdentifier>
</Class>
<Class Name="Iri.Modernisation.Data.Models.SegmentIndex">
- <Position X="8.75" Y="4.5" Width="1.5" />
+ <Position X="6.75" Y="4.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Models\SegmentIndex.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Iri.Modernisation.Data.Models.User">
- <Position X="5.75" Y="6.75" Width="1.5" />
+ <Position X="4" Y="7.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AEAAAEAAACAAIACKAMAAACQAAAICACACAQAAAAAAAEA=</HashCode>
<FileName>Models\User.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Iri.Modernisation.Data.Models.VideoBook">
- <Position X="2.5" Y="7.25" Width="1.5" />
+ <Position X="1.25" Y="7.75" Width="1.5" />
<AssociationLine Name="Chapters" Type="Iri.Modernisation.Data.Models.VideoChapter" FixedFromPoint="true" FixedToPoint="true">
<Path>
- <Point X="3.25" Y="7.25" />
- <Point X="3.25" Y="5.953" />
+ <Point X="2" Y="7.75" />
+ <Point X="2" Y="6.356" />
+ <Point X="2.5" Y="6.356" />
+ <Point X="2.5" Y="5.953" />
<Point X="2.25" Y="5.953" />
</Path>
</AssociationLine>
<TypeIdentifier>
- <HashCode>AABAAAACAAACAEAAgAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
+ <HashCode>AABAAAACAAAGAEAAgIAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Models\VideoBook.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
@@ -101,12 +103,30 @@
<Property Name="VideoSequences" />
</ShowAsCollectionAssociation>
</Class>
- <Enum Name="Iri.Modernisation.Data.Models.PolemicElementType" Collapsed="true">
- <Position X="11" Y="0.75" Width="1.5" />
+ <Class Name="Iri.Modernisation.Data.Models.FactoryVideoLivre">
+ <Position X="12.25" Y="1.5" Width="1.5" />
<TypeIdentifier>
- <HashCode>AAAAAACAQAAAAAAAAAAABAAAAAAAAAAEAAAAAACAAAA=</HashCode>
- <FileName>Models\PolemicElement.cs</FileName>
+ <HashCode>AAAAgAAAAABBAQAAEAAAEAACAEAAAAAAACAAEQAAAAA=</HashCode>
+ <FileName>Models\FactoryVideoLivre.cs</FileName>
</TypeIdentifier>
- </Enum>
+ <ShowAsCollectionAssociation>
+ <Property Name="AnnotationDescriptions" />
+ <Property Name="VideoChapterDescriptions" />
+ </ShowAsCollectionAssociation>
+ </Class>
+ <Class Name="Iri.Modernisation.Data.Models.PolemicTypeDescription">
+ <Position X="15" Y="1.5" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAgAAAAAA=</HashCode>
+ <FileName>Models\PolemicTypeDescription.cs</FileName>
+ </TypeIdentifier>
+ </Class>
+ <Class Name="Iri.Modernisation.Data.Models.VideoChapterDescription">
+ <Position X="15" Y="3.5" Width="1.5" />
+ <TypeIdentifier>
+ <HashCode>AAACAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAgAAAAAA=</HashCode>
+ <FileName>Models\VideoChapterDescription.cs</FileName>
+ </TypeIdentifier>
+ </Class>
<Font Name="Tahoma" Size="8.25" />
</ClassDiagram>
\ No newline at end of file
--- a/client/src/Iri.Modernisation.Data/Iri.Modernisation.Data.csproj Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Iri.Modernisation.Data.csproj Tue Jan 19 09:49:56 2010 +0100
@@ -76,6 +76,14 @@
<Reference Include="System.Xml.Linq, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="Ldt\IRIDecoupage.cs" />
+ <Compile Include="Ldt\IRIElement.cs" />
+ <Compile Include="Ldt\IRIEnsemble.cs" />
+ <Compile Include="Ldt\IRIFile.cs" />
+ <Compile Include="Ldt\IRILink.cs" />
+ <Compile Include="Ldt\IRIMedia.cs" />
+ <Compile Include="Ldt\IRIMeta.cs" />
+ <Compile Include="Ldt\IRIVideo.cs" />
<Compile Include="Ldt\LDTContent.cs" />
<Compile Include="Ldt\LDTDecoupage.cs" />
<Compile Include="Ldt\LDTDisplay.cs" />
@@ -87,9 +95,9 @@
<Compile Include="Ldt\LDTm.cs" />
<Compile Include="Ldt\LDTMedia.cs" />
<Compile Include="Ldt\LDTProject.cs" />
+ <Compile Include="Ldt\LDTRelation.cs" />
<Compile Include="Ldt\Readers.cs" />
<Compile Include="Models\Annotation.cs" />
- <Compile Include="Models\IVideoBookConverter.cs" />
<Compile Include="Models\Loader.cs" />
<Compile Include="Models\PolemicTypeDescription.cs" />
<Compile Include="Models\AnnotationSession.cs" />
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Ldt/IRIDecoupage.cs Tue Jan 19 09:49:56 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.Ldt
+{
+ public class IRIDecoupage
+ {
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Ldt/IRIElement.cs Tue Jan 19 09:49:56 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.Ldt
+{
+ public class IRIElement
+ {
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Ldt/IRIEnsemble.cs Tue Jan 19 09:49:56 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.Ldt
+{
+ public class IRIEnsemble
+ {
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Ldt/IRIFile.cs Tue Jan 19 09:49:56 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.Ldt
+{
+ public class IRIFile
+ {
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Ldt/IRILink.cs Tue Jan 19 09:49:56 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.Ldt
+{
+ public class IRILink
+ {
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Ldt/IRIMedia.cs Tue Jan 19 09:49:56 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.Ldt
+{
+ public class IRIMedia
+ {
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Ldt/IRIMeta.cs Tue Jan 19 09:49:56 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.Ldt
+{
+ public class IRIMeta
+ {
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Ldt/IRIVideo.cs Tue Jan 19 09:49:56 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.Ldt
+{
+ public class IRIVideo
+ {
+
+ }
+}
--- a/client/src/Iri.Modernisation.Data/Ldt/LDTContent.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Ldt/LDTContent.cs Tue Jan 19 09:49:56 2010 +0100
@@ -50,7 +50,7 @@
public LDTAnnotationsContent(XElement e)
{
Content = new List<LDTAnnotationsDecoupage>();
- Id = Title = e.Attribute("id").Value;
+ Id = e.Attribute("id").Value;
Title = e.Attribute("title").Value;
Author = e.Attribute("author").Value;
Abstract = e.Attribute("abstract").Value;
@@ -59,6 +59,14 @@
Content.Add(new LDTAnnotationsDecoupage(Elem));
}
}
+ public LDTAnnotationsContent()
+ {
+ Id = String.Empty;
+ Title = String.Empty;
+ Author = String.Empty;
+ Abstract = String.Empty;
+ Content = new List<LDTAnnotationsDecoupage>();
+ }
public XElement XML
{
get
--- a/client/src/Iri.Modernisation.Data/Ldt/LDTDecoupage.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Ldt/LDTDecoupage.cs Tue Jan 19 09:49:56 2010 +0100
@@ -64,6 +64,14 @@
Elements.Add(new LDTElement(Elem));
}
}
+ public LDTAnnotationsDecoupage()
+ {
+ Id = String.Empty;
+ Author = String.Empty;
+ Title = String.Empty;
+ Abstract = String.Empty;
+ Elements = new List<LDTElement>();
+ }
public XElement XML
{
get
--- a/client/src/Iri.Modernisation.Data/Ldt/LDTElement.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Ldt/LDTElement.cs Tue Jan 19 09:49:56 2010 +0100
@@ -24,11 +24,11 @@
/// <summary>
/// Attribut
/// </summary>
- public long Begin { get; set; }
+ public Double Begin { get; set; }
/// <summary>
/// Attribut
/// </summary>
- public long Dur { get; set; }
+ public Double Dur { get; set; }
/// <summary>
/// Attribut
/// </summary>
@@ -62,13 +62,18 @@
/// </summary>
public List<String> Tags { get; set; }
+ /// <summary>
+ /// Elements
+ /// </summary>
+ public String Video { get; set; }
+
public LDTElement(XElement e)
{
Tags = new List<String>();
Id = e.Attribute("id").Value;
- Begin = long.Parse(e.Attribute("begin").Value);
- Dur = long.Parse(e.Attribute("dur").Value);
+ Begin = Double.Parse(e.Attribute("begin").Value);
+ Dur = Double.Parse(e.Attribute("dur").Value);
Author = e.Attribute("author").Value;
Date = DateTime.Parse(e.Attribute("date").Value);
Color = int.Parse(e.Attribute("color").Value);
@@ -76,11 +81,34 @@
Title = e.Element("title").Value;
Abstract = e.Element("abstract").Value;
Audio = e.Element("audio").Value;
+ if (e.Element("video")==null)
+ {
+ Video = String.Empty;
+ }
+ else
+ {
+ Video = e.Element("video").Value;
+ }
foreach (XElement Str in e.Element("tags").Elements())
{
Tags.Add(Str.Value);
}
}
+ public LDTElement()
+ {
+ Id = String.Empty;
+ Begin = 0;
+ Dur = 0;
+ Author = String.Empty;
+ Date = DateTime.Now;
+ Color = 0;
+ Src = String.Empty;
+ Title = String.Empty;
+ Abstract = String.Empty;
+ Audio = String.Empty;
+ Video = String.Empty;
+ Tags = new List<string>();
+ }
public XElement XML
{
@@ -96,7 +124,8 @@
new XAttribute("src",Src),
new XElement("title",Title),
new XElement("abstract",Abstract),
- new XElement("audio",Audio)
+ new XElement("audio",Audio),
+ new XElement("video",Video)
);
XElement XTags = new XElement("tags");
foreach (String Tag in Tags)
--- a/client/src/Iri.Modernisation.Data/Ldt/LDTFile.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Ldt/LDTFile.cs Tue Jan 19 09:49:56 2010 +0100
@@ -45,6 +45,8 @@
/// </summary>
public List<LDTEditing> Edits { get; set; }
+ public List<LDTRelation> Relations { get; set; }
+
public LDTFile()
{
Project = new LDTProject();
@@ -52,6 +54,7 @@
Annotations = new List<LDTAnnotationsContent>();
Displays = new List<LDTDisplay>();
Edits = new List<LDTEditing>();
+ Relations = new List<LDTRelation>();
}
public void Load(String _path)
{
@@ -86,6 +89,14 @@
{
Edits.Add(new LDTEditing(Elem));
}
+
+ if(xdoc.Root.Element("realtions")!=null)
+ {
+ foreach (XElement Elem in xdoc.Root.Element("realtions").Elements())
+ {
+ Relations.Add(new LDTRelation(Elem));
+ }
+ }
}
public XDocument XMLFile
{
@@ -96,6 +107,12 @@
}
}
+
+ public override String ToString()
+ {
+ return XML.ToString();
+ }
+
public XElement XML
{
get
@@ -137,6 +154,15 @@
XEdits.Add(edit.XML);
}
temp.Add(XEdits);
+
+ //
+ XElement XRelations = new XElement("relations");
+ foreach (LDTRelation relation in Relations)
+ {
+ XRelations.Add(relation.XML);
+ }
+ temp.Add(XRelations);
+
return temp;
}
}
--- a/client/src/Iri.Modernisation.Data/Ldt/LDTMedia.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Ldt/LDTMedia.cs Tue Jan 19 09:49:56 2010 +0100
@@ -45,7 +45,11 @@
public LDTMedia()
{
-
+ Id = String.Empty;
+ Src = String.Empty;
+ Video = String.Empty;
+ Pict = String.Empty;
+ Extra = String.Empty;
}
public LDTMedia(XElement e)
--- a/client/src/Iri.Modernisation.Data/Ldt/LDTProject.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Ldt/LDTProject.cs Tue Jan 19 09:49:56 2010 +0100
@@ -46,7 +46,10 @@
}
public LDTProject()
{
-
+ Id = 0;
+ User = String.Empty;
+ Title = String.Empty;
+ Abstract = String.Empty;
}
public XElement XML
{
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Ldt/LDTRelation.cs Tue Jan 19 09:49:56 2010 +0100
@@ -0,0 +1,63 @@
+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;
+namespace Iri.Modernisation.Data.LDTClass
+{
+
+ public class LDTRelation
+ {
+ public String IdElementFrom { get; set; }
+ public String IdElementTo { get; set; }
+ public String Title { get; set; }
+
+ public LDTRelation()
+ {
+ IdElementFrom = String.Empty;
+ IdElementTo = String.Empty;
+ Title = String.Empty;
+ }
+ public LDTRelation(XElement elem)
+ {
+
+
+ IdElementFrom = elem.Attribute("idElementFrom").Value;
+ IdElementTo = elem.Attribute("idElementTo").Value;
+ Title = elem.Attribute("title").Value;
+ }
+
+ public XElement XML
+ {
+ get
+ {
+ if(IdElementFrom==null)
+ {
+ IdElementFrom = String.Empty;
+ }
+ if(IdElementTo == null)
+ {
+ IdElementTo = String.Empty;
+ }
+ if(Title == null)
+ {
+ Title = String.Empty;
+ }
+ return new XElement("relation",
+ new XAttribute("idElementFrom", IdElementFrom),
+ new XAttribute("idElementTo", IdElementTo),
+ new XAttribute("title", Title)
+
+ );
+ }
+ }
+
+
+ }
+}
--- a/client/src/Iri.Modernisation.Data/Ldt/Readers.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Ldt/Readers.cs Tue Jan 19 09:49:56 2010 +0100
@@ -30,8 +30,9 @@
UserName = _ldtFile.Project.User,
},
- Duration = new TimeSpan()
-
+ Duration = new TimeSpan(),
+ IriPath = _ldtFile.Medias[0].Src,
+ LdtPath = Path.BaseUri,
};
@@ -47,6 +48,7 @@
_videoBook.Chapters[selectedChapter].Index.Add(new SegmentIndex(_videoBook.Chapters[selectedChapter])
{
+ Id= LDTE.Id,
Title = LDTE.Title,
Description = LDTE.Abstract,
Tags = LDTE.Tags,
@@ -70,6 +72,7 @@
{
_videoBook.Chapters[0].Annotations.Add(new Annotation(_videoBook.Chapters[0])
{
+ Id = LDTE.Id,
Title = LDTE.Title,
Description = LDTE.Abstract,
Tags = LDTE.Tags,
--- a/client/src/Iri.Modernisation.Data/Models/IVideoBookConverter.cs Tue Jan 19 09:49:26 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-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();
- }
-}
--- a/client/src/Iri.Modernisation.Data/Models/Loader.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/Loader.cs Tue Jan 19 09:49:56 2010 +0100
@@ -20,32 +20,52 @@
/// <typeparam name="ReturnType">Type Désiré</typeparam>
public class Loader<ResultType>
{
+
+ public String Path { get; private set; }
/// <summary>
/// WebClient qui permet de charger le XML distant
/// </summary>
- private WebClient xmlClient = new WebClient();
- private String _path{get;set;}
+ public WebClient xmlClient {get; private set;}
+ /// <summary>
+ /// Fonction permettant de transcrire le document XML en Type désiré
+ /// </summary>
private Func<XDocument, ResultType> ProcessFunction { get; set; }
+ /// <summary>
+ /// Constructeur
+ /// </summary>
+ /// <param name="processFunction">Fonction de transtypage</param>
public Loader(Func<XDocument,ResultType> processFunction)
{
ProcessFunction = processFunction;
-
+ xmlClient = new WebClient();
}
- public void LoadAvailableVideoBooks(String path)
+
+ /// <summary>
+ /// Téléchargement des données
+ /// </summary>
+ /// <param name="path">Chemin du fichier</param>
+ public void Load(String path)
{
- _path = path;
+ Path = path;
xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(xmlClient_DownloadStringCompleted);
xmlClient.DownloadStringAsync(new Uri(path,UriKind.RelativeOrAbsolute));
}
+ /// <summary>
+ /// Une fois le fichier télécharger, on commence le transtypage
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
void xmlClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
+ //On utilise la fonction donnée lors de la construction du Loader pour créer l'objet grâce au fichier XML
ResultType result = ProcessFunction.Invoke(XDocument.Parse(e.Result));
if (LoaderFinished != null)
{
-
+ //Une fois le Transtypage Fini, on lance l'évenement indiquant que le chargement est fini et donnant
+ // en argument l'objet créé.
LoaderFinished(this, new LoaderEventArgs<ResultType>(result));
}
}
--- a/client/src/Iri.Modernisation.Data/Models/PolemicElement.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/PolemicElement.cs Tue Jan 19 09:49:56 2010 +0100
@@ -32,6 +32,11 @@
{
#region Attributes
/// <summary>
+ /// Id de l'élément
+ /// </summary>
+ public String Id { get; set; }
+
+ /// <summary>
/// Titre de l'élément
/// </summary>
public String Title {get;set;}
@@ -49,6 +54,9 @@
public VideoChapter Chapter { get; set; }
#endregion
+
+
+
/// <summary>
/// Constructeur par défaut
/// </summary>
--- a/client/src/Iri.Modernisation.Data/Models/VideoBook.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/VideoBook.cs Tue Jan 19 09:49:56 2010 +0100
@@ -45,6 +45,16 @@
public String MediaPath { get; set; }
/// <summary>
+ /// Chemin du projet .ldt
+ /// </summary>
+ public String LdtPath { get; set; }
+
+ /// <summary>
+ /// Chemin du .iri
+ /// </summary>
+ public String IriPath { get; set; }
+
+ /// <summary>
/// Constructeur par défaut
/// </summary>
public VideoBook()
@@ -91,7 +101,7 @@
Loader<VideoBook> LoaderVideoBook = new Loader<VideoBook>(LDTFileReader.ConvertToVideoBook);
LoaderVideoBook.LoaderFinished += new EventHandler<LoaderEventArgs<VideoBook>>(LoaderVideoBook_LoaderFinished);
- LoaderVideoBook.LoadAvailableVideoBooks(XVideoBook.Attribute("metafile").Value);
+ LoaderVideoBook.Load(XVideoBook.Attribute("metafile").Value);
nbOfBook++;
@@ -102,6 +112,7 @@
void LoaderVideoBook_LoaderFinished(object sender, LoaderEventArgs<VideoBook> e)
{
+ e.CreatedObject.LdtPath = ((Loader<VideoBook>)sender).Path ;
returnVideoBookList.Add(e.CreatedObject);
if(returnVideoBookList.Count == nbOfBook)
{
@@ -112,11 +123,7 @@
}
}
public event EventHandler<LoaderEventArgs<List<VideoBook>>> LoaderFinished;
- /*public List<VideoBook> LoadFromXml(XDocument XDoc)
- {
-
-
- }*/
+
}
/// <summary>
--- a/client/src/Iri.Modernisation.Data/Models/VideoSequence.cs Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/VideoSequence.cs Tue Jan 19 09:49:56 2010 +0100
@@ -60,6 +60,7 @@
{
get
{
+
return RunTime - (BeginTrim + EndTrim);
}
--- a/client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx Tue Jan 19 09:49:26 2010 +0100
+++ b/client/src/Iri.Modernisation.Lang/LangResource.fr-FR.resx Tue Jan 19 09:49:56 2010 +0100
@@ -153,7 +153,7 @@
<value>Enrichissement</value>
</data>
<data name="EnrichmentMessage" xml:space="preserve">
- <value>Le chapitre Modernité est maintenant indexé. Vous avez la possibilité de créer des liens polémiques vers des contenus existants, que ce soient d'autres séquences du corpus, ou des annotations de contributeurs.
+ <value>Le chapitre {0} est maintenant indexé. Vous avez la possibilité de créer des liens polémiques vers des contenus existants, que ce soient d'autres séquences du corpus, ou des annotations de contributeurs.
La publication de votre vidéo-livre validera cette étape. Vous pouvez à tout moment passer au chapitre suivant et revenir à cette étape de contextualisation.</value>
</data>
--- a/client/test/WebTest/WebTest/WebTest.Web/ProjectConfig.xml Tue Jan 19 09:49:26 2010 +0100
+++ b/client/test/WebTest/WebTest/WebTest.Web/ProjectConfig.xml Tue Jan 19 09:49:56 2010 +0100
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ProjectConfig
- VideoBookList="/Content/AvailableVideoBooks2.xml"
+ VideoBookList="/Content/AvailableVideoBooks.xml"
>
<VideoBook>
--- a/client/test/WebTest/WebTest/WebTest.Web/WebTest.Web.csproj Tue Jan 19 09:49:26 2010 +0100
+++ b/client/test/WebTest/WebTest/WebTest.Web/WebTest.Web.csproj Tue Jan 19 09:49:56 2010 +0100
@@ -75,7 +75,7 @@
<WebProjectProperties>
<UseIIS>False</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
- <DevelopmentServerPort>2342</DevelopmentServerPort>
+ <DevelopmentServerPort>1942</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>
</IISUrl>
--- a/client/test/WebTest/WebTest/WebTest.Web/WebTestTestPage.aspx Tue Jan 19 09:49:26 2010 +0100
+++ b/client/test/WebTest/WebTest/WebTest.Web/WebTestTestPage.aspx Tue Jan 19 09:49:56 2010 +0100
@@ -67,7 +67,7 @@
<param name="autoUpgrade" value="true" />
<param name="culture" value="fr-FR" />
<param name="uiculture" value="fr-FR" />
- <param name="initparams" value="ConfigProjectFile=/ProjectConfig.xml,test=toto"/>
+ <param name="initparams" value="ConfigProjectFile=/ProjectConfig.xml"/>
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.41108.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>