Changeset 11904 for extensions/PiwigoLib
- Timestamp:
- Aug 4, 2011, 12:45:47 AM (13 years ago)
- Location:
- extensions/PiwigoLib
- Files:
-
- 13 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PiwigoLib/Piwigo.sln
r11850 r11904 1 1 2 2 Microsoft Visual Studio Solution File, Format Version 11.00 3 # Visual Studio20103 # Visual C# Express 2010 4 4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PiwigoLib", "PiwigoLib\PiwigoLib.csproj", "{64C068C5-DBFE-4712-9081-B9100698F35C}" 5 5 EndProject … … 40 40 {59F7FCF2-858A-406D-92A6-50514BD89B43}.Debug|Any CPU.ActiveCfg = Debug|x86 41 41 {59F7FCF2-858A-406D-92A6-50514BD89B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 42 {59F7FCF2-858A-406D-92A6-50514BD89B43}.Debug|Mixed Platforms.Build.0 = Debug|x86 42 43 {59F7FCF2-858A-406D-92A6-50514BD89B43}.Debug|x86.ActiveCfg = Debug|x86 43 44 {59F7FCF2-858A-406D-92A6-50514BD89B43}.Debug|x86.Build.0 = Debug|x86 -
extensions/PiwigoLib/PiwigoWpf/App.xaml
r7150 r11904 6 6 Exit="onAppExit"> 7 7 <Application.Resources> 8 <ObjectDataProvider x:Name="ImagesODP" x:Key="Images" ObjectType="{x:Type piwigo:PwgImageListWPF}" />8 <ObjectDataProvider x:Name="ImagesODP" x:Key="Images" IsAsynchronous="True" ObjectType="{x:Type piwigo:PwgImageListWPF}" /> 9 9 <ObjectDataProvider x:Name="SessionODP" x:Key="Session" ObjectType="{x:Type piwigo:PwgSessionWPF}" /> 10 <ObjectDataProvider x:Name="CategoriesODP" x:Key="Categories" ObjectType="{x:Type piwigo:PwgCategoryListWPF}" /> 10 <ObjectDataProvider x:Name="CategoriesODP" x:Key="Categories" IsAsynchronous="True" ObjectType="{x:Type piwigo:PwgCategoryListWPF}" /> 11 12 <ResourceDictionary x:Key="VisualStyleApp" Source="VisualStyleApp.xaml"/> 11 13 </Application.Resources> 12 14 </Application> -
extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdBase.cs
r11850 r11904 12 12 #region ICommand Membres 13 13 14 public abstract BooleanCanExecute(object parameter);14 public abstract bool CanExecute(object parameter); 15 15 16 16 public abstract void Execute(object parameter); -
extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdConnect.cs
r11850 r11904 6 6 using Com.Piwigo.Wpf.DTO.Helper; 7 7 using Com.Piwigo.Wpf.Helper; 8 using Com.Piwigo.Wpf.Service; 8 9 9 10 namespace Com.Piwigo.Wpf.Command … … 11 12 public sealed class PwgCmdConnect : PwgCmdBase 12 13 { 13 public override BooleanCanExecute(object parameter)14 public override bool CanExecute(object parameter) 14 15 { 15 16 Boolean retVal = false; … … 46 47 47 48 PwgCategoryListWPFHelper.ConvertPwgCategoryListToPwgCategoryListWPF(lstCat, ref lstCatWPF); 49 50 ImageCacheManager.Instance.SetCurrentServer(uriServer.AbsoluteUri); 48 51 } 49 52 catch (PwgServiceException ex) -
extensions/PiwigoLib/PiwigoWpf/Helper/AppHelper.cs
r11850 r11904 6 6 using System.Windows; 7 7 using System.Diagnostics.CodeAnalysis; 8 using System.Windows.Input; 9 using Com.Piwigo.Wpf.Command; 8 10 9 11 namespace Com.Piwigo.Wpf.Helper … … 11 13 public class AppHelper 12 14 { 13 private static Boolean? _isInDesignMode;15 private static bool? _isInDesignMode; 14 16 15 17 /// <summary> … … 17 19 /// or Visual Studio). 18 20 /// </summary> 19 public static BooleanIsInDesignModeStatic21 public static bool IsInDesignModeStatic 20 22 { 21 23 get … … 25 27 var prop = DesignerProperties.IsInDesignModeProperty; 26 28 _isInDesignMode 27 = ( Boolean)DependencyPropertyDescriptor29 = (bool)DependencyPropertyDescriptor 28 30 .FromProperty(prop, typeof(FrameworkElement)) 29 31 .Metadata.DefaultValue; … … 42 44 "CA1822:MarkMembersAsStatic", 43 45 Justification = "Non static member needed for data binding")] 44 public BooleanIsInDesignMode46 public bool IsInDesignMode 45 47 { 46 48 get … … 50 52 } 51 53 54 static public void ExecuteCommand<T>(object parameter) where T: PwgCmdBase, new() 55 { 56 T cmd = new T(); 57 if (cmd.CanExecute(parameter)) 58 { 59 cmd.Execute(parameter); 60 } 61 } 52 62 } 53 63 64 54 65 } -
extensions/PiwigoLib/PiwigoWpf/MainWindow.xaml
r7160 r11904 5 5 xmlns:pwgdto="clr-namespace:Com.Piwigo.Wpf.DTO" 6 6 xmlns:pwgcmd="clr-namespace:Com.Piwigo.Wpf.Command" 7 xmlns:pwgsrv="clr-namespace:Com.Piwigo.Wpf.Service" 7 8 Title="PiwigoWpf" 8 9 WindowState="Maximized" 9 10 MinHeight="600" MinWidth="800"> 10 11 <Window.Resources> 11 <LinearGradientBrush x:Key="WindowGradient" StartPoint="0,0.3" EndPoint="1,0"> 12 <LinearGradientBrush.GradientStops> 13 <GradientStop Color="#B2B6CAFF" Offset="0" /> 14 <GradientStop Color="#BFC3D5FF" Offset="0.1" /> 15 <GradientStop Color="#E0E4F0FF" Offset="0.3" /> 16 <GradientStop Color="#E6EAF5FF" Offset="0.5" /> 17 <GradientStop Color="#CFD7E2FF" Offset="0.6" /> 18 <GradientStop Color="#BFC5D3FF" Offset="0.8" /> 19 <GradientStop Color="#C4CBD8FF" Offset="1" /> 20 </LinearGradientBrush.GradientStops> 21 </LinearGradientBrush> 22 23 <LinearGradientBrush x:Key="ListBoxGradient" StartPoint="0,0" EndPoint="0,1"> 24 <LinearGradientBrush.GradientStops> 25 <GradientStop Color="#90000000" Offset="0" /> 26 <GradientStop Color="#40000000" Offset="0.005" /> 27 <GradientStop Color="#10000000" Offset="0.04" /> 28 <GradientStop Color="#20000000" Offset="0.945" /> 29 <GradientStop Color="#60FFFFFF" Offset="1" /> 30 </LinearGradientBrush.GradientStops> 31 </LinearGradientBrush> 32 33 <LinearGradientBrush x:Key="ShoppingCartGradient" StartPoint="0,0" EndPoint="0,1"> 34 <LinearGradientBrush.GradientStops> 35 <GradientStop Color="#90000000" Offset="0" /> 36 <GradientStop Color="#40000000" Offset="0.002" /> 37 <GradientStop Color="#10000000" Offset="0.02" /> 38 <GradientStop Color="#20000000" Offset="0.98" /> 39 <GradientStop Color="#60FFFFFF" Offset="1" /> 40 </LinearGradientBrush.GradientStops> 41 </LinearGradientBrush> 42 43 <LinearGradientBrush x:Key="ReflectionGradient" StartPoint="0,1" EndPoint="0,0"> 44 <LinearGradientBrush.GradientStops> 45 <GradientStop Color="#50000000" Offset="0" /> 46 <GradientStop Color="Transparent" Offset=".5" /> 47 </LinearGradientBrush.GradientStops> 48 </LinearGradientBrush> 49 50 <LinearGradientBrush x:Key="ButtonGradient" StartPoint="0,0" EndPoint="0,1"> 51 <LinearGradientBrush.GradientStops> 52 <GradientStop Color="#FDB6CADF" Offset="0" /> 53 <GradientStop Color="#FCC3C5FF" Offset="0.1" /> 54 <GradientStop Color="#FCC4D0EF" Offset="0.3" /> 55 <GradientStop Color="#FDB7C2DF" Offset="0.6" /> 56 <GradientStop Color="#FE95B3CF" Offset="0.8" /> 57 <GradientStop Color="#FE96AACF" Offset="1" /> 58 </LinearGradientBrush.GradientStops> 59 </LinearGradientBrush> 60 61 <LinearGradientBrush x:Key="VerticalScrollGradient" StartPoint="0,0" EndPoint="1,0"> 62 <LinearGradientBrush.GradientStops> 63 <GradientStop Color="#FDB6CADF" Offset="0" /> 64 <GradientStop Color="#FCC3C5FF" Offset="0.1" /> 65 <GradientStop Color="#FCC4D0EF" Offset="0.3" /> 66 <GradientStop Color="#FDB7C2DF" Offset="0.6" /> 67 <GradientStop Color="#FE95B3CF" Offset="0.8" /> 68 <GradientStop Color="#FE96AACF" Offset="1" /> 69 </LinearGradientBrush.GradientStops> 70 </LinearGradientBrush> 71 72 <LinearGradientBrush x:Key="ComboBoxGradient" StartPoint="0,0" EndPoint="0,1"> 73 <LinearGradientBrush.GradientStops> 74 <GradientStop Color="#B2B6CAFF" Offset="0" /> 75 <GradientStop Color="#B0B3C5FF" Offset="0.1" /> 76 <GradientStop Color="#BEE4E0FF" Offset="0.3" /> 77 <GradientStop Color="#B0D7E2FF" Offset="0.6" /> 78 <GradientStop Color="#B0C5D3FF" Offset="0.8" /> 79 <GradientStop Color="#C4CBD8FF" Offset="1" /> 80 </LinearGradientBrush.GradientStops> 81 </LinearGradientBrush> 82 83 <LinearGradientBrush x:Key="GreetingCardGradient" StartPoint="0,0" EndPoint="0,1"> 84 <LinearGradientBrush.GradientStops> 85 <GradientStop Color="#EEEEEE" Offset="0" /> 86 <GradientStop Color="#FFFFFF" Offset="1" /> 87 </LinearGradientBrush.GradientStops> 88 </LinearGradientBrush> 89 90 <LinearGradientBrush x:Key="ButtonUpGradient" StartPoint="0,0" EndPoint="0,1"> 91 <LinearGradientBrush.GradientStops> 92 <GradientStop Color="Transparent" Offset="0" /> 93 <GradientStop Color="#33000000" Offset="1" /> 94 </LinearGradientBrush.GradientStops> 95 </LinearGradientBrush> 96 97 <LinearGradientBrush x:Key="ButtonDownGradient" StartPoint="0,0" EndPoint="0,1"> 98 <LinearGradientBrush.GradientStops> 99 <GradientStop Color="#10000000" Offset="0" /> 100 <GradientStop Color="#20000000" Offset="1" /> 101 </LinearGradientBrush.GradientStops> 102 </LinearGradientBrush> 103 104 <LinearGradientBrush x:Key="ButtonDisabledGradient" StartPoint="0,0" EndPoint="0,1"> 105 <LinearGradientBrush.GradientStops> 106 <GradientStop Color="#10302A90" Offset="0" /> 107 <GradientStop Color="#10201040" Offset="1" /> 108 </LinearGradientBrush.GradientStops> 109 </LinearGradientBrush> 110 111 <!-- STYLES --> 112 113 <Style TargetType="{x:Type pwg:MainWindow}"> 114 <Setter Property="Background" Value="{DynamicResource WindowGradient}" /> 115 </Style> 116 117 <Style x:Key="TitleText" TargetType="{x:Type TextBlock}" > 118 <Setter Property="FontFamily" Value="Segoe Black" /> 119 <Setter Property="FontSize" Value="20px" /> 120 <Setter Property="Foreground" Value="MidnightBlue" /> 121 </Style> 122 123 <!-- DATA TEMPLATES --> 12 <ObjectDataProvider x:Key="listCat" IsAsynchronous="True" /> 13 <ObjectDataProvider x:Key="listImg" IsAsynchronous="True" /> 14 15 <!-- DATA TEMPLATES --> 124 16 125 17 <DataTemplate DataType="{x:Type pwgdto:PwgImageWPF}"> 126 18 <Border VerticalAlignment="Center" HorizontalAlignment="Center" Padding="4" Margin="2" Background="Blue" 127 DataContext="{Binding}"> 128 <Image Source="{Binding UrlElement}" ToolTip="{Binding File}" /> 19 DataContext="{Binding}"><!--Source="{Binding UrlElement}"--> 20 <Image ToolTip="{Binding File}" > 21 <Image.Source> 22 <PriorityBinding FallbackValue="pack://application:,,,/Pictures/Globe.png"> 23 <Binding IsAsync="True" Converter="{x:Static pwgsrv:ImageCacheManager.ImageUrlCachedConverter}"/> 24 25 </PriorityBinding> 26 </Image.Source> 27 </Image> 129 28 </Border> 130 29 </DataTemplate> 131 30 132 <DataTemplate DataType="{x:Type pwgdto:PwgCategoryWPF}"> 133 <Border VerticalAlignment="Center" HorizontalAlignment="Center" Padding="4" Margin="2" Background="Blue" 134 DataContext="{Binding}"> 135 <TextBox ToolTip="{Binding Name}" /> 31 <DataTemplate DataType="{x:Type pwgdto:PwgCategoryWPF}" > 32 <Border VerticalAlignment="Center" HorizontalAlignment="Center" 33 Padding="4" Margin="1" 34 Background="LightBlue" 35 DataContext="{Binding}"> 36 <StackPanel Orientation="Vertical" DataContext="{Binding}" VerticalAlignment="Center" > 37 <Image Source="pack://application:,,,/Pictures/folder_images.png" 38 Stretch="Uniform" 39 MaxHeight="128" 40 MaxWidth="128"> 41 <Image.ToolTip> 42 <StackPanel Orientation="Vertical"> 43 <StackPanel Orientation="Horizontal"> 44 <TextBlock Text="{Binding Path=ImagesCount}"/> 45 <TextBlock Text=" images inside"/> 46 </StackPanel> 47 <StackPanel Orientation="Horizontal"> 48 <TextBlock Text="{Binding Path=SubCategoriesCount}"/> 49 <TextBlock Text=" categories inside"/> 50 </StackPanel> 51 </StackPanel> 52 </Image.ToolTip> 53 </Image> 54 <TextBlock Text="{Binding Name}" /> 55 </StackPanel> 136 56 </Border> 137 57 </DataTemplate> 138 58 59 <Style x:Key="CategoryListStyle" TargetType="{x:Type ListBox}"> 60 <Setter Property="Template"> 61 <Setter.Value> 62 <ControlTemplate TargetType="{x:Type ListBox}" > 63 <Border 64 BorderBrush="Gray" 65 BorderThickness="1" 66 CornerRadius="6" 67 Background="LightBlue" 68 > 69 <!--Background="{DynamicResource ListBoxGradient}"--> 70 <ScrollViewer 71 VerticalScrollBarVisibility="Auto" 72 HorizontalScrollBarVisibility="Disabled"> 73 <StackPanel 74 IsItemsHost="True" 75 Orientation="Vertical" 76 HorizontalAlignment="Center" 77 VerticalAlignment="Top"/> 78 </ScrollViewer> 79 </Border> 80 </ControlTemplate> 81 </Setter.Value> 82 </Setter> 83 </Style> 84 85 <Style x:Key="CategoryListItem" TargetType="{x:Type ListBoxItem}"> 86 <Setter Property="MaxHeight" Value="128" /> 87 <Setter Property="MinHeight" Value="128" /> 88 <Setter Property="Opacity" Value=".75" /> 89 <Style.Triggers> 90 <EventTrigger RoutedEvent="Mouse.MouseEnter"> 91 <EventTrigger.Actions> 92 <BeginStoryboard> 93 <Storyboard> 94 <DoubleAnimation 95 Duration="0:0:0.2" 96 Storyboard.TargetProperty="MaxHeight" 97 To="220" /> 98 <DoubleAnimation 99 Duration="0:0:0.2" 100 Storyboard.TargetProperty="Opacity" 101 To="1.0" /> 102 </Storyboard> 103 </BeginStoryboard> 104 </EventTrigger.Actions> 105 </EventTrigger> 106 107 <EventTrigger RoutedEvent="Mouse.MouseLeave"> 108 <EventTrigger.Actions> 109 <BeginStoryboard> 110 <Storyboard> 111 <DoubleAnimation 112 Duration="0:0:1" 113 Storyboard.TargetProperty="MaxHeight" /> 114 <DoubleAnimation 115 Duration="0:0:0.2" 116 Storyboard.TargetProperty="Opacity" /> 117 </Storyboard> 118 </BeginStoryboard> 119 </EventTrigger.Actions> 120 </EventTrigger> 121 </Style.Triggers> 122 </Style> 139 123 <!-- PHOTOLIST TEMPLATE --> 140 124 141 125 <Style x:Key="PhotoListStyle" TargetType="{x:Type ListBox}"> 142 126 <Setter Property="Template"> … … 147 131 BorderThickness="1" 148 132 CornerRadius="6" 149 Background="{DynamicResource ListBoxGradient}" > 133 Background="LightBlue" 134 > 135 <!--Background="{DynamicResource ListBoxGradient}"--> 150 136 <ScrollViewer 151 137 VerticalScrollBarVisibility="Disabled" … … 203 189 </Style> 204 190 205 <!-- BUTTON TEMPLATE --> 206 207 <Style TargetType="{x:Type Button}"> 208 <Setter Property="Template"> 209 <Setter.Value> 210 <ControlTemplate TargetType="{x:Type Button}"> 211 <Border x:Name="OuterBorder" 212 CornerRadius="3" 213 Background="{DynamicResource ButtonGradient}"> 214 <Border 215 x:Name="InnerBorder" 216 CornerRadius="3" 217 Background="{DynamicResource ButtonUpGradient}" 218 Padding="{TemplateBinding Padding}"> 219 <ContentPresenter x:Name="ContentSite" 220 HorizontalAlignment="Center" 221 VerticalAlignment="Center" /> 222 </Border> 223 </Border> 224 <ControlTemplate.Triggers> 225 <Trigger Property="IsPressed" Value="true"> 226 <Setter TargetName="InnerBorder" Property="Background" Value="{DynamicResource ButtonDownGradient}" /> 227 </Trigger> 228 <Trigger Property="IsEnabled" Value="false"> 229 <Setter TargetName="InnerBorder" Property="Background" Value="{DynamicResource ButtonDisabledGradient}" /> 230 <Setter Property="BorderBrush" Value="Silver" /> 231 <Setter Property="Foreground" Value="SlateGray" /> 232 </Trigger> 233 </ControlTemplate.Triggers> 234 </ControlTemplate> 235 </Setter.Value> 236 </Setter> 237 <Setter Property="Height" Value="18" /> 238 <Setter Property="Foreground" Value="MidnightBlue" /> 239 </Style> 240 241 <!-- COMBOBOX STYLE --> 242 243 <Style TargetType="{x:Type ComboBox}" > 244 <Setter Property="Background" Value="{DynamicResource ComboBoxGradient}" /> 245 <Setter Property="BorderThickness" Value="0" /> 246 <Setter Property="Height" Value="18px" /> 247 <Setter Property="Foreground" Value="MidnightBlue" /> 248 </Style> 249 250 <!-- PROGRESS BAR STYLE --> 251 252 <Style TargetType="{x:Type ProgressBar}" > 253 <Setter Property="Background" Value="{DynamicResource ComboBoxGradient}" /> 254 <Setter Property="BorderThickness" Value="1" /> 255 <Setter Property="BorderBrush" Value="Gray" /> 256 <Setter Property="Foreground" Value="MidnightBlue" /> 257 </Style> 258 259 <!-- SCROLLBAR TEMPLATES --> 260 261 <Style x:Key="Scrollbar_LineButton" TargetType="{x:Type RepeatButton}"> 262 <Setter Property="Template"> 263 <Setter.Value> 264 <ControlTemplate TargetType="{x:Type RepeatButton}"> 265 <Border 266 BorderBrush="Transparent" 267 BorderThickness="1" 268 CornerRadius="6" 269 Background="{DynamicResource ButtonGradient}"> 270 <ContentPresenter x:Name="ContentSite" /> 271 </Border> 272 </ControlTemplate> 273 </Setter.Value> 274 </Setter> 275 <Setter Property="MinHeight" Value="12" /> 276 <Setter Property="MinWidth" Value="12" /> 277 <Setter Property="Foreground" Value="Gray" /> 278 <Setter Property="FontSize" Value="6pt" /> 279 <Setter Property="FontWeight" Value="Bold" /> 280 <Setter Property="FontFamily" Value="Lucida Sans" /> 281 <Setter Property="VerticalAlignment" Value="Center" /> 282 <Setter Property="HorizontalAlignment" Value="Center" /> 283 </Style> 284 285 <Style x:Key="ScrollBar_TrackRepeater" TargetType="{x:Type RepeatButton}"> 286 <Setter Property="IsTabStop" Value="false" /> 287 <Setter Property="Focusable" Value="false" /> 288 <Setter Property="Command" Value="ScrollBar.PageUpCommand" /> 289 <Setter Property="Template"> 290 <Setter.Value> 291 <ControlTemplate TargetType="{x:Type RepeatButton}"> 292 <Rectangle Fill="Transparent" /> 293 </ControlTemplate> 294 </Setter.Value> 295 </Setter> 296 </Style> 297 298 <Style x:Key="ScrollBar_UpTrack" BasedOn="{StaticResource ScrollBar_TrackRepeater}" TargetType="{x:Type RepeatButton}"> 299 <Setter Property="Command" Value="ScrollBar.PageUpCommand" /> 300 </Style> 301 302 <Style x:Key="ScrollBar_DownTrack" BasedOn="{StaticResource ScrollBar_TrackRepeater}" TargetType="{x:Type RepeatButton}"> 303 <Setter Property="Command" Value="ScrollBar.PageDownCommand" /> 304 </Style> 305 306 <Style x:Key="ScrollBar_LeftTrack" BasedOn="{StaticResource ScrollBar_TrackRepeater}" TargetType="{x:Type RepeatButton}"> 307 <Setter Property="Command" Value="ScrollBar.PageLeftCommand" /> 308 </Style> 309 310 <Style x:Key="ScrollBar_RightTrack" BasedOn="{StaticResource ScrollBar_TrackRepeater}" TargetType="{x:Type RepeatButton}"> 311 <Setter Property="Command" Value="ScrollBar.PageRightCommand" /> 312 </Style> 313 314 <Style x:Key="ScrollBar_VerticalThumb" TargetType="{x:Type Thumb}"> 315 <Setter Property="Template"> 316 <Setter.Value> 317 <ControlTemplate TargetType="{x:Type Thumb}"> 318 <Border CornerRadius="6" 319 BorderBrush="Transparent" 320 BorderThickness="1" 321 Background="{DynamicResource VerticalScrollGradient}" /> 322 </ControlTemplate> 323 </Setter.Value> 324 </Setter> 325 <Setter Property="MinHeight" Value="10" /> 326 <Setter Property="MinWidth" Value="10" /> 327 </Style> 328 329 <Style x:Key="ScrollBar_HorizontalThumb" TargetType="{x:Type Thumb}"> 330 <Setter Property="Template"> 331 <Setter.Value> 332 <ControlTemplate TargetType="{x:Type Thumb}"> 333 <Border CornerRadius="6" 334 BorderBrush="Transparent" 335 BorderThickness="1" 336 Background="{DynamicResource ButtonGradient}" /> 337 </ControlTemplate> 338 </Setter.Value> 339 </Setter> 340 <Setter Property="MinHeight" Value="10" /> 341 <Setter Property="MinWidth" Value="10" /> 342 </Style> 343 344 <Style TargetType="{x:Type ScrollBar}"> 345 <Setter Property="Background" Value="Transparent" /> 346 <Setter Property="MinWidth" Value="10" /> 347 <Setter Property="Template"> 348 <Setter.Value> 349 <ControlTemplate TargetType="{x:Type ScrollBar}"> 350 <Grid> 351 <Grid.ColumnDefinitions> 352 <ColumnDefinition Width="10"/> 353 </Grid.ColumnDefinitions> 354 <Grid.RowDefinitions> 355 <RowDefinition Height="10" /> 356 <RowDefinition Height="*"/> 357 <RowDefinition Height="10" /> 358 </Grid.RowDefinitions> 359 <Border Grid.Row="1" BorderThickness="0" Background="Transparent" CornerRadius="4"/> 360 <RepeatButton Grid.Row="0" Style="{DynamicResource Scrollbar_LineButton}" Command="ScrollBar.LineUpCommand" Content=" ^" /> 361 <Track Grid.Row="1" Name="PART_Track" IsDirectionReversed="True"> 362 <Track.IncreaseRepeatButton> 363 <RepeatButton Style="{DynamicResource ScrollBar_DownTrack}"/> 364 </Track.IncreaseRepeatButton> 365 <Track.DecreaseRepeatButton> 366 <RepeatButton Style="{DynamicResource ScrollBar_UpTrack}"/> 367 </Track.DecreaseRepeatButton> 368 <Track.Thumb> 369 <Thumb Style="{DynamicResource ScrollBar_VerticalThumb}"/> 370 </Track.Thumb> 371 </Track> 372 <RepeatButton Grid.Row="2" Style="{DynamicResource Scrollbar_LineButton}" Command="ScrollBar.LineDownCommand" Content=" v" /> 373 </Grid> 374 </ControlTemplate> 375 </Setter.Value> 376 </Setter> 377 <Style.Triggers> 378 <Trigger Property="Orientation" Value="Horizontal" > 379 <Setter Property="Background" Value="Transparent" /> 380 <Setter Property="MinHeight" Value="10" /> 381 <Setter Property="Template"> 382 <Setter.Value> 383 <ControlTemplate TargetType="{x:Type ScrollBar}"> 384 <Grid> 385 <Grid.RowDefinitions> 386 <RowDefinition Height="12"/> 387 </Grid.RowDefinitions> 388 <Grid.ColumnDefinitions> 389 <ColumnDefinition Width="12" /> 390 <ColumnDefinition Width="*"/> 391 <ColumnDefinition Width="12" /> 392 </Grid.ColumnDefinitions> 393 <Border Grid.Column="1" BorderThickness="0" Background="Transparent" CornerRadius="4"/> 394 <RepeatButton Grid.Column="0" Style="{DynamicResource Scrollbar_LineButton}" Command="ScrollBar.LineLeftCommand" Content=" <" /> 395 <Track Grid.Column="1" Name="PART_Track"> 396 <Track.IncreaseRepeatButton> 397 <RepeatButton Style="{DynamicResource ScrollBar_RightTrack}"/> 398 </Track.IncreaseRepeatButton> 399 <Track.DecreaseRepeatButton> 400 <RepeatButton Style="{DynamicResource ScrollBar_LeftTrack}"/> 401 </Track.DecreaseRepeatButton> 402 <Track.Thumb> 403 <Thumb Style="{DynamicResource ScrollBar_HorizontalThumb}"/> 404 </Track.Thumb> 405 </Track> 406 <RepeatButton Grid.Column="2" Style="{DynamicResource Scrollbar_LineButton}" Command="ScrollBar.LineRightCommand" Content=" >" /> 407 408 </Grid> 409 </ControlTemplate> 410 </Setter.Value> 411 </Setter> 412 </Trigger> 413 </Style.Triggers> 414 </Style> 191 <!--<Style TargetType="{x:Type pwg:MainWindow}"> 192 <Setter Property="Background" Value="{DynamicResource WindowGradient}" /> 193 </Style>--> 194 415 195 </Window.Resources> 416 196 <DockPanel Name="mainDockPanel" Margin="5"> … … 418 198 <Image Name="ImgPiwigoLogo" MinHeight="50" MinWidth="50" 419 199 Source="pack://application:,,,/Pictures/PiwigoLogo.png" 420 ToolTip="www.piwigo.org" Stretch="None" />200 ToolTip="www.piwigo.org" Stretch="None" HorizontalAlignment="Left" /> 421 201 <StackPanel Name="connectStackPanel" Orientation="Horizontal" VerticalAlignment="Center" Margin="5" 422 202 DataContext="{Binding Source={StaticResource Session}}"> … … 433 213 </StackPanel> 434 214 435 <ListView Name="listViewCategory" Style="PhotoListStyle" DockPanel.Dock="Left" MinWidth="100" ItemsSource="{Binding Source={StaticResource Categories}}" /> 436 <ListView Name="listViewImage" Style="PhotoListStyle" DockPanel.Dock="Right" MinWidth="500" ItemsSource="{Binding Source={StaticResource Images}}" /> 215 <ListView Name="listViewCategory" DockPanel.Dock="Left" MinWidth="100" 216 Style="{DynamicResource CategoryListStyle}" 217 ItemContainerStyle="{DynamicResource CategoryListItem}" 218 DataContext="{Binding Source={StaticResource Categories}}" 219 ItemsSource="{Binding }" MouseDoubleClick="listViewCategory_MouseDoubleClick" /> 220 <ListView Name="listViewImage" DockPanel.Dock="Right" MinWidth="500" 221 Style="{DynamicResource PhotoListStyle}" 222 ItemContainerStyle="{DynamicResource PhotoListItem}" 223 DataContext="{Binding Source={StaticResource Images}}" 224 ItemsSource="{Binding }" /> 437 225 </DockPanel> 438 226 -
extensions/PiwigoLib/PiwigoWpf/MainWindow.xaml.cs
r7150 r11904 12 12 using System.Windows.Navigation; 13 13 using System.Windows.Shapes; 14 using Com.Piwigo.Wpf.Helper; 15 using Com.Piwigo.Wpf.Command; 14 16 15 17 namespace Com.Piwigo.Wpf … … 24 26 InitializeComponent(); 25 27 } 28 29 private void listViewCategory_MouseDoubleClick(object sender, MouseButtonEventArgs e) 30 { 31 AppHelper.ExecuteCommand<PwgCmdGetImageforCategory>(listViewCategory.SelectedValue); 32 } 26 33 } 27 34 } -
extensions/PiwigoLib/PiwigoWpf/PiwigoWpf.csproj
r11850 r11904 59 59 <Reference Include="System.Data" /> 60 60 <Reference Include="System.Drawing" /> 61 <Reference Include="System.Web" /> 61 62 <Reference Include="System.Xml" /> 62 63 <Reference Include="Microsoft.CSharp" /> … … 76 77 <SubType>Designer</SubType> 77 78 </ApplicationDefinition> 79 <Compile Include="Command\PwgCmdGetImageforCategory.cs" /> 78 80 <Compile Include="Command\PwgCmdProvider.cs" /> 79 81 <Compile Include="Command\PwgCmdConnect.cs" /> 80 82 <Compile Include="Command\PwgCmdBase.cs" /> 83 <Compile Include="DTO\Helper\PwgImageListWPFHelper.cs" /> 84 <Compile Include="DTO\Helper\PwgImageWPFHelper.cs" /> 81 85 <Compile Include="DTO\Helper\PwgCategoryWPFHelper.cs" /> 82 86 <Compile Include="DTO\Helper\PwgCategoryListWPFHelper.cs" /> … … 84 88 <Compile Include="DTO\PwgModelManager.cs" /> 85 89 <Compile Include="Helper\AppHelper.cs" /> 90 <Compile Include="Helper\ImageUrlCachedConverter.cs" /> 91 <Compile Include="Service\ImageCacheManager.cs" /> 86 92 <Compile Include="Settings.cs" /> 87 93 <Page Include="MainWindow.xaml"> 88 94 <Generator>MSBuild:Compile</Generator> 89 95 <SubType>Designer</SubType> 96 <CustomToolNamespace>Com.Pixigo.Wpf</CustomToolNamespace> 90 97 </Page> 91 98 <Compile Include="App.xaml.cs"> … … 104 111 <SubType>Code</SubType> 105 112 </Compile> 113 <Page Include="VisualStyleApp.xaml"> 114 <SubType>Designer</SubType> 115 <Generator>MSBuild:Compile</Generator> 116 </Page> 106 117 </ItemGroup> 107 118 <ItemGroup> … … 122 133 <Generator>ResXFileCodeGenerator</Generator> 123 134 <LastGenOutput>Resources.Designer.cs</LastGenOutput> 124 <SubType>Designer</SubType>125 135 </EmbeddedResource> 126 136 <None Include="app.config" /> … … 132 142 </ItemGroup> 133 143 <ItemGroup> 134 < EmbeddedResource Include="Pictures\PiwigoLogo.png" />144 <Resource Include="Pictures\PiwigoLogo.png" /> 135 145 </ItemGroup> 136 146 <ItemGroup> … … 165 175 </BootstrapperPackage> 166 176 </ItemGroup> 177 <ItemGroup> 178 <Resource Include="Pictures\Globe.png" /> 179 </ItemGroup> 180 <ItemGroup> 181 <Resource Include="Pictures\folder_images.png" /> 182 </ItemGroup> 167 183 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 168 184 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
extensions/PiwigoLib/PiwigoWpf/Properties/Settings.Designer.cs
r11850 r11904 9 9 //------------------------------------------------------------------------------ 10 10 11 using System; 11 12 namespace Com.Piwigo.Wpf.Properties { 12 13 -
extensions/PiwigoLib/TestPiwigoLib/Form1.cs
r11903 r11904 60 60 //Console.WriteLine("lstImg : Page " + Page.ToString() + " PerPage " + PerPage); 61 61 62 //List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetAdminListOfCategory(); 62 List<PwgCategory> lstadmCat = PwgServiceProvider.Instance.PwgCategoriesService.GetAdminListOfCategory(); 63 64 List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetListOfCategory(0, true, false); 63 65 64 66 Int32 newid = 0; … … 74 76 //lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetAdminListOfCategory(); 75 77 76 FileInfo fiBig = new FileInfo("C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n.jpg");77 FileInfo fiThumb = new FileInfo(MakeThumb(fiBig, "C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n_thum.jpg", 64));78 FileInfo fiLow = new FileInfo(MakeThumb(fiBig, "C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n_low.jpg", 256));78 //FileInfo fiBig = new FileInfo("C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n.jpg"); 79 //FileInfo fiThumb = new FileInfo(MakeThumb(fiBig, "C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n_thum.jpg", 64)); 80 //FileInfo fiLow = new FileInfo(MakeThumb(fiBig, "C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n_low.jpg", 256)); 79 81 80 82 //FileInfo fiBig = new FileInfo("C:\\temp\\Oryx.jpg"); … … 83 85 84 86 //PwgImageAdded imgAdd = PwgServiceProvider.Instance.PwgImagesService.addImageByMultiPartForm(fiBig, null, 1, "benoit", "byarl", "test upload", 0, new List<PwgTag>() { new PwgTag() { Name = "Benoit" }, new PwgTag() { Name = "Noé" } }); 85 rc = PwgServiceProvider.Instance.PwgImagesService.addImage(fiBig, fiLow, fiThumb, "Benoit", "bayral", DateTime.Now, "demo", new List<string>() { "1" }, new List<string>() { "Benoit" }, PwgConfidentLevelEnum.All);87 //rc = PwgServiceProvider.Instance.PwgImagesService.addImage(fiBig, fiLow, fiThumb, "Benoit", "bayral", DateTime.Now, "demo", new List<string>() { "1" }, new List<string>() { "Benoit" }, PwgConfidentLevelEnum.All); 86 88 //rc = PwgServiceProvider.Instance.PwgImagesService.DeleteImage(319, sess.SecurityToken); 87 89
Note: See TracChangeset
for help on using the changeset viewer.