--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Controls/Converter/ColorToSolidBrush.cs Tue Jan 05 15:53:48 2010 +0100
@@ -0,0 +1,28 @@
+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.Windows.Data;
+namespace Iri.Modernisation.Controls.Converter
+{
+ public class ColorToSolidBrush : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ return new SolidColorBrush((Color)value);
+
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ return ((SolidColorBrush)value).Color;
+
+ }
+ }
+}
--- a/client/src/Iri.Modernisation.Controls/Converter/PolemicTypeColorConverter.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/Converter/PolemicTypeColorConverter.cs Tue Jan 05 15:53:48 2010 +0100
@@ -80,19 +80,6 @@
throw new NotImplementedException();
}
- /*
- case VideoChapterType.Modernite:
- returnBrush = new SolidColorBrush(new Color() { A = 255, R = 0xD6, G = 0xA3, B = 0x82 });
- break;
- case VideoChapterType.Modernisation:
- returnBrush = new SolidColorBrush(new Color() { A = 255, R = 0xBF, G = 0xA8, B = 0x4E});
- break;
- case VideoChapterType.Postmodernite:
- returnBrush = new SolidColorBrush(new Color() { A = 255, R = 0xB5, G = 0xCB, B = 0x29 });
- break;
- case VideoChapterType.Ouverture:
- returnBrush = new SolidColorBrush(new Color() { A = 255, R = 0x5B, G = 0xCC, B = 0x5B });
- break;
- */
+
}
}
--- a/client/src/Iri.Modernisation.Controls/Iri.Modernisation.Controls.csproj Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/Iri.Modernisation.Controls.csproj Tue Jan 05 15:53:48 2010 +0100
@@ -61,6 +61,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Converter\BoolToVisibility.cs" />
+ <Compile Include="Converter\ColorToSolidBrush.cs" />
<Compile Include="Converter\PolemicTypeColorConverter.cs" />
<Compile Include="Converter\TagArrayConverter.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -168,6 +169,9 @@
<Compile Include="View\NavigationBar\ReferencesChutier.xaml.cs">
<DependentUpon>ReferencesChutier.xaml</DependentUpon>
</Compile>
+ <Compile Include="View\PolemicView\PolemicView.xaml.cs">
+ <DependentUpon>PolemicView.xaml</DependentUpon>
+ </Compile>
<Compile Include="View\ProductionEditor\ProductionEditor.xaml.cs">
<DependentUpon>ProductionEditor.xaml</DependentUpon>
</Compile>
@@ -288,6 +292,10 @@
<Generator>MSBuild:MarkupCompilePass1</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="View\PolemicView\PolemicView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:MarkupCompilePass1</Generator>
+ </Page>
<Page Include="View\ProductionEditor\ProductionEditor.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:MarkupCompilePass1</Generator>
--- a/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml Tue Jan 05 15:53:48 2010 +0100
@@ -25,21 +25,29 @@
<Lang:LangResource x:Name="LangLabels" x:Key="LangLabels"></Lang:LangResource>
<Converter:TagArrayConverter x:Key="TagConvert"/>
+ <Converter:ColorToSolidBrush x:Key="ColorToBrush"/>
</ResourceDictionary>
</UserControl.Resources>
<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}" SelectedItem="{Binding SelectedType,Mode=TwoWay}" SelectedIndex="0" x:Name="TypeAnnotationList" Margin="-27,0,0,2" Width="137" >
-
- <Rectangle x:Name="RectPolemic" Fill="Red" Stroke="Black" Height="20" Width="22">
+ <ListBox Style="{StaticResource HorizontalListBox}" ItemsSource="{Binding ListAnnotationDescription}" SelectedItem="{Binding SelectedType,Mode=TwoWay}" x:Name="TypeAnnotationList" Margin="-27,0,0,2" Width="137" >
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <Rectangle Fill="{Binding Color,Converter={StaticResource ColorToBrush}}" Stroke="Black" Height="20" Width="22"></Rectangle>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ <!--
+ <Rectangle x:Name="RectPolemic" Fill="Red" Stroke="Black" Height="20" Width="22">
</Rectangle>
<Rectangle x:Name="RectAdhesion" Fill="#FF13FF00" Stroke="Black" Height="20" Width="22"/>
<Rectangle x:Name="RectReferences" Fill="#FF0D00FF" Stroke="Black" Height="20" Width="22"/>
<Rectangle x:Name="RectQuestion" Fill="#FFE7FF02" Stroke="Black" Height="20" Width="22"/>
- </ListBox>
+
+ -->
+ </ListBox>
</StackPanel>
<StackPanel x:Name="AnnotationTimeLinePanel" Height="87" VerticalAlignment="Top" Margin="0,37,0,0" >
<Slider x:Name="TimeControl" Minimum="{Binding RefElement.TimerIn.TotalMilliseconds, Mode=TwoWay}" Maximum="{Binding RefElement.TimerOut.TotalMilliseconds, Mode=TwoWay}" />
@@ -61,8 +69,8 @@
<TextBox x:Name="TitleAnnotationTextBox" HorizontalAlignment="Left" Width="223" Text="{Binding Title, Mode=TwoWay}" TextWrapping="Wrap" VerticalAlignment="Top" Margin="24,0,0,0"/>
<TextBox x:Name="DescriptionAnnotationTextBox" Text="{Binding Description, Mode=TwoWay}" TextWrapping="Wrap" Margin="12,24,0,0" Height="48" VerticalAlignment="Top" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"/>
<TextBox x:Name="KeyWordAnnotationTextBox" Text="{Binding Tags, Mode=TwoWay}" TextWrapping="Wrap" Margin="12,-18,0,0" Grid.Row="1" d:LayoutOverrides="Height"/>
- <Rectangle Fill="{Binding SelectedItem.Fill, ElementName=TypeAnnotationList, Mode=OneWay}" Stroke="Black" Height="21" HorizontalAlignment="Left" VerticalAlignment="Top" Width="20"/>
- <Rectangle Fill="{Binding SelectedItem.Fill, ElementName=TypeAnnotationList, Mode=OneWay}" Stroke="Black" HorizontalAlignment="Left" Margin="0,20,0,0" Width="8" Grid.RowSpan="2"/>
+ <Rectangle Fill="{Binding SelectedType.Color,Converter={StaticResource ColorToBrush}}" Stroke="Black" Height="21" HorizontalAlignment="Left" VerticalAlignment="Top" Width="20"/>
+ <Rectangle Fill="{Binding SelectedType.Color,Converter={StaticResource ColorToBrush}}" Stroke="Black" HorizontalAlignment="Left" Margin="0,20,0,0" Width="8" Grid.RowSpan="2"/>
<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="KeyWordLabel" Text="{Binding RefTags, Converter={StaticResource TagConvert}}" TextWrapping="Wrap" Margin="12,79,0,22"/>
@@ -70,11 +78,18 @@
<StackPanel x:Name="AnnotationContextualLinkPanel" Height="74" Margin="0,0,8,0" VerticalAlignment="Bottom">
<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="AnnotationContextualLinkLabel" Text="{Binding AnnotationMakerAddLinkLabel, Source={StaticResource LangLabels}}" TextWrapping="Wrap"/>
<TextBlock Style="{StaticResource CommonTextBlock}" x:Name="AnnotationContextualBindedLabel" TextWrapping="Wrap" HorizontalAlignment="Left" Width="295" Text="{Binding PolemicRelation.ToElement.Title}" Height="26"/>
- <StackPanel x:Name="ContextualBinderPanel" Orientation="Horizontal">
- <View:ContextualLinkBinder PolemicType="Polemic" x:Name="Binder1" />
+ <ListBox ItemsSource="{Binding ListAnnotationDescription}" Style="{StaticResource HorizontalListBox}" Margin="0,0,72,0" Height="32">
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <View:ContextualLinkBinder PolemicType="{Binding}" />
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+ <StackPanel x:Name="ContextualBinderPanel" Orientation="Horizontal" >
+ <!--<View:ContextualLinkBinder PolemicType="Polemic" x:Name="Binder1" />
<View:ContextualLinkBinder PolemicType="Adhesion" x:Name="Binder2" />
<View:ContextualLinkBinder PolemicType="Reference" x:Name="Binder3" />
- <View:ContextualLinkBinder PolemicType="Question" x:Name="Binder4"/>
+ <View:ContextualLinkBinder PolemicType="Question" x:Name="Binder4"/> -->
</StackPanel>
--- a/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/AnnotationMaker/AnnotationMaker.xaml.cs Tue Jan 05 15:53:48 2010 +0100
@@ -16,10 +16,10 @@
{
// Required to initialize variables
InitializeComponent();
- RectPolemic.Resources.Add("PolemicType", PolemicElementType.Polemic);
- RectAdhesion.Resources.Add("PolemicType", PolemicElementType.Adhesion);
- RectQuestion.Resources.Add("PolemicType", PolemicElementType.Question);
- RectReferences.Resources.Add("PolemicType", PolemicElementType.Reference);
+ // RectPolemic.Resources.Add("PolemicType", PolemicElementType.Polemic);
+ //RectAdhesion.Resources.Add("PolemicType", PolemicElementType.Adhesion);
+ //RectQuestion.Resources.Add("PolemicType", PolemicElementType.Question);
+ //RectReferences.Resources.Add("PolemicType", PolemicElementType.Reference);
}
}
--- a/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenuPanelContextualiser.xaml Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenuPanelContextualiser.xaml Tue Jan 05 15:53:48 2010 +0100
@@ -4,9 +4,12 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
+
xmlns:local="clr-namespace:Iri.Modernisation.Controls.View"
x:Class="Iri.Modernisation.Controls.View.ClickMenuPanelContextualiser" Height="56" Width="80">
-
+ <UserControl.Resources>
+
+ </UserControl.Resources>
<Grid x:Name="Panel" Background="#00842B2B" Canvas.ZIndex="4" MouseLeave="Grid_MouseLeave">
<local:ClickMenuItem Orientation="Up" Title="Contextualiser" x:Name="_contextualiserItem" HorizontalAlignment="Left" Margin="1,0,0,0" Width="32" Canvas.ZIndex="10" VerticalAlignment="Top" d:LayoutOverrides="Height" MouseEnter="Grid_MouseEnter"/>
<Grid x:Name="Hidden" HorizontalAlignment="Left" Width="80" Background="#0041024D" Height="56" VerticalAlignment="Top">
@@ -17,7 +20,7 @@
<local:ClickMenuItem Title="Reference" Orientation="Down" x:Name="_referenceItem" HorizontalAlignment="Left" Margin="46,25,0,0" VerticalAlignment="Top" Width="32" RenderTransformOrigin="0.5,0.5" Canvas.ZIndex="5"/>
<local:ClickMenuItem Title="Question" Orientation="Up" x:Name="_questionItem" Margin="0,18,-14,0" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Canvas.ZIndex="5" HorizontalAlignment="Right"/>
- <local:ContextualLinkBinder Margin="0,28,0,0" x:Name="_polemicBinder" PolemicType="Polemic" Canvas.ZIndex="10" VerticalAlignment="Top" HorizontalAlignment="Left" Height="22" Width="30"/>
+ <local:ContextualLinkBinder Margin="0,28,0,0" x:Name="_polemicBinder" Canvas.ZIndex="10" VerticalAlignment="Top" HorizontalAlignment="Left" Height="22" Width="30"/>
</Grid>
</Grid>
</UserControl>
\ No newline at end of file
--- a/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenuPanelContextualiser.xaml.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenuPanelContextualiser.xaml.cs Tue Jan 05 15:53:48 2010 +0100
@@ -20,6 +20,7 @@
// Required to initialize variables
InitializeComponent();
+ _polemicBinder.PolemicType = FactoryVideoLivre.AnnotationDescriptions[0];
//_polemicItem.ClickMenuItemSelected += new EventHandler<ClickMenuItemSelectedEventArgs>(_polemicItem_ClickMenuItemSelected);
_contextualiserItem.ClickMenuItemHooverSelected += new EventHandler<ClickMenuItemHooverEventArgs>(Item_ClickMenuItemHooverSelected);
_referenceItem.ClickMenuItemHooverSelected += new EventHandler<ClickMenuItemHooverEventArgs>(Item_ClickMenuItemHooverSelected);
--- a/client/src/Iri.Modernisation.Controls/View/ConsultationBookView/AnnotationViewer.xaml Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ConsultationBookView/AnnotationViewer.xaml Tue Jan 05 15:53:48 2010 +0100
@@ -22,8 +22,8 @@
<TextBlock x:Name="AnnotationViewerKeyWords" Text="{Binding Tags, Converter={StaticResource ArrayToString}}"/>
</StackPanel>
<ListBox x:Name="CommentList" Margin="0,0,0,-8" VerticalAlignment="Bottom" />
- <Rectangle Fill="{Binding Type,Converter={StaticResource PTCC}}" Stroke="Black" Height="16" HorizontalAlignment="Left" VerticalAlignment="Top" Width="16" RenderTransformOrigin="0,0.5"/>
- <Rectangle Fill="{Binding Type,Converter={StaticResource PTCC}}" Stroke="Black" HorizontalAlignment="Left" Margin="0,16,0,0" Width="8"/>
+ <Rectangle Fill="{Binding Type}" Stroke="Black" Height="16" HorizontalAlignment="Left" VerticalAlignment="Top" Width="16" RenderTransformOrigin="0,0.5"/>
+ <Rectangle Fill="{Binding Type}" Stroke="Black" HorizontalAlignment="Left" Margin="0,16,0,0" Width="8"/>
</Grid>
<!-- <View:VideoViewer x:Name="VideoViewer" d:IsPrototypingComposition="True" Margin="191,4,0,0" HorizontalAlignment="Left" Width="161" VerticalAlignment="Top"/> -->
--- a/client/src/Iri.Modernisation.Controls/View/ConsultationView/ConsultationView.xaml Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ConsultationView/ConsultationView.xaml Tue Jan 05 15:53:48 2010 +0100
@@ -220,8 +220,8 @@
<Grid x:Name="LayoutRoot" Background="Black">
<View:ConsultationBookView DataContext="{Binding ConsultationBookViewContextMenu,Mode=TwoWay}" x:Name="ConsultationBookViewElement" Margin="0,0,8,0" VerticalAlignment="Top" HorizontalAlignment="Right" Foreground="White"/>
- <View:AnnotationMaker DataContext="{Binding ViewModelAnnotationMaker}" x:Name="AnnotationMakerElement" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,276,48"/>
- <ListBox SelectedIndex="{Binding SelectedVideoBookIndex,Mode=TwoWay}" x:Name="listBox" Margin="0,0,279,392" ItemsSource="{Binding SelectedVideoBooks}" Foreground="White" HorizontalAlignment="Right" >
+ <View:AnnotationMaker DataContext="{Binding ViewModelAnnotationMaker}" x:Name="AnnotationMakerElement" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,256,84"/>
+ <ListBox SelectedIndex="{Binding SelectedVideoBookIndex,Mode=TwoWay}" x:Name="listBox" Margin="0,0,256,408" ItemsSource="{Binding SelectedVideoBooks}" Foreground="White" HorizontalAlignment="Right" >
<ListBox.ItemTemplate>
<DataTemplate >
<View:BookTimeLine/>
@@ -229,6 +229,16 @@
</ListBox.ItemTemplate>
</ListBox>
+ <View:PolemicView Margin="8,0,584,48" RenderTransformOrigin="0.5,0.5" Height="320" VerticalAlignment="Bottom">
+ <View:PolemicView.RenderTransform>
+ <TransformGroup>
+ <ScaleTransform ScaleX="-1"/>
+ <SkewTransform/>
+ <RotateTransform/>
+ <TranslateTransform/>
+ </TransformGroup>
+ </View:PolemicView.RenderTransform>
+ </View:PolemicView>
</Grid>
</UserControl>
--- a/client/src/Iri.Modernisation.Controls/View/ContextualBinderLayer/ContextualBinderLayer.xaml.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ContextualBinderLayer/ContextualBinderLayer.xaml.cs Tue Jan 05 15:53:48 2010 +0100
@@ -42,7 +42,7 @@
void myDispatcherTimer_Tick(object sender, EventArgs e)
{
- LayoutRoot.Background = PolemicTypeColorConverter.Convert(_movingBinder.PolemicType);
+ LayoutRoot.Background = new SolidColorBrush(_movingBinder.PolemicType.Color);
LayoutRoot.Background.Opacity = 0.0;
_movingBinder.Visibility = Visibility.Visible;
_linkLine.Visibility = Visibility.Visible;
@@ -108,10 +108,10 @@
Y1 = temp.Y,
X2 = temp.X,
Y2 = temp.Y,
- Stroke = PolemicTypeColorConverter.Convert(_movingBinder.PolemicType),
+ Stroke = new SolidColorBrush(_movingBinder.PolemicType.Color),
StrokeThickness = 2
};
- LayoutRoot.Background = PolemicTypeColorConverter.Convert(_movingBinder.PolemicType);
+ LayoutRoot.Background = new SolidColorBrush(_movingBinder.PolemicType.Color);
LayoutRoot.Background.Opacity = 0.0;
LayoutRoot.Children.Add(_movingBinder);
LayoutRoot.Children.Add(_linkLine);
--- a/client/src/Iri.Modernisation.Controls/View/ContextualLinkBinder.xaml.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ContextualLinkBinder.xaml.cs Tue Jan 05 15:53:48 2010 +0100
@@ -19,21 +19,26 @@
public partial class ContextualLinkBinder : UserControl
{
- public PolemicElementType PolemicType
+ public PolemicTypeDescription PolemicType
{
- get { return (PolemicElementType)GetValue(_polemicType); }
+ get { return (PolemicTypeDescription)GetValue(_polemicType); }
set
{
SetValue(_polemicType, value);
- PolemicTypeColorConverter converter = new PolemicTypeColorConverter();
- path9020.Stroke = PolemicTypeColorConverter.Convert(value);
+ //PolemicTypeColorConverter converter = new PolemicTypeColorConverter();
+ path9020.Stroke = new SolidColorBrush(value.Color);
}
}
public static readonly DependencyProperty _polemicType =
- DependencyProperty.Register("PolemicType", typeof(PolemicElementType), typeof(ContextualLinkBinder), new PropertyMetadata(PolemicElementType.Basic));
+ DependencyProperty.Register("PolemicType", typeof(PolemicTypeDescription), typeof(ContextualLinkBinder), new PropertyMetadata(new PropertyChangedCallback(PolemicTypeChanged)));
+ private static void PolemicTypeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
+ {
+
+ ((ContextualLinkBinder)sender).path9020.Stroke = new SolidColorBrush((((PolemicTypeDescription)e.NewValue)).Color);
+ }
/* public Brush ArrowColor
{
--- a/client/src/Iri.Modernisation.Controls/View/Main/Main.xaml Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/Main/Main.xaml Tue Jan 05 15:53:48 2010 +0100
@@ -17,7 +17,7 @@
<hsl:FXFlip x:Name="FlipTest" Flip="True" AutoFlip="False" Margin="265,0,0,0">
<hsl:FXFlip.Front>
<Grid x:Name="frontgrid" >
- <View:ConsultationView x:Name="ConsultationViewElement" DataContext="{Binding ViewModelConsultationView}" Margin="0,40,0,-56" d:LayoutOverrides="Height" HorizontalAlignment="Right"/>
+ <View:ConsultationView x:Name="ConsultationViewElement" DataContext="{Binding ViewModelConsultationView}" Margin="8,40,0,-56" d:LayoutOverrides="Height"/>
</Grid>
</hsl:FXFlip.Front>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Controls/View/PolemicView/PolemicView.xaml Tue Jan 05 15:53:48 2010 +0100
@@ -0,0 +1,7 @@
+<UserControl x:Class="Iri.Modernisation.Controls.View.PolemicView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+ <Grid x:Name="LayoutRoot" Background="White">
+
+ </Grid>
+</UserControl>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Controls/View/PolemicView/PolemicView.xaml.cs Tue Jan 05 15:53:48 2010 +0100
@@ -0,0 +1,22 @@
+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;
+
+namespace Iri.Modernisation.Controls.View
+{
+ public partial class PolemicView : UserControl
+ {
+ public PolemicView()
+ {
+ InitializeComponent();
+ }
+ }
+}
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml Tue Jan 05 15:53:48 2010 +0100
@@ -14,10 +14,10 @@
<Button x:Name="InsertSequenceButton" Width="58" Content="Ins"/>
<Button x:Name="DeleteSequenceButton" Width="61" Content="Del" Click="DeleteSequenceButton_Click"/>
<Button x:Name="AddSequenceButton" Width="61" Content="{Binding TotalBookDuration}" Click="AddSequenceButton_Click"/>
- <Slider x:Name="ScaleTimeLine" Width="199" Margin="111,0,0,0" Minimum="600" Maximum="10000" Value="600"/>
+ <Slider x:Name="ScaleTimeLine" Width="199" Margin="111,0,0,0" Minimum="{Binding ActualWidth, ElementName=TimeLineScroller, Mode=OneWay}" Maximum="10000" Value="600"/>
</StackPanel>
<ScrollViewer x:Name="TimeLineScroller" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Visible" Height="154" >
- <Grid Width="{Binding Value, ElementName=ScaleTimeLine, Mode=OneWay}" HorizontalAlignment="Left">
+ <Grid HorizontalAlignment="Left" Width="{Binding Value, ElementName=ScaleTimeLine, Mode=OneWay}">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
--- a/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ProductionTimeLine/ProductionTimeLine.xaml.cs Tue Jan 05 15:53:48 2010 +0100
@@ -20,12 +20,14 @@
public static double ScaleTime
{
get
- {
- return 0.0002;
- }
+ ;
+
+
+ set;
}
public ProductionTimeLine()
{
+ ScaleTime = 0.0002;
// Required to initialize variables
InitializeComponent();
Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartSelected_Executed);
@@ -34,8 +36,17 @@
TimeSlider.MouseLeftButtonUp += new MouseButtonEventHandler(TimeSlider_MouseLeftButtonUp);
//TimeSlider.ValueChanged += new RoutedPropertyChangedEventHandler<double>(TimeSlider_ValueChanged);
TimeSlider.Maximum = TimeSlider.ActualWidth / ProductionTimeLine.ScaleTime;
+
+ ScaleTimeLine.ValueChanged += new RoutedPropertyChangedEventHandler<double>(ScaleTimeLine_ValueChanged);
}
+ void ScaleTimeLine_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
+ {
+ ScaleTime = e.NewValue / 3200000;
+ UpdateElements();
+
+ }
+
void TimeSlider_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
Commands.TimeChange.Execute(TimeSlider.Value,DataContext);
@@ -89,12 +100,12 @@
};
_temp.MouseLeftButtonDown += new MouseButtonEventHandler(CustomableVideoElement_MouseLeftButtonDown);
- if ((VideoChapterType)intChapter == ((ProductionTimeLineVM)this.DataContext).SelectedBookChapter.Type)
- {
+ //if ((VideoChapterType)intChapter == ((ProductionTimeLineVM)this.DataContext).SelectedBookChapter.Type)
+ //{
_temp.MouseMove += new MouseEventHandler(CustomableVideoElement_MouseMove);
_temp.MouseLeftButtonUp += new MouseButtonEventHandler(CustomableVideoElement_MouseLeftButtonUp);
- }
+ //}
VideoTimeStrip.Children.Add(_temp);// TODO: Add event handler implementation here.
_sumOfLengh += _temp.Width;
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/AnnotationMaker/AnnotationMakerVM.cs Tue Jan 05 15:53:48 2010 +0100
@@ -41,7 +41,7 @@
_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 = PolemicElementType.Basic };
+ BasicRelation = new PolemicLink() { FromElement = ((PolemicElement)value), ToElement = _newAnnotation, Type = null};
PolemicRelation = new PolemicLink();
PolemicRelation.FromElement = _newAnnotation;
@@ -117,31 +117,11 @@
}
}
-
- private PolemicElementType _type;
- /// <summary>
- /// Type de l'annotation
- /// </summary>
- public PolemicElementType Type
- {
- get
- {
- return _type;
- }
- set
- {
- _type = value;
- _newAnnotation.Type = value;
- OnPropertyChanged("Type");
- }
- }
-
-
- private Rectangle _selectedType;
+ private PolemicTypeDescription _selectedType;
/// <summary>
/// Convertion Rectange
/// </summary>
- public Rectangle SelectedType
+ public PolemicTypeDescription SelectedType
{
get
{
@@ -150,8 +130,8 @@
set
{
_selectedType = value;
-
- Type = (PolemicElementType)((Rectangle)_selectedType).Resources["PolemicType"];
+ OnPropertyChanged("SelectedType");
+ // Type = (PolemicElementType)((Rectangle)_selectedType).Resources["PolemicType"];
}
}
@@ -324,7 +304,7 @@
private void OkClickAnnotationMaker_Executed(object sender, ExecutedEventArgs e)
{
- String message = "Ok clicked "+Type+" \n";
+ String message = "Ok clicked "+SelectedType.Title+" \n";
message += _begin + "-->" + _end;
message += "\n" + Title;
message += "\n" + Description;
@@ -334,7 +314,7 @@
message += "\n|-" + tag;
}
- message += "PolemicLink "+PolemicRelation.Type;
+ message += "PolemicLink "+PolemicRelation.Type.Title;
MessageBox.Show(message);
}
@@ -363,13 +343,23 @@
_newAnnotation = new Annotation(RefElement.Chapter);
_begin = RefElement.TimerIn;
_end = RefElement.TimerOut;
- _basicRelation = new PolemicLink() { FromElement = RefElement, ToElement = _newAnnotation, Type = PolemicElementType.Basic };
+ _basicRelation = new PolemicLink() { FromElement = RefElement, ToElement = _newAnnotation, Type = null};
_polemicRelation = new PolemicLink();
PolemicRelation.FromElement = _newAnnotation;
InitializeCommands();
}
+ public PolemicTypeDescription[] ListAnnotationDescription
+ {
+ get
+ {
+ return FactoryVideoLivre.AnnotationDescriptions;
+ }
+
+ }
+
+
}
}
--- a/client/src/Iri.Modernisation.Controls/ViewModel/PolemicElementVM.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/PolemicElementVM.cs Tue Jan 05 15:53:48 2010 +0100
@@ -188,12 +188,23 @@
/// <summary>
/// PolemicType de l'élément
/// </summary>
+ private Color _type;
public SolidColorBrush Type
{
get
{
- return new SolidColorBrush(Chapter.Color);
+ if (_element is SegmentIndex)
+ {
+ return new SolidColorBrush(Chapter.Color);
+ }
+ else
+ {
+ return new SolidColorBrush(_type);
+ }
+
}
+
+
}
private PolemicElement _element { get; set; }
@@ -213,6 +224,10 @@
Chapter = _element.Chapter;
DisplayTimer.Interval = new TimeSpan(0, 0, 0, 0, 500);
DisplayTimer.Tick += new EventHandler(myDispatcherTimer_Tick);
+ if (_element is Annotation)
+ {
+ _type = ((Annotation)_element).Type.Color;
+ }
}
/// <summary>
--- a/client/src/Iri.Modernisation.Data/Iri.Modernisation.Data.csproj Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Iri.Modernisation.Data.csproj Tue Jan 05 15:53:48 2010 +0100
@@ -60,6 +60,7 @@
<Compile Include="Ldt\LDTProject.cs" />
<Compile Include="Ldt\Readers.cs" />
<Compile Include="Models\Annotation.cs" />
+ <Compile Include="Models\PolemicTypeDescription.cs" />
<Compile Include="Models\AnnotationSession.cs" />
<Compile Include="Models\FactoryVideoLivre.cs" />
<Compile Include="Models\PolemicElement.cs" />
--- a/client/src/Iri.Modernisation.Data/Ldt/Readers.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Ldt/Readers.cs Tue Jan 05 15:53:48 2010 +0100
@@ -92,7 +92,7 @@
Tags = LDTE.Tags,
TimerIn = new TimeSpan(0, 0, 0, 0, (int)LDTE.Begin),
Duration = new TimeSpan(0, 0, 0, 0, (int)(LDTE.Dur+5000)),
- Type = PolemicElementType.Polemic
+ Type = FactoryVideoLivre.AnnotationDescriptions[0]
});
// _videoBook.Duration = _videoBook.Duration.Add(new TimeSpan(0, 0, 0, 0, (int)(LDTE.Dur)));
}
@@ -105,7 +105,7 @@
Tags = LDTE.Tags,
TimerIn = new TimeSpan(0, 0, 0, 0, (int)LDTE.Begin),
Duration = new TimeSpan(0, 0, 0, 0, (int)LDTE.Dur),
- Type = PolemicElementType.Reference
+ Type = FactoryVideoLivre.AnnotationDescriptions[1]
});
// _videoBook.Duration = _videoBook.Duration.Add(new TimeSpan(0, 0, 0, 0, (int)LDTE.Dur));
}
--- a/client/src/Iri.Modernisation.Data/Models/Annotation.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/Annotation.cs Tue Jan 05 15:53:48 2010 +0100
@@ -20,7 +20,12 @@
/// <summary>
/// Type de l'annotation
/// </summary>
- public PolemicElementType Type { get; set; }
+ public PolemicTypeDescription Type { get; set; }
+
+ /// <summary>
+ /// Type de l'annotation
+ /// </summary>
+ // public PolemicElementType Type { get; set; }
/// <summary>
/// Auteur de l'annotation
--- a/client/src/Iri.Modernisation.Data/Models/FactoryVideoLivre.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/FactoryVideoLivre.cs Tue Jan 05 15:53:48 2010 +0100
@@ -17,6 +17,8 @@
public static WebClient xmlClient = new WebClient();
private static XDocument _configDoc;
public static VideoChapterDescription[] VideoChapterDescriptions {get;private set;}
+ public static PolemicTypeDescription[] AnnotationDescriptions { get; private set; }
+
public static int NumberOfChapters
{
get
@@ -70,14 +72,21 @@
static public void Load(string path)
{
_configDoc = XDocument.Load(path);
- List<VideoChapterDescription> temp = new List<VideoChapterDescription>();
+ List<VideoChapterDescription> temp_vl = new List<VideoChapterDescription>();
+
+ List<PolemicTypeDescription> temp_an = new List<PolemicTypeDescription>();
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));
+ temp_vl .Add(new VideoChapterDescription(nb,XChapter.Attribute("name").Value, XChapter.Attribute("color").Value));
nb++;
}
- VideoChapterDescriptions = temp.ToArray();
+ foreach (XElement XAnnotation in _configDoc.Root.Element("PolemicTypes").Elements())
+ {
+ temp_an.Add(new PolemicTypeDescription(XAnnotation.Attribute("name").Value, XAnnotation.Attribute("color").Value));
+ }
+ VideoChapterDescriptions = temp_vl .ToArray();
+ AnnotationDescriptions = temp_an.ToArray();
}
--- a/client/src/Iri.Modernisation.Data/Models/PolemicLink.cs Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/PolemicLink.cs Tue Jan 05 15:53:48 2010 +0100
@@ -30,6 +30,6 @@
/// <summary>
/// Type du lien
/// </summary>
- public PolemicElementType Type { get; set; }
+ public PolemicTypeDescription Type { get; set; }
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/Iri.Modernisation.Data/Models/PolemicTypeDescription.cs Tue Jan 05 15:53:48 2010 +0100
@@ -0,0 +1,31 @@
+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.Globalization;
+namespace Iri.Modernisation.Data.Models
+{
+ public class PolemicTypeDescription
+ {
+ public String Title { get; set; }
+ public Color Color {get;set;}
+
+ public PolemicTypeDescription(String title, String color)
+ {
+
+ Title = title;
+ Color = Color.FromArgb(
+ byte.Parse(color.Substring(1,2),NumberStyles.AllowHexSpecifier),
+ byte.Parse(color.Substring(3, 2), NumberStyles.AllowHexSpecifier),
+ byte.Parse(color.Substring(5, 2), NumberStyles.AllowHexSpecifier),
+ byte.Parse(color.Substring(7, 2), NumberStyles.AllowHexSpecifier));
+
+ }
+ }
+}
--- a/client/src/Iri.Modernisation/ProjectConfig.xml Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation/ProjectConfig.xml Tue Jan 05 15:53:48 2010 +0100
@@ -6,7 +6,11 @@
<VideoChapter name="Post-Modernité" color="#FFB5CB29"/>
<VideoChapter name="Ouverture" color="#FF5BCC5B"/>
</VideoBook>
- <Annotations>
-
- </Annotations>
+ <PolemicTypes>
+ <PolemicType name="Polémique" color="#FFFF0000"/>
+ <PolemicType name="Adhésion" color="#FF00FF00"/>
+ <PolemicType name="Référence" color="#FF0000FF"/>
+ <PolemicType name="Question" color="#FFFFFF00"/>
+
+ </PolemicTypes>
</ProjectConfig>
--- a/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/ProjectConfig.xml Mon Jan 04 10:29:39 2010 +0100
+++ b/client/test/mainInterface/Iri.Modernisation.Test.MainInterface/ProjectConfig.xml Tue Jan 05 15:53:48 2010 +0100
@@ -6,7 +6,11 @@
<VideoChapter name="Post-Modernité" color="#FFB5CB29"/>
<VideoChapter name="Ouverture" color="#FF5BCC5B"/>
</VideoBook>
- <Annotations>
-
- </Annotations>
+ <PolemicTypes>
+ <PolemicType name="Polémique" color="#FFFF0000"/>
+ <PolemicType name="Adhésion" color="#FF00FF00"/>
+ <PolemicType name="Référence" color="#FF0000FF"/>
+ <PolemicType name="Question" color="#FFFFFF00"/>
+
+ </PolemicTypes>
</ProjectConfig>