Merge branch 'x64' into origin/master

This commit is contained in:
Maddo 2017-04-17 14:33:05 +02:00
commit 1ae2a248a7
21 changed files with 969 additions and 451 deletions

View file

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26403.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ImageCatalog 2", "imagecatalog\ImageCatalog 2.vbproj", "{8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}"
EndProject
@ -13,7 +13,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFCatalog", "WPFCatalog\WP
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CatalogVbLib", "CatalogVbLib\CatalogVbLib.vbproj", "{44465926-240D-473F-90B8-786BA4384406}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaddoLibrary.WPF.NET46", "MaddoLibrary\MaddoLibrary.WPF.NET46\MaddoLibrary.WPF.NET46.csproj", "{73DA19D7-196D-4B16-B610-93250978A607}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{A3D50937-74F6-4DC8-8D89-B534B484C0F9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -39,48 +39,44 @@ Global
{8D3AA2B0-8F06-4A61-9CAD-B920EB1A8E9C}.Release|x86.Build.0 = Release|x86
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|x64.ActiveCfg = Debug|Any CPU
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|x64.ActiveCfg = Debug|x64
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|x64.Build.0 = Debug|x64
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Debug|x86.ActiveCfg = Debug|Any CPU
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Release|Any CPU.Build.0 = Release|Any CPU
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Release|x64.ActiveCfg = Release|Any CPU
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Release|x64.ActiveCfg = Release|x64
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Release|x64.Build.0 = Release|x64
{D11ED7B0-93E8-4F38-A142-EED72D7EE8B5}.Release|x86.ActiveCfg = Release|Any CPU
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Debug|x64.ActiveCfg = Debug|Any CPU
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Debug|x64.ActiveCfg = Debug|x64
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Debug|x64.Build.0 = Debug|x64
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Debug|x86.ActiveCfg = Debug|Any CPU
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Release|Any CPU.Build.0 = Release|Any CPU
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Release|x64.ActiveCfg = Release|Any CPU
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Release|x64.ActiveCfg = Release|x64
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Release|x64.Build.0 = Release|x64
{D27ACCF2-80FC-4DE8-AEB8-351FF076E6D5}.Release|x86.ActiveCfg = Release|Any CPU
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Debug|Any CPU.Build.0 = Debug|Any CPU
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Debug|x64.ActiveCfg = Debug|Any CPU
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Debug|x64.ActiveCfg = Debug|x64
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Debug|x64.Build.0 = Debug|x64
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Debug|x86.ActiveCfg = Debug|Any CPU
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Release|Any CPU.ActiveCfg = Release|Any CPU
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Release|Any CPU.Build.0 = Release|Any CPU
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Release|x64.ActiveCfg = Release|Any CPU
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Release|x64.ActiveCfg = Release|x64
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Release|x64.Build.0 = Release|x64
{638DE501-CECA-4744-B293-7AE93CAEEB01}.Release|x86.ActiveCfg = Release|Any CPU
{44465926-240D-473F-90B8-786BA4384406}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44465926-240D-473F-90B8-786BA4384406}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44465926-240D-473F-90B8-786BA4384406}.Debug|x64.ActiveCfg = Debug|Any CPU
{44465926-240D-473F-90B8-786BA4384406}.Debug|x64.ActiveCfg = Debug|x64
{44465926-240D-473F-90B8-786BA4384406}.Debug|x64.Build.0 = Debug|x64
{44465926-240D-473F-90B8-786BA4384406}.Debug|x86.ActiveCfg = Debug|Any CPU
{44465926-240D-473F-90B8-786BA4384406}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44465926-240D-473F-90B8-786BA4384406}.Release|Any CPU.Build.0 = Release|Any CPU
{44465926-240D-473F-90B8-786BA4384406}.Release|x64.ActiveCfg = Release|Any CPU
{44465926-240D-473F-90B8-786BA4384406}.Release|x64.ActiveCfg = Release|x64
{44465926-240D-473F-90B8-786BA4384406}.Release|x64.Build.0 = Release|x64
{44465926-240D-473F-90B8-786BA4384406}.Release|x86.ActiveCfg = Release|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Debug|x64.ActiveCfg = Debug|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Debug|x64.Build.0 = Debug|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Debug|x86.ActiveCfg = Debug|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Debug|x86.Build.0 = Debug|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Release|Any CPU.Build.0 = Release|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Release|x64.ActiveCfg = Release|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Release|x64.Build.0 = Release|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Release|x86.ActiveCfg = Release|Any CPU
{73DA19D7-196D-4B16-B610-93250978A607}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -34,18 +34,30 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="ImageSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ImageSharp.1.0.0-alpha3-00005\lib\netstandard1.3\ImageSharp.dll</HintPath>
<HintPath>..\packages\ImageSharp.1.0.0-alpha6-00049\lib\netstandard1.3\ImageSharp.dll</HintPath>
</Reference>
<Reference Include="ImageSharp.Drawing, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ImageSharp.Drawing.1.0.0-alpha3-00005\lib\netstandard1.1\ImageSharp.Drawing.dll</HintPath>
</Reference>
<Reference Include="ImageSharp.Drawing.Paths, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ImageSharp.Drawing.Paths.1.0.0-alpha2-00107\lib\net45\ImageSharp.Drawing.Paths.dll</HintPath>
</Reference>
<Reference Include="ImageSharp.Drawing.Text, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ImageSharp.Drawing.Text.1.0.0-alpha2-00003\lib\net45\ImageSharp.Drawing.Text.dll</HintPath>
<HintPath>..\packages\ImageSharp.Drawing.1.0.0-alpha6-00010\lib\netstandard1.1\ImageSharp.Drawing.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
@ -55,10 +67,10 @@
<Private>True</Private>
</Reference>
<Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SixLabors.Fonts.0.1.0-alpha0002\lib\netstandard1.3\SixLabors.Fonts.dll</HintPath>
<HintPath>..\packages\SixLabors.Fonts.0.1.0-alpha0008\lib\netstandard1.3\SixLabors.Fonts.dll</HintPath>
</Reference>
<Reference Include="SixLabors.Shapes, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SixLabors.Shapes.0.1.0-alpha0008\lib\netstandard1.1\SixLabors.Shapes.dll</HintPath>
<HintPath>..\packages\SixLabors.Shapes.0.1.0-alpha0011\lib\netstandard1.1\SixLabors.Shapes.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">

View file

