--- a/client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs Fri Nov 20 13:58:39 2009 +0100
+++ b/client/src/Iri.Modernisation.BaseMVVM/Commands/Commands.cs Mon Nov 23 10:17:33 2009 +0100
@@ -76,6 +76,12 @@
//PersonnalChutier
Search = new Command("iSearch");
ClickAnnotation = new Command("iClickAnnotation");
+ RefChutierAdd = new Command("RefChutierAdd");
+ }
+ public static Command RefChutierAdd
+ {
+ get;
+ private set;
}
public static Command Search
{
@@ -147,6 +153,12 @@
{
ActionReleased = new Command("ActionReleased");
CreateNewTextualAnnotation = new Command("CreateNewTextualAnnotation");
+ AddToRefChutier = new Command("AddToChutier");
+ }
+ static public Command AddToRefChutier
+ {
+ get;
+ private set;
}
static public Command CreateNewTextualAnnotation
{
--- a/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml Fri Nov 20 13:58:39 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml Mon Nov 23 10:17:33 2009 +0100
@@ -81,6 +81,6 @@
</StackPanel>
- <Button Input:CommandService.Command="OkClick" Input:CommandService.CommandParameter="{Binding}" x:Name="AnnotationOkButton" Content="{Binding OkLabel, Converter={StaticResource TagConvert}}" HorizontalAlignment="Right" Width="48" d:LayoutOverrides="HorizontalAlignment" RenderTransformOrigin="0.508,-0.091" Margin="0,282,8,0" VerticalAlignment="Top" Height="30"/>
+ <Button Input:CommandService.Command="OkClick" Input:CommandService.CommandParameter="{Binding}" x:Name="AnnotationOkButton" Content="{Binding OkLabel, Source={StaticResource LangLabels}}" HorizontalAlignment="Right" Width="48" d:LayoutOverrides="HorizontalAlignment" RenderTransformOrigin="0.508,-0.091" Margin="0,282,8,0" VerticalAlignment="Top" Height="30"/>
</Grid>
</UserControl>
\ No newline at end of file
--- a/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml Fri Nov 20 13:58:39 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml Mon Nov 23 10:17:33 2009 +0100
@@ -23,7 +23,7 @@
<ScrollViewer x:Name="TimeLineScroller" HorizontalScrollBarVisibility="Visible" Height="233" Margin="0,0,8,0" VerticalScrollBarVisibility="Disabled" >
<StackPanel x:Name="TimeStripsPanel" Width="{Binding Value, ElementName=ScaleTimeLine, Mode=OneWay}" RenderTransformOrigin="0,0.5">
- <Slider x:Name="BookTimeLineSlider" Canvas.ZIndex="10" Height="31" d:LayoutOverrides="Height" Minimum="0" Maximum="{Binding TotalDuration}" Value="{Binding Position,Mode=TwoWay}" />
+ <Slider x:Name="BookTimeLineSlider" Canvas.ZIndex="10" Height="31" d:LayoutOverrides="Height" Maximum="{Binding TotalDuration}" Value="{Binding Position,Mode=TwoWay}" MouseLeftButtonDown="BookTimeLineSlider_MouseLeftButtonDown" />
<Canvas x:Name="BookTimeLineElementPanel" Visibility="{Binding IsChecked, Converter={StaticResource BoolToVisibility}, ElementName=DisplayCommentButton, Mode=OneWay}" />
<StackPanel Margin="0,80,0,0">
<!-- <TestSpectrogramme:Spectrogramme ColorBar="Red" x:Name="PolemicSpec" Height="20" Canvas.ZIndex="-2"/>
--- a/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs Fri Nov 20 13:58:39 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs Mon Nov 23 10:17:33 2009 +0100
@@ -67,6 +67,12 @@
BookTimeLineElementPanel.UpdateLayout();
}
+ private void BookTimeLineSlider_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+ {
+ MessageBox.Show("Change");
+ BookTimeLineSlider.Value = (e.GetPosition(BookTimeLineSlider).X) * BookTimeLineSlider.Maximum / BookTimeLineSlider.Width;
+ }
+
--- a/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenu.xaml.cs Fri Nov 20 13:58:39 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenu.xaml.cs Mon Nov 23 10:17:33 2009 +0100
@@ -42,7 +42,7 @@
Commands.Action.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(Action_Executed);
_localiserItem.ClickMenuItemSelected += Commands.Action.Execute;
_copierItem.ClickMenuItemSelected += Commands.Action.Execute;
- _chutierItem.ClickMenuItemSelected += Commands.Action.Execute;
+ _chutierItem.ClickMenuItemSelected += Commands.ClickMenu.AddToRefChutier.Execute;
_contextualiserPanel._adhesionItem.ClickMenuItemSelected += Commands.Action.Execute;
_contextualiserPanel._polemicItem.ClickMenuItemSelected += Commands.Action.Execute;
_contextualiserPanel._questionItem.ClickMenuItemSelected += Commands.Action.Execute;
--- a/client/src/Iri.Modernisation.Controls/ViewModel/ClickMenu/ClickMenuVM.cs Fri Nov 20 13:58:39 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/ClickMenu/ClickMenuVM.cs Mon Nov 23 10:17:33 2009 +0100
@@ -43,6 +43,13 @@
InitializeCommands();
}
private void InitializeCommands()
- { }
+ {
+ Commands.ClickMenu.AddToRefChutier.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(AddToRefChutier_Executed);
+ }
+
+ void AddToRefChutier_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e)
+ {
+ Commands.ReferencesChutier.RefChutierAdd.Execute(SelectedElement);
+ }
}
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/ChutierVM.cs Fri Nov 20 13:58:39 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/ChutierVM.cs Mon Nov 23 10:17:33 2009 +0100
@@ -13,14 +13,16 @@
using Iri.Modernisation.BaseMVVM.ViewModel;
using Iri.Modernisation.Data.Models;
using System.Collections.Generic;
+using SLExtensions.Collections.ObjectModel;
+
using System.Linq;
namespace Iri.Modernisation.Controls.ViewModel
{
public class ChutierVM : BaseMVVM.ViewModel.ViewModel
{
- protected List<PolemicElement> _annotations = new List<PolemicElement>();
- protected List<PolemicElement> list = new List<PolemicElement>();
- public List<PolemicElement> Annotations
+ protected ObservableCollection<PolemicElement> _annotations = new ObservableCollection<PolemicElement>();
+ protected ObservableCollection<PolemicElement> list = new ObservableCollection<PolemicElement>();
+ public ObservableCollection<PolemicElement> Annotations
{
get
{
@@ -61,10 +63,12 @@
}
private void InitializeCommands()
- {
- }
+ {
+ }
- public ChutierVM(List<PolemicElement> argList)
+
+
+ public ChutierVM(ObservableCollection<PolemicElement> argList)
{
_annotations = argList;
InitializeCommands();
@@ -72,10 +76,11 @@
protected void Search()
{
+
var query = from c in _annotations
where c.Title.Contains(_searchWord)
select c;
- Annotations = query.ToList();
+ Annotations = new ObservableCollection<PolemicElement>(query.ToList());
}
public void ClickAnnotation_Executed(object sender, ExecutedEventArgs e)
{
@@ -92,7 +97,7 @@
}
public class PersonnalChutierVM : ChutierVM
{
- public PersonnalChutierVM(List<PolemicElement> argList)
+ public PersonnalChutierVM(ObservableCollection<PolemicElement> argList)
: base( argList)
{
InitializeCommands();
@@ -109,7 +114,7 @@
public class ReferencesChutierVM : ChutierVM
{
- public ReferencesChutierVM(List<PolemicElement> argList)
+ public ReferencesChutierVM(ObservableCollection<PolemicElement> argList)
: base(argList)
{
InitializeCommands();
@@ -117,9 +122,23 @@
private void InitializeCommands()
{
+ Commands.ReferencesChutier.RefChutierAdd.Executed += new EventHandler<ExecutedEventArgs>(RefChutierAdd_Executed);
+
Commands.ReferencesChutier.Search.Executed += new EventHandler<ExecutedEventArgs>(ChutierSearch_Executed);
Commands.ReferencesChutier.ClickAnnotation.Executed += new EventHandler<ExecutedEventArgs>(ClickAnnotation_Executed);
}
+ void RefChutierAdd_Executed(object sender, ExecutedEventArgs e)
+ {
+ if(!_annotations.Contains((PolemicElement)e.Parameter))
+ {
+ _annotations.Add((PolemicElement)e.Parameter);
+ }
+ else
+ {
+ MessageBox.Show("Element déjà sauvegardé");
+ }
+
+ }
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/NavigationBarVM.cs Fri Nov 20 13:58:39 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/NavigationBar/NavigationBarVM.cs Mon Nov 23 10:17:33 2009 +0100
@@ -17,6 +17,9 @@
{
public NavigationBarVM()
{
+ _consultMenuViewModel = new ConsultMenuVM();
+ _personnalChutierViewModel = new PersonnalChutierVM(new SLExtensions.Collections.ObjectModel.ObservableCollection<PolemicElement>());
+ _referencesChutierViewModel = new ReferencesChutierVM(new SLExtensions.Collections.ObjectModel.ObservableCollection<PolemicElement>());
}
private ConsultMenuVM _consultMenuViewModel;
public ConsultMenuVM ConsultMenuViewModel
--- a/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs Fri Nov 20 13:58:39 2009 +0100
+++ b/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/MainPage.xaml.cs Mon Nov 23 10:17:33 2009 +0100
@@ -21,6 +21,7 @@
{
public MainPage()
{
+
List<VideoBook> SelectedVideoBooks = new List<VideoBook>();
/*************** Content Demo ***************/
/* Pour pouvoir tester avec des vidéos :