@ -1,19 +1,33 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using ImageSharp;
using SixLabors.Fonts;
using Color = ImageSharp.Color;
using Font = SixLabors.Fonts.Font;
using FontFamily = SixLabors.Fonts.FontFamily;
using FontStyle = SixLabors.Fonts.FontStyle;
using Image = ImageSharp.Image;
namespace CatalogLib
{
public class ImgSharpCreator : IImageProcessor
{
private FileInfo _currentFile;
public void Start(FileInfo workFile)
{
using (Image image = new Image(workFile.FullName))
_currentFile = workFile;
using (Image image = Image.Load(workFile.FullName)/* new Image(workFile.FullName)*/)
{
if (PicSettings.Instance.UsaRotazioneAutomatica)
{
@ -68,16 +82,52 @@ namespace CatalogLib
}
if (PicSettings.Instance.EnableText)
{
SetExtraText(image);
}
//JpegDecoder j = new JpegDecoder();
var va = Vector.IsHardwareAccelerated;
image.Resize(PicSettings.Instance.FotoLarghezza, PicSettings.Instance.FotoAltezza);
//image.Resize(2240, 2240);
//var fff = FontCollection.SystemFonts.Find(PicSettings.Instance.NomeFont);
//var font = new Font(fff, (float)PicSettings.Instance.DimensioneFont, FontStyle.Regular);
//image.DrawText("sssssssssssssssssssssssssssssssssssssssssssssss", font, Color.Black, new Vector2(200, 200));
image.Save(Path.Combine(PicSettings.Instance.DirectoryDestinazione, workFile.Name));
//image.Resize(200, 200).Save("");
}
}
private void SetExtraText(ref Image image)
private void SetExtraText(Image image)
{
//if ()
if (string.IsNullOrWhiteSpace(PicSettings.Instance.TestoApplicareOrizzontale))
{
Debug.WriteLine($"{_currentFile.Name} No text");
return;
}
var fff = FontCollection.SystemFonts.Find(PicSettings.Instance.NomeFont);
//var fff = FontCollection.SystemFonts.Find("Segoe Print");
var font = new Font(fff, (float)PicSettings.Instance.DimensioneFont, FontStyle.Regular);
//var font = new Font(fff, 8f, FontStyle.Regular);
Color c = Color.FromHex(PicSettings.Instance.ColoreTestoRGB);
//image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, font, Color.Black, )
image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, font, Color.Black, new Vector2(200, 200));
//image.DrawText("sssssssssssssssssssssssssssssssssssssssssssssss", font, Color.Black, new Vector2(200, 200));
//double hr = image.MetaData.HorizontalResolution;
//double vr = image.MetaData.HorizontalResolution;
//image.MetaData.HorizontalResolution = 72;
//image.MetaData.VerticalResolution = 72;
//image.DrawText("sssssssssssssssssssssssssssssssssssssssssssssss", font, Color.Black, new Vector2(200, 200));
//image.MetaData.HorizontalResolution = hr;
//image.MetaData.VerticalResolution = hr;
}
}
}

View file

@ -142,7 +142,7 @@ namespace CatalogLib
// setdouble default
}
return (T)_settingsDict[key];
return (T)_settingsDict[key];
}
@ -302,7 +302,7 @@ namespace CatalogLib
public bool GeneraleRotazioneAutomatica
{
get { return GetBool("GeneraleRotazioneAutomatica"); }
get { return GetBool("GeneraleRotazioneAutomatica", true); }
set { SetBool("GeneraleRotazioneAutomatica", value); }
}
@ -378,7 +378,7 @@ namespace CatalogLib
set { SetString("FotoSuffisso", value); }
}
public bool EnableThumbnails
{
get { return GetBool("EnableThumbnails", false); }
@ -410,6 +410,28 @@ namespace CatalogLib
set { SetDouble("dimensioneFont", value); }
}
public string TestoApplicareOrizzontale
{
get
{
return Get<string>("TestoApplicareOrizzontale", "");
}
set
{
Set<string>("TestoApplicareOrizzontale", value);
}
}
public string ColoreTestoRGB
{
get { return GetString("coloreTestoRGB", "#000000"); }
set
{
Set("coloreTestoRGB", value);
}
}
#endregion

View file

@ -1,15 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ImageSharp" version="1.0.0-alpha3-00005" targetFramework="net46" />
<package id="ImageSharp.Drawing" version="1.0.0-alpha3-00005" targetFramework="net46" />
<package id="ImageSharp.Drawing.Paths" version="1.0.0-alpha2-00107" targetFramework="net46" />
<package id="ImageSharp.Drawing.Text" version="1.0.0-alpha2-00003" targetFramework="net46" />
<package id="ImageSharp" version="1.0.0-alpha6-00049" targetFramework="net46" />
<package id="ImageSharp.Drawing" version="1.0.0-alpha6-00010" targetFramework="net46" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net46" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net46" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net46" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net46" />
<package id="SixLabors.Fonts" version="0.1.0-alpha0002" targetFramework="net46" />
<package id="SixLabors.Shapes" version="0.1.0-alpha0008" targetFramework="net46" />
<package id="SixLabors.Fonts" version="0.1.0-alpha0008" targetFramework="net46" />
<package id="SixLabors.Shapes" version="0.1.0-alpha0011" targetFramework="net46" />
<package id="System.AppContext" version="4.3.0" targetFramework="net46" />
<package id="System.Buffers" version="4.3.0" targetFramework="net46" />
<package id="System.Collections" version="4.3.0" targetFramework="net46" />

View file

@ -46,6 +46,27 @@
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Debug\</OutputPath>
<DocumentationFile>CatalogVbLib.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x64\Release\</OutputPath>
<DocumentationFile>CatalogVbLib.xml</DocumentationFile>
<Optimize>true</Optimize>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />

View file

@ -35,6 +35,26 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />

View file

@ -4,6 +4,7 @@
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />

View file

@ -1,5 +1,20 @@
<Application x:Class="WPFCatalog.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d1p1:Ignorable="d" xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006">
<Application.Resources>
<!--<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:WPFCatalog.ViewModel" />-->
</Application.Resources>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
<!-- Accent and AppTheme setting -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedTabControl.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
<!--<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:vm="clr-namespace:WPFCatalog.ViewModel" />-->
</Application.Resources>
</Application>

View file

@ -0,0 +1,159 @@
<UserControl x:Class="WPFCatalog.Controls.GeneralSettingsControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wpfCatalog="clr-namespace:WPFCatalog"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d"
d:DesignHeight="900" d:DesignWidth="500"
d:DataContext="{d:DesignInstance wpfCatalog:MainWindowViewModel}"
>
<Grid>
<ScrollViewer>
<StackPanel Orientation="Vertical">
<GroupBox Header="Directory" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Sorgente"/>
<TextBox Grid.Row="0" Grid.Column="1" x:Name="txtSorgente" Margin="0,5" Text="{Binding DirSorgente}" Controls:TextBoxHelper.ClearTextButton="True" />
<Button Grid.Row="0" Grid.Column="2" x:Name="btnSelectSorgente" Margin="5,5" Command="{Binding SelectSourceFolderCommand}">
<Button.Content>
<iconPacks:PackIconMaterial Kind="FolderPlus" />
</Button.Content>
</Button>
<Button Grid.Row="0" Grid.Column="3" x:Name="btnOpenSorgente" Margin="5,5" Command="{Binding OpenSourceFolderCommand}">
<Button.Content>
<iconPacks:PackIconMaterial Kind="FolderOutline" />
</Button.Content>
</Button>
<Label Grid.Row="1" Grid.Column="0" Content="Destinazione"/>
<TextBox Grid.Row="1" Grid.Column="1" x:Name="txtDestinazione" Margin="0,5" Text="{Binding DirDestinazione}" Controls:TextBoxHelper.ClearTextButton="True"/>
<Button Grid.Row="1" Grid.Column="2" x:Name="btnSelectDestinazione" Margin="5,5" Command="{Binding SelectDestinationFolderCommand}">
<Button.Content>
<iconPacks:PackIconMaterial Kind="FolderPlus" />
</Button.Content>
</Button>
<Button Grid.Row="1" Grid.Column="3" x:Name="btnOpenDestinazione" Margin="5.4,0,4.6,4.6" Command="{Binding OpenDestinationFolderCommand}" Height="19" VerticalAlignment="Bottom">
<Button.Content>
<iconPacks:PackIconMaterial Kind="FolderOutline" />
</Button.Content>
</Button>
<!--<Controls:ToggleSwitch Grid.Row="2" Grid.Column="1" Header="Aggiorna le sottodirectory" IsChecked="{Binding DirAggiornaSottoDirectory}" />-->
<CheckBox Grid.Row="2" Grid.Column="1" Content="Aggiorna le sottodirectory" x:Name="chkAggiornaSottodirectory" IsChecked="{Binding DirAggiornaSottoDirectory}"/>
</Grid>
</GroupBox>
<GroupBox Header="Generale" Margin="2">
<StackPanel Orientation="Vertical" >
<CheckBox Content="Forza JPG" x:Name="chkForzaJPG" IsChecked="{Binding GeneraleForzaJPG}" Margin="2"/>
<CheckBox Content="Rotazione Automatica" x:Name="chkRotazioneAutomatica" IsChecked="{Binding GeneraleRotazioneAutomatica}" Margin="2"/>
<CheckBox Content="Sovrascrivi File" x:Name="chkSovrascriviFile" IsChecked="{Binding GeneraleSovrascriviFile}" Margin="2"/>
</StackPanel>
</GroupBox>
<GroupBox Header="Sottocartelle" Margin="2">
<StackPanel Orientation="Vertical">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<CheckBox Grid.Row="0" Grid.Column="1" Content="Crea Sottocartelle" x:Name="chkCreaSottocartelle" Margin="4,0,0,0" IsChecked="{Binding SubdirCreaSottoCartelle}"/>
<Label Grid.Row="1" Grid.Column="0" Content="Ogni"/>
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1">
<TextBox Width="50" HorizontalAlignment="Left" x:Name="txtOgni" Text="{Binding SubdirIntervalloFile}"/>
<Label Content="file"/>
</StackPanel>
<Label Grid.Row="2" Grid.Column="0" Content="Suffisso" Target="{Binding ElementName=txtSuffisso}"/>
<TextBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" x:Name="txtSuffisso" Text="{Binding SubdirSuffisso}"/>
</Grid>
<StackPanel Orientation="Horizontal" >
<Label Content="Num. Cifre Contatore" />
<TextBox Width="40" HorizontalAlignment="Right" x:Name="txtNumCifreContatore" Text="{Binding SubdirCifreContatore}"/>
</StackPanel>
<RadioButton Content="Numerazione Progressiva" IsChecked="{Binding SubdirNumerazioneProgressiva}" x:Name="rdbNumerazioneProgressiva" />
<RadioButton Content="Numerazione Files" x:Name="rdbNumerazioneFiles" IsChecked="{Binding SubdirNumerazioneFiles}"/>
</StackPanel>
</GroupBox>
<GroupBox Margin="2">
<GroupBox.Header>
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="Camera" />
<TextBlock Text="Foto" Margin="5,0,0,0" />
</StackPanel>
</GroupBox.Header>
<Grid >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="15*"/>
<ColumnDefinition Width="48*"/>
<ColumnDefinition Width="88*"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Altezza" Grid.ColumnSpan="2" Margin="0,0,0,2" />
<TextBox Grid.Row="0" Grid.Column="2" Margin="4,4,4,6" Text="{Binding FotoAltezza}"/>
<Label Grid.Column="0" Content="Larghezza" Grid.ColumnSpan="2" Margin="0,26,0,2" Grid.RowSpan="2" />
<TextBox Grid.Row="1" Grid.Column="2" Margin="4,2,4,6" Text="{Binding FotoLarghezza}"></TextBox>
<Label Grid.Row="1" Grid.Column="0" Content="Qualità" Grid.ColumnSpan="2" Margin="0,24,0,1" Grid.RowSpan="2" />
<!--<TextBox Grid.Row="2" Grid.Column="2" Width="80" Margin="4,2,4,5" />-->
<Grid Grid.Row="2" Grid.Column="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="20"/>
</Grid.ColumnDefinitions>
<Slider Grid.Column="0" Orientation="Horizontal" Maximum="100" Minimum="0" Value="{Binding CompressioneJpeg}"></Slider>
<TextBlock Grid.Column="1" Text="{Binding CompressioneJpeg}"></TextBlock>
</Grid>
<CheckBox Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,16,0,17.88" IsChecked="{Binding FotoMantieniDimensioni}"/>
<TextBlock Grid.Row="3" Grid.Column="2" Text="Mantieni Dimensioni Originali" TextWrapping="WrapWithOverflow" Width="80" Margin="4,0,4,25.88" Grid.RowSpan="2" />
<Label Grid.Row="4" Grid.Column="0" Content="Suffisso" Grid.ColumnSpan="2" Margin="0,0.12,0,-0.12" />
<TextBox Grid.Row="4" Grid.Column="2" Width="80" Margin="4,4.12,4,3.88" Text="{Binding FotoSuffisso}" />
</Grid>
</GroupBox>
</StackPanel>
</ScrollViewer>
</Grid>
</UserControl>

View file

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WPFCatalog.Controls
{
/// <summary>
/// Interaction logic for GeneralSettingsControl.xaml
/// </summary>
public partial class GeneralSettingsControl : UserControl
{
public GeneralSettingsControl()
{
InitializeComponent();
}
}
}

View file

@ -0,0 +1,166 @@
<UserControl x:Class="WPFCatalog.Controls.TextSettingsControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wpfCatalog="clr-namespace:WPFCatalog"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
mc:Ignorable="d"
d:DesignHeight="900" d:DesignWidth="500"
d:DataContext="{d:DesignInstance wpfCatalog:MainWindowViewModel}" >
<UserControl.Resources>
<wpfCatalog:FontFamilyStringConverter x:Key="FontFamilyConverter" />
<wpfCatalog:MaddoColorConverter x:Key="ColorConverter" />
</UserControl.Resources>
<ScrollViewer>
<StackPanel Orientation="Vertical">
<Controls:ToggleSwitch Header="Inserimento testo" IsChecked="{Binding EnableText}" />
<GroupBox Header="Carattere">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Button Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Scegli" Command="{Binding PickFontCommand}"></Button>
<Label Grid.Row="1" Grid.Column="0" Content="Font"/>
<TextBox Grid.Row="1" Grid.Column="1"
IsReadOnly="True"
FontFamily="{Binding FontName, Converter={StaticResource FontFamilyConverter}, Mode=OneWay}"
Text="{Binding FontName}"
></TextBox>
<Label Content="Grassetto" Grid.Row="2" Grid.Column="0"></Label>
<CheckBox Grid.Row="2" Grid.Column="1"></CheckBox>
<Label Content="Corsivo" Grid.Row="3" Grid.Column="0"></Label>
<CheckBox Grid.Row="3" Grid.Column="1"></CheckBox>
<Label Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Content="Dimensione"/>
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding FontSize}"/>
<Label Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Content="Dimensione Miniatura"/>
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding CarattereDimensioneMiniatura}"/>
<Label Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" Content="Colore RGB" />
<xctk:ColorPicker Grid.Row="6" Grid.Column="1" SelectedColor="{Binding ColoreTestoRGB, Converter={StaticResource ColorConverter}}"/>
</Grid>
<!--<ComboBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Width="100" HorizontalAlignment="Right" SelectedItem="{Binding CarattereFont}" x:Name="cmbFont" />-->
<!---->
<!--<CheckBox Grid.Row="0" Grid.Column="3" Content="Grassetto" VerticalAlignment="Center" IsChecked="{Binding CarattereGrassetto}" />-->
<!--<Button Grid.Row="3" Grid.Column="3" Content="Scegli..." />-->
</GroupBox>
<StackPanel Orientation="Vertical" VerticalAlignment="Stretch">
<GroupBox Header="Slide Show" VerticalAlignment="Stretch">
<StackPanel Orientation="Horizontal" >
<CheckBox Content="Data" Margin="5,0" IsChecked="{Binding SlideshowData}"/>
<CheckBox Content="Numero Foto" Margin="5,0" IsChecked="{Binding SlideshowNumeroFoto}"/>
</StackPanel>
</GroupBox>
<GroupBox Header="Testo foto verticali" VerticalAlignment="Stretch">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Dimensione Carattere"/>
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TestoVertDimensioneCarattere}"/>
<Label Grid.Row="1" Grid.Column="0" Content="Margine"/>
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding TestoVertMargine}"/>
</Grid>
</GroupBox>
</StackPanel>
<GroupBox Header="Testo da applicare">
<StackPanel Orientation="Vertical">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Orizzontale" />
<Label Grid.Row="1" Grid.Column="0" Content="Verticale" />
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TestoApplicareOrizzontale}"/>
<TextBox Grid.Row="1" Grid.Column="1" Height="50" MaxLines="4" AcceptsReturn="True" Text="{Binding TestoApplicareVerticale}"/>
</Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Trasparenza(0-100%)" />
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TestoApplicareTrasparenza}" />
<Label Grid.Row="1" Grid.Column="0" Content="Posizione" />
<ComboBox Grid.Row="1" Grid.Column="1" />
<!--ToDo-->
<CheckBox Grid.Row="2" Grid.Column="1" Content="Orario" IsChecked="{Binding TestoApplicareOrario}"/>
<CheckBox Grid.Row="3" Grid.Column="1" Content="Tempo Gara" IsChecked="{Binding TestoApplicareTempoGaraCheck}"/>
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding TestoApplicareTempoGara}"/>
<Label Grid.Row="5" Grid.Column="0" Content="Margine (pixel)" />
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding TestoApplicareMargine}"/>
<Label Grid.Row="6" Grid.Column="0" Content="Allineamento" />
<TextBox Grid.Row="6" Grid.Column="1" Text="{Binding TestoApplicareAllineamento}"/>
<Label Grid.Row="7" Grid.Column="0" Content="Partenza" />
<ComboBox Grid.Row="7" Grid.Column="1" />
<!--todo-->
</Grid>
</StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</UserControl>

View file

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WPFCatalog.Controls
{
/// <summary>
/// Interaction logic for TextSettingsControl.xaml
/// </summary>
public partial class TextSettingsControl : UserControl
{
public TextSettingsControl()
{
InitializeComponent();
}
}
}

View file

@ -14,7 +14,7 @@ namespace WPFCatalog
{
public class MaddoColorConverter : IValueConverter
{
private DependencyObject _dummy = new DependencyObject();
private static readonly DependencyObject _dummy = new DependencyObject();
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{

View file

@ -1,10 +1,14 @@
<Window x:Name="MainWindow1" x:Class="WPFCatalog.MainWindow"
<Controls:MetroWindow x:Name="MainWindow1" x:Class="WPFCatalog.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wpfCatalog="clr-namespace:WPFCatalog"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock"
xmlns:controls="clr-namespace:WPFCatalog.Controls"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d"
Title="Image Catalog" Height="466" Width="772"
@ -20,442 +24,177 @@
<Setter Property="Margin" Value="2,2,5,5" />
</Style>
<Style TargetType="ComboBox" BasedOn="{StaticResource CommonStyle}"></Style>
<wpfCatalog:FontFamilyStringConverter x:Key="FontFamilyConverter" />
<wpfCatalog:MaddoColorConverter x:Key="ColorConverter" />
</Window.Resources>
<DockPanel LastChildFill="True">
<Menu DockPanel.Dock="Top" Height="auto">
<MenuItem Header="Files"/>
<MenuItem Header="Modifica"></MenuItem>
<MenuItem Header="?"></MenuItem>
</Menu>
<StatusBar DockPanel.Dock="Bottom" Height="auto">
<StatusBarItem>
<ProgressBar Width="510" Height="10">
<Grid>
<DockPanel LastChildFill="True">
<Menu DockPanel.Dock="Top" Height="auto">
<MenuItem Header="Files"/>
<MenuItem Header="Modifica"></MenuItem>
<MenuItem Header="?"></MenuItem>
</Menu>
<StatusBar DockPanel.Dock="Bottom" Height="auto">
<StatusBarItem>
<ProgressBar Width="510" Height="10">
</ProgressBar>
</StatusBarItem>
</StatusBar>
<DockPanel >
<!--<Grid.ColumnDefinitions>
</ProgressBar>
</StatusBarItem>
</StatusBar>
<DockPanel >
<!--<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>-->
<TabControl DockPanel.Dock="Left" Width="520">
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<Controls:MetroAnimatedTabControl DockPanel.Dock="Left" Width="520">
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Generale" Margin="0,0,5,0"/>
<Image Source="Icons/camera-photo-5.png" Width="16" Height="16" />
</StackPanel>
</TabItem.Header>
<WrapPanel>
<GroupBox Header="Directory" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="400"/>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Sorgente"/>
<TextBox Grid.Row="0" Grid.Column="1" x:Name="txtSorgente" Margin="0,5" Text="{Binding DirSorgente}" />
<Button Grid.Row="0" Grid.Column="2" x:Name="btnSelectSorgente" Margin="5,5" Command="{Binding SelectSourceFolderCommand}">
<Button.Content>
<Image Source="Icons/document-open-6.png" />
</Button.Content>
</Button>
<Button Grid.Row="0" Grid.Column="3" x:Name="btnOpenSorgente" Margin="5,5" Command="{Binding OpenSourceFolderCommand}">
<Button.Content>
<Image Source="Icons/document-open-folder.png" />
</Button.Content>
</Button>
<Label Grid.Row="1" Grid.Column="0" Content="Destinazione"/>
<TextBox Grid.Row="1" Grid.Column="1" x:Name="txtDestinazione" Margin="0,5" Text="{Binding DirDestinazione}"/>
<Button Grid.Row="1" Grid.Column="2" x:Name="btnSelectDestinazione" Margin="5,5" Command="{Binding SelectDestinationFolderCommand}">
<Button.Content>
<Image Source="Icons/document-open-6.png" />
</Button.Content>
</Button>
<Button Grid.Row="1" Grid.Column="3" x:Name="btnOpenDestinazione" Margin="5.4,0,4.6,4.6" Command="{Binding OpenDestinationFolderCommand}" Height="19" VerticalAlignment="Bottom">
<Button.Content>
<Image Source="Icons/document-open-folder.png" />
</Button.Content>
</Button>
<CheckBox Grid.Row="2" Grid.Column="1" Content="Aggiorna le sottodirectory" x:Name="chkAggiornaSottodirectory" IsChecked="{Binding DirAggiornaSottoDirectory}"/>
</Grid>
</GroupBox>
<GroupBox Header="Generale" Margin="2">
<StackPanel Orientation="Vertical" >
<CheckBox Content="Forza JPG" x:Name="chkForzaJPG" IsChecked="{Binding GeneraleForzaJPG}" Margin="2"/>
<CheckBox Content="Rotazione Automatica" x:Name="chkRotazioneAutomatica" IsChecked="{Binding GeneraleRotazioneAutomatica}" Margin="2"/>
<CheckBox Content="Sovrascrivi File" x:Name="chkSovrascriviFile" IsChecked="{Binding GeneraleSovrascriviFile}" Margin="2"/>
<TextBlock Text="Generale" Margin="0,0,5,0" VerticalAlignment="Center"/>
<iconPacks:PackIconMaterial Kind="Camera" VerticalAlignment="Center"/>
</StackPanel>
</GroupBox>
<GroupBox Header="Sottocartelle" Margin="2">
<StackPanel Orientation="Vertical">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<CheckBox Grid.Row="0" Grid.Column="1" Content="Crea Sottocartelle" x:Name="chkCreaSottocartelle" Margin="4,0,0,0" IsChecked="{Binding SubdirCreaSottoCartelle}"/>
<Label Grid.Row="1" Grid.Column="0" Content="Ogni"/>
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1">
<TextBox Width="50" HorizontalAlignment="Left" x:Name="txtOgni" Text="{Binding SubdirIntervalloFile}"/>
<Label Content="file"/>
</StackPanel>
<Label Grid.Row="2" Grid.Column="0" Content="Suffisso" />
<TextBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" x:Name="txtSuffisso" Text="{Binding SubdirSuffisso}"/>
</Grid>
<StackPanel Orientation="Horizontal" >
<Label Content="Num. Cifre Contatore" />
<TextBox Width="40" HorizontalAlignment="Right" x:Name="txtNumCifreContatore" Text="{Binding SubdirCifreContatore}"/>
</StackPanel>
<RadioButton Content="Numerazione Progressiva" IsChecked="{Binding SubdirNumerazioneProgressiva}" x:Name="rdbNumerazioneProgressiva" />
<RadioButton Content="Numerazione Files" x:Name="rdbNumerazioneFiles" IsChecked="{Binding SubdirNumerazioneFiles}"/>
</TabItem.Header>
<controls:GeneralSettingsControl ></controls:GeneralSettingsControl>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<Label Content="Testo" VerticalAlignment="Center"/>
<iconPacks:PackIconMaterial Kind="Textbox" VerticalAlignment="Center" />
</StackPanel>
</GroupBox>
<GroupBox Margin="2">
<GroupBox.Header>
<StackPanel Orientation="Horizontal">
<Image Source="Icons/photo.png" />
<TextBlock Text="Foto" Margin="5,0,0,0" />
</StackPanel>
</GroupBox.Header>
<Grid >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="15*"/>
<ColumnDefinition Width="48*"/>
<ColumnDefinition Width="88*"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Altezza" Grid.ColumnSpan="2" Margin="0,0,0,2" />
<TextBox Grid.Row="0" Grid.Column="2" Width="80" Margin="4,4,4,6" Text="{Binding FotoAltezza}"/>
<Label Grid.Column="0" Content="Larghezza" Grid.ColumnSpan="2" Margin="0,26,0,2" Grid.RowSpan="2" />
<TextBox Grid.Row="1" Grid.Column="2" Width="80" Margin="4,2,4,6" Text="{Binding FotoLarghezza}"></TextBox>
<Label Grid.Row="1" Grid.Column="0" Content="Qualità" Grid.ColumnSpan="2" Margin="0,24,0,1" Grid.RowSpan="2" />
<!--<TextBox Grid.Row="2" Grid.Column="2" Width="80" Margin="4,2,4,5" />-->
<Grid Grid.Row="2" Grid.Column="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="20"/>
</Grid.ColumnDefinitions>
<Slider Grid.Column="0" Orientation="Horizontal" Maximum="100" Minimum="0" Value="{Binding CompressioneJpeg}"></Slider>
<TextBlock Grid.Column="1" Text="{Binding CompressioneJpeg}"></TextBlock>
</Grid>
<CheckBox Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,16,0,17.88" IsChecked="{Binding FotoMantieniDimensioni}"/>
<TextBlock Grid.Row="3" Grid.Column="2" Text="Mantieni Dimensioni Originali" TextWrapping="WrapWithOverflow" Width="80" Margin="4,0,4,25.88" Grid.RowSpan="2" />
<Label Grid.Row="4" Grid.Column="0" Content="Suffisso" Grid.ColumnSpan="2" Margin="0,0.12,0,-0.12" />
<TextBox Grid.Row="4" Grid.Column="2" Width="80" Margin="4,4.12,4,3.88" Text="{Binding FotoSuffisso}" />
</Grid>
</GroupBox>
</WrapPanel>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<CheckBox VerticalAlignment="Center" IsChecked="{Binding TestoAttivo}"/>
<Label Content="Testo" VerticalAlignment="Center"/>
<Image Source="Icons/format-justify-left-2.png" />
</StackPanel>
</TabItem.Header>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<GroupBox Header="Carattere">
</TabItem.Header>
<controls:TextSettingsControl></controls:TextSettingsControl>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<Label VerticalAlignment="Center" Content="Miniature" VerticalContentAlignment="Center"/>
<iconPacks:PackIconMaterial Kind="Image" VerticalAlignment="Center"/>
</StackPanel>
</TabItem.Header>
<WrapPanel>
<GroupBox Header="Miniature">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition />
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Font"/>
<!--<ComboBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Width="100" HorizontalAlignment="Right" SelectedItem="{Binding CarattereFont}" x:Name="cmbFont" />-->
<TextBox Grid.Row="0" Grid.Column="2"
Width="100"
IsReadOnly="True"
FontFamily="{Binding FontName, Converter={StaticResource FontFamilyConverter}, Mode=OneWay}"
Text="{Binding FontName}"
></TextBox>
<!---->
<Label Grid.Row="0" Grid.Column="0" Content="Suffisso" />
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding MiniatureSuffisso}"/>
<!--<CheckBox Grid.Row="0" Grid.Column="3" Content="Grassetto" VerticalAlignment="Center" IsChecked="{Binding CarattereGrassetto}" />-->
<Button Grid.Row="0" Grid.Column="3" Content="Scegli" Command="{Binding PickFontCommand}"></Button>
<Label Grid.Row="1" Grid.Column="0" Content="Larghezza" />
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding MiniatureLarghezza}"/>
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="Dimensione"/>
<TextBox Grid.Row="1" Grid.Column="2" Text="{Binding FontSize}"/>
<Label Grid.Row="2" Grid.Column="0" Content="Altezza" />
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding MiniatureAltezza}"/>
<Label Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Content="Dimensione Miniatura"/>
<TextBox Grid.Row="2" Grid.Column="2" Text="{Binding CarattereDimensioneMiniatura}"/>
<Label Grid.Row="3" Grid.Column="0" Content="Qualità" />
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding MiniatureQualita}"/>
</Grid>
</GroupBox>
<GroupBox Header="Testo Miniature" >
<WrapPanel Orientation="Vertical" >
<RadioButton Content="Aggiungi Scritta" Margin="4,2,4,2" IsChecked="{Binding TestoMinAggiungiScritta}" />
<RadioButton Content="Aggiungi Orario" Margin="4,2,4,2" IsChecked="{Binding TestoMinAggiungiOrario}"/>
<RadioButton Content="Tempo Gara" Margin="4,2,4,2" IsChecked="{Binding TestoMinTempoGara}"/>
<RadioButton Content="Numero Foto" Margin="4,2,4,2" IsChecked="{Binding TestoMinNumeroFoto}"/>
<RadioButton Content="Numero + Tempo" Margin="4,2,4,2" IsChecked="{Binding TestoMinNumeroTempo}"></RadioButton>
</WrapPanel>
</GroupBox>
</WrapPanel>
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="Colore RGB" />
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<Label VerticalAlignment="Center" Content="Logo" />
<iconPacks:PackIconFontAwesome Kind="SmileOutline" VerticalAlignment="Center"/>
</StackPanel>
</TabItem.Header>
<xctk:ColorPicker Grid.Row="3" Grid.Column="2" SelectedColor="{Binding ColoreTestoRGB, Converter={StaticResource ColorConverter}}"/>
<!--<Button Grid.Row="3" Grid.Column="3" Content="Scegli..." />-->
<WrapPanel>
<GroupBox Header="Logo">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="50" />
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Percorso Immagine"/>
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" Text="{Binding LogoPercorsoImmagine}"/>
<Button Grid.Row="0" Grid.Column="4" Content="..." Command="{Binding ScegliLogoCommand}" />
<Label Grid.Row="1" Grid.Column="0" Content="Altezza" />
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding LogoAltezza}" />
<Label Grid.Row="2" Grid.Column="0" Content="Larghezza" />
<TextBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding LogoLarghezza}" />
<Label Grid.Row="3" Grid.Column="0" Content="Trasparenza (0-100%)" />
<TextBox Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding LogoTrasparenza}" />
<Label Grid.Row="4" Grid.Column="0" Content="Margine (pixel %)" />
<TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding LogoMargine}" />
<Label Grid.Row="5" Grid.Column="0" Content="Posizione Orizzontale" />
<ComboBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" />
<!--todo-->
<Label Grid.Row="6" Grid.Column="0" Content="Posizione Verticale" />
<ComboBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" />
<!--todo-->
<Label Grid.Row="7" Grid.Column="0" Content="Colore Trasparente" />
<Image Grid.Row="7" Grid.Column="1" Width="24" Height="24" HorizontalAlignment="Left" />
<Image Grid.Row="7" Grid.Column="8" Width="24" Height="24" HorizontalAlignment="Right" />
<Image Grid.Row="1" Grid.Column="3" Grid.RowSpan="7" />
</Grid>
</GroupBox>
<StackPanel Orientation="Vertical" VerticalAlignment="Stretch">
<GroupBox Header="Slide Show" VerticalAlignment="Stretch">
<StackPanel Orientation="Horizontal" >
<CheckBox Content="Data" Margin="5,0" IsChecked="{Binding SlideshowData}"/>
<CheckBox Content="Numero Foto" Margin="5,0" IsChecked="{Binding SlideshowNumeroFoto}"/>
</StackPanel>
</GroupBox>
<GroupBox Header="Testo foto verticali" VerticalAlignment="Stretch">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Dimensione Carattere"/>
<TextBox Grid.Row="0" Grid.Column="1" Width="40" Text="{Binding TestoVertDimensioneCarattere}"/>
<Label Grid.Row="1" Grid.Column="0" Content="Margine"/>
<TextBox Grid.Row="1" Grid.Column="1" Width="40" Text="{Binding TestoVertMargine}"/>
</Grid>
</GroupBox>
</WrapPanel>
</TabItem>
</Controls:MetroAnimatedTabControl>
<StackPanel DockPanel.Dock="Right" Orientation="Vertical">
<GroupBox DockPanel.Dock="Right" Header="Statistiche">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Button Content="Carica Impostazioni" Command="{Binding ImportSettingsCommand}" Style="{DynamicResource SquareButtonStyle}"></Button>
<Button Content="Salva Impostazioni" Command="{Binding ExportSettingsCommand}" Style="{DynamicResource SquareButtonStyle}"></Button>
</StackPanel>
<Button Content="Start" Command="{Binding StartCommand}" Style="{DynamicResource AccentedSquareButtonStyle}"></Button>
<Button Content="STOP" Command="{Binding StopCommand}" Style="{DynamicResource SquareButtonStyle}"/>
</StackPanel>
<GroupBox Header="Testo da applicare">
<StackPanel Orientation="Vertical">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Orizzontale" />
<Label Grid.Row="1" Grid.Column="0" Content="Verticale" />
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TestoApplicareOrizzontale}"/>
<TextBox Grid.Row="1" Grid.Column="1" Height="50" MaxLines="4" AcceptsReturn="True" Text="{Binding TestoApplicareVerticale}"/>
</Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Trasparenza(0-100%)" />
<TextBox Grid.Row="0" Grid.Column="2" Text="{Binding TestoApplicareTrasparenza}" />
</GroupBox>
</StackPanel>
<Label Grid.Row="1" Grid.Column="0" Content="Posizione" />
<ComboBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" />
<!--ToDo-->
<CheckBox Grid.Row="2" Grid.Column="1" Content="Orario" IsChecked="{Binding TestoApplicareOrario}"/>
<CheckBox Grid.Row="2" Grid.Column="2" Content="Tempo Gara" IsChecked="{Binding TestoApplicareTempoGaraCheck}"/>
<TextBox Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="2" Text="{Binding TestoApplicareTempoGara}"/>
<Label Grid.Row="0" Grid.Column="4" Grid.ColumnSpan="2" Content="Margine (pixel)" HorizontalAlignment="Right" />
<TextBox Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="2" Text="{Binding TestoApplicareMargine}"/>
<Label Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="2" Content="Allineamento" HorizontalAlignment="Right" />
<TextBox Grid.Row="1" Grid.Column="6" Grid.ColumnSpan="2" Text="{Binding TestoApplicareAllineamento}"/>
<Label Grid.Row="2" Grid.Column="5" Content="Partenza" />
<ComboBox Grid.Row="2" Grid.Column="6" Grid.ColumnSpan="2" />
<!--todo-->
</Grid>
</StackPanel>
</GroupBox>
</StackPanel>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<CheckBox VerticalAlignment="Center" />
<Label VerticalAlignment="Center" Content="Miniature" />
<Image Source="Icons/picture.png" />
</StackPanel>
</TabItem.Header>
<WrapPanel>
<GroupBox Header="Miniature">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Suffisso" />
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding MiniatureSuffisso}"/>
<Label Grid.Row="1" Grid.Column="0" Content="Larghezza" />
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding MiniatureLarghezza}"/>
<Label Grid.Row="2" Grid.Column="0" Content="Altezza" />
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding MiniatureAltezza}"/>
<Label Grid.Row="3" Grid.Column="0" Content="Qualità" />
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding MiniatureQualita}"/>
</Grid>
</GroupBox>
<GroupBox Header="Testo Miniature" >
<WrapPanel Orientation="Vertical" >
<RadioButton Content="Aggiungi Scritta" Margin="4,2,4,2" IsChecked="{Binding TestoMinAggiungiScritta}" />
<RadioButton Content="Aggiungi Orario" Margin="4,2,4,2" IsChecked="{Binding TestoMinAggiungiOrario}"/>
<RadioButton Content="Tempo Gara" Margin="4,2,4,2" IsChecked="{Binding TestoMinTempoGara}"/>
<RadioButton Content="Numero Foto" Margin="4,2,4,2" IsChecked="{Binding TestoMinNumeroFoto}"/>
<RadioButton Content="Numero + Tempo" Margin="4,2,4,2" IsChecked="{Binding TestoMinNumeroTempo}"></RadioButton>
</WrapPanel>
</GroupBox>
</WrapPanel>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<CheckBox VerticalAlignment="Center" />
<Label VerticalAlignment="Center" Content="Logo" />
<Image Source="Icons/face-smile-2.png"/>
</StackPanel>
</TabItem.Header>
<WrapPanel>
<GroupBox Header="Logo">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="50" />
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Percorso Immagine"/>
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" Text="{Binding LogoPercorsoImmagine}"/>
<Button Grid.Row="0" Grid.Column="4" Content="..." Command="{Binding ScegliLogoCommand}" />
<Label Grid.Row="1" Grid.Column="0" Content="Altezza" />
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding LogoAltezza}" />
<Label Grid.Row="2" Grid.Column="0" Content="Larghezza" />
<TextBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding LogoLarghezza}" />
<Label Grid.Row="3" Grid.Column="0" Content="Trasparenza (0-100%)" />
<TextBox Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding LogoTrasparenza}" />
<Label Grid.Row="4" Grid.Column="0" Content="Margine (pixel %)" />
<TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding LogoMargine}" />
<Label Grid.Row="5" Grid.Column="0" Content="Posizione Orizzontale" />
<ComboBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" />
<!--todo-->
<Label Grid.Row="6" Grid.Column="0" Content="Posizione Verticale" />
<ComboBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" />
<!--todo-->
<Label Grid.Row="7" Grid.Column="0" Content="Colore Trasparente" />
<Image Grid.Row="7" Grid.Column="1" Width="24" Height="24" HorizontalAlignment="Left" />
<Image Grid.Row="7" Grid.Column="8" Width="24" Height="24" HorizontalAlignment="Right" />
<Image Grid.Row="1" Grid.Column="3" Grid.RowSpan="7" />
</Grid>
</GroupBox>
</WrapPanel>
</TabItem>
</TabControl>
<StackPanel DockPanel.Dock="Right" Orientation="Vertical">
<GroupBox DockPanel.Dock="Right" Header="Statistiche">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Button Content="Carica Impostazioni" Command="{Binding ImportSettingsCommand}"></Button>
<Button Content="Salva Impostazioni" Command="{Binding ExportSettingsCommand}" ></Button>
</StackPanel>
<Button Content="Start" Command="{Binding StartCommand}"></Button>
<Button Content="STOP" Command="{Binding StopCommand}"/>
</StackPanel>
</GroupBox>
</StackPanel>
</DockPanel>
</DockPanel>
</DockPanel>
</Grid>
</Window>
</Controls:MetroWindow>

View file

@ -16,6 +16,7 @@ using System.Windows.Shapes;
using CatalogLib;
using GalaSoft.MvvmLight.Messaging;
using MaddoLibrary.Helpers;
using MahApps.Metro.Controls;
using WPFCatalog.Messages;
namespace WPFCatalog
@ -23,14 +24,14 @@ namespace WPFCatalog
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
public partial class MainWindow
{
public PicSettings GlobalSettings = new PicSettings();
public MainWindow()
{
InitializeComponent();
DataContext = new MainWindowViewModel();
this.DataContext = new MainWindowViewModel();
SetDefaults();

View file

@ -142,7 +142,7 @@ namespace WPFCatalog
if (Directory.Exists(Path.GetDirectoryName(savePath)))
{
Debug.WriteLine(savePath);
FileHelper.WriteToFile(savePath, s);
FileHelper.WriteToFile(savePath, s, false);
Debug.WriteLine(s);
}
@ -687,11 +687,11 @@ namespace WPFCatalog
public string ColoreTestoRGB
{
get { return PicSettings.GetString("coloreTestoRGB", "#000000"); }
{
get { return PicSettings.ColoreTestoRGB; }
set
{
PicSettings.Set("coloreTestoRGB", value);
PicSettings.ColoreTestoRGB = value;
RaisePropertyChanged("ColoreTestoRGB");
}
}
@ -721,10 +721,24 @@ namespace WPFCatalog
}
}
public string TestoApplicareOrizzontale
{
get
{
return PicSettings.TestoApplicareOrizzontale;
}
set
{
PicSettings.TestoApplicareOrizzontale = value;
RaisePropertyChanged("TestoApplicareOrizzontale");
}
}
//todo: bold
//todo: italic
//todo: italic
#endregion
#region Logo

View file

@ -0,0 +1,42 @@
<Controls:MetroWindow x:Name="TestWindow1" x:Class="WPFCatalog.TestWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wpfCatalog="clr-namespace:WPFCatalog"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock"
mc:Ignorable="d"
Title="Image Catalog" Height="466" Width="772"
d:DataContext="{d:DesignInstance wpfCatalog:MainWindowViewModel}"
>
<Grid>
<xcad:DockingManager x:Name="DockingManager">
<xcad:LayoutRoot>
<xcad:LayoutPanel Orientation="Horizontal">
<xcad:LayoutDocumentPane>
<xcad:LayoutDocument Title="Doc1">
<TextBox/>
</xcad:LayoutDocument>
</xcad:LayoutDocumentPane>
<xcad:LayoutAnchorablePane DockWidth="150">
<xcad:LayoutAnchorable Title="Sample Tool Pane">
<TextBox/>
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutPanel>
<xcad:LayoutRoot.LeftSide>
<xcad:LayoutAnchorSide>
<xcad:LayoutAnchorGroup>
<xcad:LayoutAnchorable Title="Autohidden Content">
<TextBox/>
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorGroup>
</xcad:LayoutAnchorSide>
</xcad:LayoutRoot.LeftSide>
</xcad:LayoutRoot>
</xcad:DockingManager>
</Grid>
</Controls:MetroWindow>

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace WPFCatalog
{
/// <summary>
/// Interaction logic for TestWindow.xaml
/// </summary>
public partial class TestWindow
{
public TestWindow()
{
InitializeComponent();
}
}
}

View file

@ -38,6 +38,26 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="GalaSoft.MvvmLight.Extras.WPF45">
@ -46,21 +66,105 @@
<Reference Include="GalaSoft.MvvmLight.WPF45">
<HintPath>..\packages\MvvmLightLibs.4.1.27.1\lib\net45\GalaSoft.MvvmLight.WPF45.dll</HintPath>
</Reference>
<Reference Include="MaddoLibrary.Base.NET45, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\MaddoLibrary.Base.NET45.dll</HintPath>
</Reference>
<Reference Include="MaddoLibrary.WPF.NET46, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\MaddoLibrary.WPF.NET46.dll</HintPath>
</Reference>
<Reference Include="MahApps.Metro, Version=1.4.3.0, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<HintPath>..\packages\MahApps.Metro.1.4.3\lib\net45\MahApps.Metro.dll</HintPath>
</Reference>
<Reference Include="MahApps.Metro.IconPacks, Version=1.7.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MahApps.Metro.IconPacks.1.7.1\lib\net46\MahApps.Metro.IconPacks.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Practices.ServiceLocation">
<HintPath>..\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
</Reference>
<Reference Include="PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="ReachFramework" />
<Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SixLabors.Fonts.0.1.0-alpha0002\lib\netstandard1.3\SixLabors.Fonts.dll</HintPath>
</Reference>
<Reference Include="SixLabors.Shapes, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SixLabors.Shapes.0.1.0-alpha0009\lib\netstandard1.1\SixLabors.Shapes.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
</Reference>
<Reference Include="System.Buffers, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.3.0\lib\netstandard1.1\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.Services.Client" />
<Reference Include="System.Deployment" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Globalization.Calendars, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.IO.Compression.ZipFile, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll</HintPath>
</Reference>
<Reference Include="System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll</HintPath>
</Reference>
<Reference Include="System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll</HintPath>
</Reference>
<Reference Include="System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.3.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Printing" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.3.0\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net46\System.Security.Cryptography.Algorithms.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net46\System.Security.Cryptography.X509Certificates.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.4.1.27.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
<HintPath>..\packages\MahApps.Metro.1.4.3\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
@ -70,6 +174,9 @@
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
</Reference>
<Reference Include="UIAutomationProvider" />
<Reference Include="UIAutomationTypes" />
<Reference Include="WindowsBase" />
@ -99,13 +206,30 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Controls\GeneralSettingsControl.xaml.cs">
<DependentUpon>GeneralSettingsControl.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\TextSettingsControl.xaml.cs">
<DependentUpon>TextSettingsControl.xaml</DependentUpon>
</Compile>
<Compile Include="Converters\MaddoColorConverter.cs" />
<Compile Include="Converters\FontFamilyStringConverter.cs" />
<Compile Include="Messages\FontData.cs" />
<Compile Include="Messages\OpenFontWindowMessage.cs" />
<Compile Include="TestWindow.xaml.cs">
<DependentUpon>TestWindow.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModelBase.cs" />
<Compile Include="ViewModel\MainViewModel.cs" />
<Compile Include="ViewModel\ViewModelLocator.cs" />
<Page Include="Controls\GeneralSettingsControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\TextSettingsControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@ -118,6 +242,10 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="TestWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="MainWindowViewModel.cs" />
@ -171,10 +299,6 @@
<Project>{d27accf2-80fc-4de8-aeb8-351ff076e6d5}</Project>
<Name>CatalogLib</Name>
</ProjectReference>
<ProjectReference Include="..\MaddoLibrary\MaddoLibrary.WPF.NET46\MaddoLibrary.WPF.NET46.csproj">
<Project>{73da19d7-196d-4b16-b610-93250978a607}</Project>
<Name>MaddoLibrary.WPF.NET46</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\document-open-folder.png" />

View file

@ -2,6 +2,61 @@
<packages>
<package id="CommonServiceLocator" version="1.0" targetFramework="net45" />
<package id="Extended.Wpf.Toolkit" version="3.0" targetFramework="net46" />
<package id="MahApps.Metro" version="1.4.3" targetFramework="net46" />
<package id="MahApps.Metro.IconPacks" version="1.7.1" targetFramework="net46" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net46" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net46" />
<package id="MvvmLight" version="4.1.27.1" targetFramework="net45" />
<package id="MvvmLightLibs" version="4.1.27.1" targetFramework="net45" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net46" />
<package id="SixLabors.Fonts" version="0.1.0-alpha0002" targetFramework="net46" />
<package id="SixLabors.Shapes" version="0.1.0-alpha0009" targetFramework="net46" />
<package id="System.AppContext" version="4.3.0" targetFramework="net46" />
<package id="System.Buffers" version="4.3.0" targetFramework="net46" />
<package id="System.Collections" version="4.3.0" targetFramework="net46" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net46" />
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net46" />
<package id="System.Console" version="4.3.0" targetFramework="net46" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net46" />
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net46" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net46" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net46" />
<package id="System.Globalization" version="4.3.0" targetFramework="net46" />
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net46" />
<package id="System.IO" version="4.3.0" targetFramework="net46" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net46" />
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net46" />
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net46" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net46" />
<package id="System.Linq" version="4.3.0" targetFramework="net46" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net46" />
<package id="System.Net.Http" version="4.3.0" targetFramework="net46" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net46" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net46" />
<package id="System.Numerics.Vectors" version="4.3.0" targetFramework="net46" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net46" />
<package id="System.Reflection" version="4.3.0" targetFramework="net46" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net46" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net46" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net46" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net46" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net46" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net46" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net46" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net46" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net46" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net46" />
<package id="System.Threading" version="4.3.0" targetFramework="net46" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net46" />
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net46" />
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net46" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net46" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net46" />
</packages>