diff --git a/SonOfPicasso.Avalonia.sln b/SonOfPicasso.Avalonia.sln new file mode 100644 index 00000000..f977879b --- /dev/null +++ b/SonOfPicasso.Avalonia.sln @@ -0,0 +1,109 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29215.179 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Testing.Common", "src\SonOfPicasso.Testing.Common\SonOfPicasso.Testing.Common.csproj", "{0D73C26E-D1F1-4DE7-8354-9C9549FD2F93}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Core", "src\SonOfPicasso.Core\SonOfPicasso.Core.csproj", "{DD6FAB82-72D4-4556-A4C3-EBCD49C89598}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{30DC3442-C225-4FC5-9439-77BD1B3EE895}" + ProjectSection(SolutionItems) = preProject + appveyor.yml = appveyor.yml + Build.fsx = Build.fsx + codecov.yml = codecov.yml + .chglog\config.yml = .chglog\config.yml + nuget.config = nuget.config + paket.dependencies = paket.dependencies + paket.lock = paket.lock + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{DE25AC0A-8FB7-4D88-8B3A-CDC3EF9AE88F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Tools", "src\SonOfPicasso.Tools\SonOfPicasso.Tools.csproj", "{2BA6995C-ED7F-4636-9DEA-0D8EE2504771}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Data", "src\SonOfPicasso.Data\SonOfPicasso.Data.csproj", "{2096BF8B-3C6C-4CBC-803D-F51B9D5209B3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Data.Tests", "src\SonOfPicasso.Data.Tests\SonOfPicasso.Data.Tests.csproj", "{1D87A79F-C5D4-4EA0-B978-13E942B9CEE9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Core.Tests", "src\SonOfPicasso.Core.Tests\SonOfPicasso.Core.Tests.csproj", "{2F6B9B2C-D228-4563-B74C-12C18E753361}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.UI.Tests", "src\SonOfPicasso.UI.Tests\SonOfPicasso.UI.Tests.csproj", "{9D06ACFE-6ECD-4EC9-9CA9-8D6CCC5C362A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Tools.Tests", "src\SonOfPicasso.Tools.Tests\SonOfPicasso.Tools.Tests.csproj", "{46317863-37D4-46EB-AEBD-57AD986F8EEB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Integration.Tests", "src\SonOfPicasso.Integration.Tests\SonOfPicasso.Integration.Tests.csproj", "{BC32339A-4C41-420C-8812-E84FD2608954}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.UI.Avalonia", "src\SonOfPicasso.UI.Avalonia\SonOfPicasso.UI.Avalonia.csproj", "{AB7C1153-7474-4591-8708-EE1A4EA34E1E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.UI", "src\SonOfPicasso.UI\SonOfPicasso.UI.csproj", "{7599C0FD-62B6-458F-983E-6930BFCBCF71}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0D73C26E-D1F1-4DE7-8354-9C9549FD2F93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D73C26E-D1F1-4DE7-8354-9C9549FD2F93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D73C26E-D1F1-4DE7-8354-9C9549FD2F93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D73C26E-D1F1-4DE7-8354-9C9549FD2F93}.Release|Any CPU.Build.0 = Release|Any CPU + {DD6FAB82-72D4-4556-A4C3-EBCD49C89598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD6FAB82-72D4-4556-A4C3-EBCD49C89598}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD6FAB82-72D4-4556-A4C3-EBCD49C89598}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD6FAB82-72D4-4556-A4C3-EBCD49C89598}.Release|Any CPU.Build.0 = Release|Any CPU + {2BA6995C-ED7F-4636-9DEA-0D8EE2504771}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2BA6995C-ED7F-4636-9DEA-0D8EE2504771}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2BA6995C-ED7F-4636-9DEA-0D8EE2504771}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2BA6995C-ED7F-4636-9DEA-0D8EE2504771}.Release|Any CPU.Build.0 = Release|Any CPU + {2096BF8B-3C6C-4CBC-803D-F51B9D5209B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2096BF8B-3C6C-4CBC-803D-F51B9D5209B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2096BF8B-3C6C-4CBC-803D-F51B9D5209B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2096BF8B-3C6C-4CBC-803D-F51B9D5209B3}.Release|Any CPU.Build.0 = Release|Any CPU + {1D87A79F-C5D4-4EA0-B978-13E942B9CEE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D87A79F-C5D4-4EA0-B978-13E942B9CEE9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D87A79F-C5D4-4EA0-B978-13E942B9CEE9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D87A79F-C5D4-4EA0-B978-13E942B9CEE9}.Release|Any CPU.Build.0 = Release|Any CPU + {2F6B9B2C-D228-4563-B74C-12C18E753361}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F6B9B2C-D228-4563-B74C-12C18E753361}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F6B9B2C-D228-4563-B74C-12C18E753361}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F6B9B2C-D228-4563-B74C-12C18E753361}.Release|Any CPU.Build.0 = Release|Any CPU + {9D06ACFE-6ECD-4EC9-9CA9-8D6CCC5C362A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D06ACFE-6ECD-4EC9-9CA9-8D6CCC5C362A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D06ACFE-6ECD-4EC9-9CA9-8D6CCC5C362A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D06ACFE-6ECD-4EC9-9CA9-8D6CCC5C362A}.Release|Any CPU.Build.0 = Release|Any CPU + {46317863-37D4-46EB-AEBD-57AD986F8EEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46317863-37D4-46EB-AEBD-57AD986F8EEB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46317863-37D4-46EB-AEBD-57AD986F8EEB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46317863-37D4-46EB-AEBD-57AD986F8EEB}.Release|Any CPU.Build.0 = Release|Any CPU + {BC32339A-4C41-420C-8812-E84FD2608954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC32339A-4C41-420C-8812-E84FD2608954}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC32339A-4C41-420C-8812-E84FD2608954}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC32339A-4C41-420C-8812-E84FD2608954}.Release|Any CPU.Build.0 = Release|Any CPU + {AB7C1153-7474-4591-8708-EE1A4EA34E1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AB7C1153-7474-4591-8708-EE1A4EA34E1E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AB7C1153-7474-4591-8708-EE1A4EA34E1E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AB7C1153-7474-4591-8708-EE1A4EA34E1E}.Release|Any CPU.Build.0 = Release|Any CPU + {7599C0FD-62B6-458F-983E-6930BFCBCF71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7599C0FD-62B6-458F-983E-6930BFCBCF71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7599C0FD-62B6-458F-983E-6930BFCBCF71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7599C0FD-62B6-458F-983E-6930BFCBCF71}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {0D73C26E-D1F1-4DE7-8354-9C9549FD2F93} = {12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A} + {2BA6995C-ED7F-4636-9DEA-0D8EE2504771} = {DE25AC0A-8FB7-4D88-8B3A-CDC3EF9AE88F} + {1D87A79F-C5D4-4EA0-B978-13E942B9CEE9} = {12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A} + {2F6B9B2C-D228-4563-B74C-12C18E753361} = {12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A} + {9D06ACFE-6ECD-4EC9-9CA9-8D6CCC5C362A} = {12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A} + {46317863-37D4-46EB-AEBD-57AD986F8EEB} = {12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A} + {BC32339A-4C41-420C-8812-E84FD2608954} = {12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2C01583D-05D7-4F03-A86C-ECF79DA041D0} + EndGlobalSection +EndGlobal diff --git a/SonOfPicasso.sln b/SonOfPicasso.sln index 72a94c2b..aebb360c 100644 --- a/SonOfPicasso.sln +++ b/SonOfPicasso.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29215.179 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.UI", "src\SonOfPicasso.UI\SonOfPicasso.UI.csproj", "{282F684E-B70E-4C4B-920A-06D3E96F3109}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{12E2CEF6-EB9D-412F-98E3-ECBBBD00A29A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Testing.Common", "src\SonOfPicasso.Testing.Common\SonOfPicasso.Testing.Common.csproj", "{0D73C26E-D1F1-4DE7-8354-9C9549FD2F93}" @@ -39,16 +37,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Tools.Tests", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.Integration.Tests", "src\SonOfPicasso.Integration.Tests\SonOfPicasso.Integration.Tests.csproj", "{BC32339A-4C41-420C-8812-E84FD2608954}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.UI.Avalonia", "src\SonOfPicasso.UI.Avalonia\SonOfPicasso.UI.Avalonia.csproj", "{AB7C1153-7474-4591-8708-EE1A4EA34E1E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonOfPicasso.UI.WPF", "src\SonOfPicasso.UI.WPF\SonOfPicasso.UI.WPF.csproj", "{AFAD5D51-9063-46BE-B489-9222C9C1BE2B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SonOfPicasso.UI", "src\SonOfPicasso.UI\SonOfPicasso.UI.csproj", "{7599C0FD-62B6-458F-983E-6930BFCBCF71}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {282F684E-B70E-4C4B-920A-06D3E96F3109}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {282F684E-B70E-4C4B-920A-06D3E96F3109}.Debug|Any CPU.Build.0 = Debug|Any CPU - {282F684E-B70E-4C4B-920A-06D3E96F3109}.Release|Any CPU.ActiveCfg = Release|Any CPU - {282F684E-B70E-4C4B-920A-06D3E96F3109}.Release|Any CPU.Build.0 = Release|Any CPU {0D73C26E-D1F1-4DE7-8354-9C9549FD2F93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0D73C26E-D1F1-4DE7-8354-9C9549FD2F93}.Debug|Any CPU.Build.0 = Debug|Any CPU {0D73C26E-D1F1-4DE7-8354-9C9549FD2F93}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -85,6 +85,18 @@ Global {BC32339A-4C41-420C-8812-E84FD2608954}.Debug|Any CPU.Build.0 = Debug|Any CPU {BC32339A-4C41-420C-8812-E84FD2608954}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC32339A-4C41-420C-8812-E84FD2608954}.Release|Any CPU.Build.0 = Release|Any CPU + {AB7C1153-7474-4591-8708-EE1A4EA34E1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AB7C1153-7474-4591-8708-EE1A4EA34E1E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AB7C1153-7474-4591-8708-EE1A4EA34E1E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AB7C1153-7474-4591-8708-EE1A4EA34E1E}.Release|Any CPU.Build.0 = Release|Any CPU + {AFAD5D51-9063-46BE-B489-9222C9C1BE2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AFAD5D51-9063-46BE-B489-9222C9C1BE2B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFAD5D51-9063-46BE-B489-9222C9C1BE2B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFAD5D51-9063-46BE-B489-9222C9C1BE2B}.Release|Any CPU.Build.0 = Release|Any CPU + {7599C0FD-62B6-458F-983E-6930BFCBCF71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7599C0FD-62B6-458F-983E-6930BFCBCF71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7599C0FD-62B6-458F-983E-6930BFCBCF71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7599C0FD-62B6-458F-983E-6930BFCBCF71}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/nuget.config b/nuget.config index 7f94dd9f..7fe30066 100644 --- a/nuget.config +++ b/nuget.config @@ -2,6 +2,7 @@ + diff --git a/src/SonOfPicasso.Integration.Tests/SonOfPicasso.Integration.Tests.csproj b/src/SonOfPicasso.Integration.Tests/SonOfPicasso.Integration.Tests.csproj index 42b2ee9c..49240d26 100644 --- a/src/SonOfPicasso.Integration.Tests/SonOfPicasso.Integration.Tests.csproj +++ b/src/SonOfPicasso.Integration.Tests/SonOfPicasso.Integration.Tests.csproj @@ -29,6 +29,7 @@ + diff --git a/src/SonOfPicasso.UI.Avalonia/.gitignore b/src/SonOfPicasso.UI.Avalonia/.gitignore new file mode 100644 index 00000000..dbe7c8f7 --- /dev/null +++ b/src/SonOfPicasso.UI.Avalonia/.gitignore @@ -0,0 +1,337 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +## Visual Studio Code specific files and folder +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.jsons + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ diff --git a/src/SonOfPicasso.UI.Avalonia/App.xaml b/src/SonOfPicasso.UI.Avalonia/App.xaml new file mode 100644 index 00000000..fda6cfa0 --- /dev/null +++ b/src/SonOfPicasso.UI.Avalonia/App.xaml @@ -0,0 +1,8 @@ + + + + + + diff --git a/src/SonOfPicasso.UI.Avalonia/App.xaml.cs b/src/SonOfPicasso.UI.Avalonia/App.xaml.cs new file mode 100644 index 00000000..151cc8a5 --- /dev/null +++ b/src/SonOfPicasso.UI.Avalonia/App.xaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Markup.Xaml; + +namespace SonOfPicasso.UI.Avalonia +{ + public class App : Application + { + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + } + } +} \ No newline at end of file diff --git a/src/SonOfPicasso.UI.Avalonia/Program.cs b/src/SonOfPicasso.UI.Avalonia/Program.cs new file mode 100644 index 00000000..3ab27a93 --- /dev/null +++ b/src/SonOfPicasso.UI.Avalonia/Program.cs @@ -0,0 +1,47 @@ +using System; +using Autofac; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Logging.Serilog; +using Microsoft.EntityFrameworkCore; +using SonOfPicasso.Data.Repository; +using SonOfPicasso.UI.Avalonia.Windows; +using SonOfPicasso.UI.ViewModels; + +namespace SonOfPicasso.UI.Avalonia +{ + class Program + { + private const string ApplicationName = "SonOfPicasso"; + + public static void Main(string[] args) => BuildAvaloniaApp().Start(AppMain, args); + + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure() + .UsePlatformDetect() + .LogToDebug(); + + private static void AppMain(Application app, string[] args) + { + var containerBuilder = AppConfiguration.Configure(Program.ApplicationName); + + containerBuilder.RegisterAssemblyTypes(typeof(Program).Assembly) + .Where(type => type.Namespace.StartsWith("SonOfPicasso.UI.Avalonia.Windows") + || type.Namespace.StartsWith("SonOfPicasso.UI.Avalonia.Views")) + .AsImplementedInterfaces() + .AsSelf(); + + var container = containerBuilder.Build(); + + AppConfiguration.ConfigureContainer(container); + + var dataContext = container.Resolve(); + dataContext.Database.Migrate(); + + var mainWindow = container.Resolve(); + mainWindow.ViewModel = container.Resolve(); + + app.Run(mainWindow); + } + } +} diff --git a/src/SonOfPicasso.UI.Avalonia/SonOfPicasso.UI.Avalonia.csproj b/src/SonOfPicasso.UI.Avalonia/SonOfPicasso.UI.Avalonia.csproj new file mode 100644 index 00000000..37a8f368 --- /dev/null +++ b/src/SonOfPicasso.UI.Avalonia/SonOfPicasso.UI.Avalonia.csproj @@ -0,0 +1,27 @@ + + + WinExe + netcoreapp3.0 + + + + %(Filename) + + + Designer + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + diff --git a/src/SonOfPicasso.UI.Avalonia/Windows/MainWindow.xaml b/src/SonOfPicasso.UI.Avalonia/Windows/MainWindow.xaml new file mode 100644 index 00000000..8db3f477 --- /dev/null +++ b/src/SonOfPicasso.UI.Avalonia/Windows/MainWindow.xaml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SonOfPicasso.UI.Avalonia/Windows/MainWindow.xaml.cs b/src/SonOfPicasso.UI.Avalonia/Windows/MainWindow.xaml.cs new file mode 100644 index 00000000..17cf621a --- /dev/null +++ b/src/SonOfPicasso.UI.Avalonia/Windows/MainWindow.xaml.cs @@ -0,0 +1,20 @@ +using Avalonia.Controls; +using Avalonia.Markup.Xaml; +using Avalonia.ReactiveUI; +using SonOfPicasso.UI.ViewModels; + +namespace SonOfPicasso.UI.Avalonia.Windows +{ + public class MainWindow : ReactiveWindow + { + public MainWindow() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } + } +} \ No newline at end of file diff --git a/src/SonOfPicasso.UI.Avalonia/nuget.config b/src/SonOfPicasso.UI.Avalonia/nuget.config new file mode 100644 index 00000000..7c07e225 --- /dev/null +++ b/src/SonOfPicasso.UI.Avalonia/nuget.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/SonOfPicasso.UI.Tests/SonOfPicasso.UI.Tests.csproj b/src/SonOfPicasso.UI.Tests/SonOfPicasso.UI.Tests.csproj index c11191ac..9ace45e4 100644 --- a/src/SonOfPicasso.UI.Tests/SonOfPicasso.UI.Tests.csproj +++ b/src/SonOfPicasso.UI.Tests/SonOfPicasso.UI.Tests.csproj @@ -10,6 +10,12 @@ $(MSBuildWarningsAsMessages);NETSDK1107 + + + + + + @@ -36,7 +42,6 @@ - @@ -53,8 +58,4 @@ - - - - diff --git a/src/SonOfPicasso.UI/App.xaml b/src/SonOfPicasso.UI.WPF/App.xaml similarity index 94% rename from src/SonOfPicasso.UI/App.xaml rename to src/SonOfPicasso.UI.WPF/App.xaml index 8ed223cb..de7e7bd9 100644 --- a/src/SonOfPicasso.UI/App.xaml +++ b/src/SonOfPicasso.UI.WPF/App.xaml @@ -1,8 +1,7 @@ - + xmlns:converters="clr-namespace:SonOfPicasso.UI.Converters;assembly=SonOfPicasso.UI"> diff --git a/src/SonOfPicasso.UI.WPF/App.xaml.cs b/src/SonOfPicasso.UI.WPF/App.xaml.cs new file mode 100644 index 00000000..201f4ae5 --- /dev/null +++ b/src/SonOfPicasso.UI.WPF/App.xaml.cs @@ -0,0 +1,50 @@ +using System.Windows; +using Akavache; +using Autofac; +using Microsoft.EntityFrameworkCore; +using SonOfPicasso.Data.Repository; +using SonOfPicasso.UI.ViewModels; +using SonOfPicasso.UI.WPF.Windows; + +namespace SonOfPicasso.UI.WPF +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + private const string ApplicationName = "SonOfPicasso"; + + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + var containerBuilder = AppConfiguration.Configure(App.ApplicationName); + + containerBuilder.RegisterAssemblyTypes(GetType().Assembly) + .Where(type => type.Namespace.StartsWith("SonOfPicasso.UI.WPF.Windows") + || type.Namespace.StartsWith("SonOfPicasso.UI.WPF.Views")) + .AsImplementedInterfaces() + .AsSelf(); + + var container = containerBuilder.Build(); + + AppConfiguration.ConfigureContainer(container); + + var dataContext = container.Resolve(); + dataContext.Database.Migrate(); + + var mainWindow = container.Resolve(); + + mainWindow.ViewModel = container.Resolve(); + mainWindow.Show(); + } + + protected override void OnExit(ExitEventArgs e) + { + BlobCache.Shutdown().Wait(); + + base.OnExit(e); + } + } +} \ No newline at end of file diff --git a/src/SonOfPicasso.UI/Converters/AlbumContextMenuStyleSelector.cs b/src/SonOfPicasso.UI.WPF/Converters/AlbumContextMenuStyleSelector.cs similarity index 94% rename from src/SonOfPicasso.UI/Converters/AlbumContextMenuStyleSelector.cs rename to src/SonOfPicasso.UI.WPF/Converters/AlbumContextMenuStyleSelector.cs index 995affa5..59b4368d 100644 --- a/src/SonOfPicasso.UI/Converters/AlbumContextMenuStyleSelector.cs +++ b/src/SonOfPicasso.UI.WPF/Converters/AlbumContextMenuStyleSelector.cs @@ -2,7 +2,7 @@ using System.Windows.Controls; using SonOfPicasso.UI.ViewModels; -namespace SonOfPicasso.UI.Converters +namespace SonOfPicasso.UI.WPF.Converters { class AlbumContextMenuStyleSelector : StyleSelector { diff --git a/src/SonOfPicasso.UI/Properties/AssemblyInfo.cs b/src/SonOfPicasso.UI.WPF/Properties/AssemblyInfo.cs similarity index 100% rename from src/SonOfPicasso.UI/Properties/AssemblyInfo.cs rename to src/SonOfPicasso.UI.WPF/Properties/AssemblyInfo.cs diff --git a/src/SonOfPicasso.UI/Properties/Resources.Designer.cs b/src/SonOfPicasso.UI.WPF/Properties/Resources.Designer.cs similarity index 100% rename from src/SonOfPicasso.UI/Properties/Resources.Designer.cs rename to src/SonOfPicasso.UI.WPF/Properties/Resources.Designer.cs diff --git a/src/SonOfPicasso.UI/Properties/Resources.resx b/src/SonOfPicasso.UI.WPF/Properties/Resources.resx similarity index 100% rename from src/SonOfPicasso.UI/Properties/Resources.resx rename to src/SonOfPicasso.UI.WPF/Properties/Resources.resx diff --git a/src/SonOfPicasso.UI/Properties/Settings.Designer.cs b/src/SonOfPicasso.UI.WPF/Properties/Settings.Designer.cs similarity index 100% rename from src/SonOfPicasso.UI/Properties/Settings.Designer.cs rename to src/SonOfPicasso.UI.WPF/Properties/Settings.Designer.cs diff --git a/src/SonOfPicasso.UI/Properties/Settings.settings b/src/SonOfPicasso.UI.WPF/Properties/Settings.settings similarity index 100% rename from src/SonOfPicasso.UI/Properties/Settings.settings rename to src/SonOfPicasso.UI.WPF/Properties/Settings.settings diff --git a/src/SonOfPicasso.UI/Properties/launchSettings.json b/src/SonOfPicasso.UI.WPF/Properties/launchSettings.json similarity index 87% rename from src/SonOfPicasso.UI/Properties/launchSettings.json rename to src/SonOfPicasso.UI.WPF/Properties/launchSettings.json index d58f3e99..82b6896b 100644 --- a/src/SonOfPicasso.UI/Properties/launchSettings.json +++ b/src/SonOfPicasso.UI.WPF/Properties/launchSettings.json @@ -1,13 +1,13 @@ { "profiles": { - "SonOfPicasso.UI": { + "SonOfPicasso.UI.WPF": { "commandName": "Project", "environmentVariables": { "SonOfPicasso_CachePath": "$(SolutionDir)cache\\", "SonOfPicasso_DatabasePath": "$(SolutionDir)db\\development.db" } }, - "SonOfPicasso.UI Verbose Logs": { + "SonOfPicasso.UI.WPF Verbose Logs": { "commandName": "Project", "environmentVariables": { "SonOfPicasso_CachePath": "$(SolutionDir)cache\\", diff --git a/src/SonOfPicasso.UI.WPF/SonOfPicasso.UI.WPF.csproj b/src/SonOfPicasso.UI.WPF/SonOfPicasso.UI.WPF.csproj new file mode 100644 index 00000000..8ed96c75 --- /dev/null +++ b/src/SonOfPicasso.UI.WPF/SonOfPicasso.UI.WPF.csproj @@ -0,0 +1,63 @@ + + + + WinExe + netcoreapp3.0 + true + false + SonOfPicasso.UI.WPF + + + + DEBUG;TRACE + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SonOfPicasso.UI/Styles.cs b/src/SonOfPicasso.UI.WPF/Styles.cs similarity index 94% rename from src/SonOfPicasso.UI/Styles.cs rename to src/SonOfPicasso.UI.WPF/Styles.cs index 5e3783a9..79c7e7a9 100644 --- a/src/SonOfPicasso.UI/Styles.cs +++ b/src/SonOfPicasso.UI.WPF/Styles.cs @@ -1,7 +1,7 @@ using System.Collections.Concurrent; using System.Windows; -namespace SonOfPicasso.UI +namespace SonOfPicasso.UI.WPF { public static class Styles { diff --git a/src/SonOfPicasso.UI/Views/TrayImageView.xaml b/src/SonOfPicasso.UI.WPF/Views/TrayImageView.xaml similarity index 88% rename from src/SonOfPicasso.UI/Views/TrayImageView.xaml rename to src/SonOfPicasso.UI.WPF/Views/TrayImageView.xaml index 5843e7ee..407218c8 100644 --- a/src/SonOfPicasso.UI/Views/TrayImageView.xaml +++ b/src/SonOfPicasso.UI.WPF/Views/TrayImageView.xaml @@ -1,11 +1,11 @@  diff --git a/src/SonOfPicasso.UI/Views/TrayImageView.xaml.cs b/src/SonOfPicasso.UI.WPF/Views/TrayImageView.xaml.cs similarity index 95% rename from src/SonOfPicasso.UI/Views/TrayImageView.xaml.cs rename to src/SonOfPicasso.UI.WPF/Views/TrayImageView.xaml.cs index dc8f98b7..6b5573b7 100644 --- a/src/SonOfPicasso.UI/Views/TrayImageView.xaml.cs +++ b/src/SonOfPicasso.UI.WPF/Views/TrayImageView.xaml.cs @@ -5,9 +5,8 @@ using SonOfPicasso.Core.Interfaces; using SonOfPicasso.Core.Scheduling; using SonOfPicasso.UI.ViewModels; -using Splat; -namespace SonOfPicasso.UI.Views +namespace SonOfPicasso.UI.WPF.Views { /// /// Interaction logic for TrayImageView.xaml diff --git a/src/SonOfPicasso.UI/Windows/Dialogs/AddAlbumWindow.xaml b/src/SonOfPicasso.UI.WPF/Windows/Dialogs/AddAlbumWindow.xaml similarity index 95% rename from src/SonOfPicasso.UI/Windows/Dialogs/AddAlbumWindow.xaml rename to src/SonOfPicasso.UI.WPF/Windows/Dialogs/AddAlbumWindow.xaml index 993be44b..4cf73374 100644 --- a/src/SonOfPicasso.UI/Windows/Dialogs/AddAlbumWindow.xaml +++ b/src/SonOfPicasso.UI.WPF/Windows/Dialogs/AddAlbumWindow.xaml @@ -1,10 +1,10 @@ - diff --git a/src/SonOfPicasso.UI/Windows/Dialogs/AddAlbumWindow.xaml.cs b/src/SonOfPicasso.UI.WPF/Windows/Dialogs/AddAlbumWindow.xaml.cs similarity index 95% rename from src/SonOfPicasso.UI/Windows/Dialogs/AddAlbumWindow.xaml.cs rename to src/SonOfPicasso.UI.WPF/Windows/Dialogs/AddAlbumWindow.xaml.cs index e40a3163..c2232bfa 100644 --- a/src/SonOfPicasso.UI/Windows/Dialogs/AddAlbumWindow.xaml.cs +++ b/src/SonOfPicasso.UI.WPF/Windows/Dialogs/AddAlbumWindow.xaml.cs @@ -1,13 +1,11 @@ -using System; -using System.Reactive; +using System.Reactive; using System.Reactive.Linq; -using System.Windows; using ReactiveUI; using ReactiveUI.Validation.Extensions; using SonOfPicasso.Core.Scheduling; using SonOfPicasso.UI.ViewModels; -namespace SonOfPicasso.UI.Windows.Dialogs +namespace SonOfPicasso.UI.WPF.Windows.Dialogs { /// /// Interaction logic for AddAlbumWindow.xaml diff --git a/src/SonOfPicasso.UI/Windows/Dialogs/FolderManagementWindow.xaml b/src/SonOfPicasso.UI.WPF/Windows/Dialogs/FolderManagementWindow.xaml similarity index 97% rename from src/SonOfPicasso.UI/Windows/Dialogs/FolderManagementWindow.xaml rename to src/SonOfPicasso.UI.WPF/Windows/Dialogs/FolderManagementWindow.xaml index aae6b474..eef0e35c 100644 --- a/src/SonOfPicasso.UI/Windows/Dialogs/FolderManagementWindow.xaml +++ b/src/SonOfPicasso.UI.WPF/Windows/Dialogs/FolderManagementWindow.xaml @@ -1,13 +1,12 @@  /// Interaction logic for AddAlbumWindow.xaml diff --git a/src/SonOfPicasso.UI/Windows/MainWindow.xaml b/src/SonOfPicasso.UI.WPF/Windows/MainWindow.xaml similarity index 75% rename from src/SonOfPicasso.UI/Windows/MainWindow.xaml rename to src/SonOfPicasso.UI.WPF/Windows/MainWindow.xaml index 0deb42ab..965094c3 100644 --- a/src/SonOfPicasso.UI/Windows/MainWindow.xaml +++ b/src/SonOfPicasso.UI.WPF/Windows/MainWindow.xaml @@ -1,22 +1,22 @@  + - - + @@ -51,7 +51,7 @@ + ItemsSource="{Binding Source={StaticResource ImageContainersViewSource}}"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SonOfPicasso.UI/Windows/MainWindow.xaml.cs b/src/SonOfPicasso.UI.WPF/Windows/MainWindow.xaml.cs similarity index 70% rename from src/SonOfPicasso.UI/Windows/MainWindow.xaml.cs rename to src/SonOfPicasso.UI.WPF/Windows/MainWindow.xaml.cs index 4ba8038a..70dbc708 100644 --- a/src/SonOfPicasso.UI/Windows/MainWindow.xaml.cs +++ b/src/SonOfPicasso.UI.WPF/Windows/MainWindow.xaml.cs @@ -24,12 +24,12 @@ using SonOfPicasso.UI.Extensions; using SonOfPicasso.UI.ViewModels; using SonOfPicasso.UI.ViewModels.FolderRules; -using SonOfPicasso.UI.Windows.Dialogs; +using SonOfPicasso.UI.WPF.Windows.Dialogs; using ListViewItem = System.Windows.Controls.ListViewItem; using MenuItem = System.Windows.Controls.MenuItem; using MessageBox = System.Windows.MessageBox; -namespace SonOfPicasso.UI.Windows +namespace SonOfPicasso.UI.WPF.Windows { /// /// Interaction logic for MainWindow.xaml @@ -43,12 +43,12 @@ public partial class MainWindow : ReactiveWindow private readonly IFileSystem _fileSystem; private readonly Func _folderManagementViewModelFactory; private readonly Func _folderManagementWindowFactory; - private readonly CollectionViewSource _imageCollectionViewSource; - private readonly CollectionViewSource _imageContainersViewSource; + private readonly CollectionViewSource _groupedImageContainersViewSource; private readonly IImageLoadingService _imageLoadingService; private readonly ILogger _logger; private readonly ISchedulerProvider _schedulerProvider; - private MemoryCache memoryCache; + private readonly MemoryCache memoryCache; + private readonly CollectionViewSource _imageContainersViewSource; public MainWindow(ILogger logger, IEnvironmentService environmentService, IFileSystem fileSystem, ISchedulerProvider schedulerProvider, @@ -71,39 +71,15 @@ public MainWindow(ILogger logger, IEnvironmentService environmentService, IFileS InitializeComponent(); memoryCache = new MemoryCache(new MemoryCacheOptions()); - _imageCollectionViewSource = (CollectionViewSource) FindResource("ImagesCollectionViewSource"); _imageContainersViewSource = (CollectionViewSource) FindResource("ImageContainersViewSource"); + _groupedImageContainersViewSource = (CollectionViewSource) FindResource("GroupedImageContainersViewSource"); _albumImageContainersViewSource = (CollectionViewSource) FindResource("AlbumImageContainersViewSource"); this.WhenActivated(d => { - _imageCollectionViewSource.Source = ViewModel.Images; - - var propertyGroupDescription = - new PropertyGroupDescription(nameof(ImageViewModel.ImageContainerViewModel)); - - _imageCollectionViewSource.GroupDescriptions.Add(propertyGroupDescription); - _imageCollectionViewSource.SortDescriptions.Add(new SortDescription( - nameof(ImageViewModel.ContainerType), - ListSortDirection.Ascending)); - _imageCollectionViewSource.SortDescriptions.Add(new SortDescription( - nameof(ImageViewModel.ContainerDate), - ListSortDirection.Descending)); - _imageCollectionViewSource.SortDescriptions.Add(new SortDescription(nameof(ImageViewModel.ExifDate), - ListSortDirection.Ascending)); - - _imageCollectionViewSource.IsLiveFilteringRequested = true; - _imageCollectionViewSource.IsLiveGroupingRequested = true; - _imageCollectionViewSource.IsLiveSortingRequested = true; - _imageContainersViewSource.Source = ViewModel.ImageContainers; - _imageContainersViewSource.GroupDescriptions.Add( - new PropertyGroupDescription(nameof(ImageContainerViewModel.ContainerType))); - _imageContainersViewSource.GroupDescriptions.Add( - new PropertyGroupDescription(nameof(ImageContainerViewModel.Year))); _imageContainersViewSource.SortDescriptions.Add( - new SortDescription(nameof(ImageContainerViewModel.ContainerType), - ListSortDirection.Ascending)); + new SortDescription(nameof(ImageContainerViewModel.ContainerType), ListSortDirection.Ascending)); _imageContainersViewSource.SortDescriptions.Add( new SortDescription(nameof(ImageContainerViewModel.Date), ListSortDirection.Descending)); @@ -111,6 +87,20 @@ public MainWindow(ILogger logger, IEnvironmentService environmentService, IFileS _imageContainersViewSource.IsLiveGroupingRequested = true; _imageContainersViewSource.IsLiveSortingRequested = true; + _groupedImageContainersViewSource.Source = ViewModel.ImageContainers; + _groupedImageContainersViewSource.GroupDescriptions.Add( + new PropertyGroupDescription(nameof(ImageContainerViewModel.ContainerType))); + _groupedImageContainersViewSource.GroupDescriptions.Add( + new PropertyGroupDescription(nameof(ImageContainerViewModel.Year))); + _groupedImageContainersViewSource.SortDescriptions.Add( + new SortDescription(nameof(ImageContainerViewModel.ContainerType), ListSortDirection.Ascending)); + _groupedImageContainersViewSource.SortDescriptions.Add( + new SortDescription(nameof(ImageContainerViewModel.Date), ListSortDirection.Descending)); + + _groupedImageContainersViewSource.IsLiveFilteringRequested = true; + _groupedImageContainersViewSource.IsLiveGroupingRequested = true; + _groupedImageContainersViewSource.IsLiveSortingRequested = true; + _albumImageContainersViewSource.Source = ViewModel.AlbumImageContainers; _albumImageContainersViewSource.SortDescriptions.Add( new SortDescription(nameof(ImageContainerViewModel.Year), ListSortDirection.Descending)); @@ -123,81 +113,6 @@ public MainWindow(ILogger logger, IEnvironmentService environmentService, IFileS ImagesListScrollViewer = ImagesList.FindVisualChildren().First(); - var currentViewportWidth = 0; - ImagesListScrollViewer - .WhenAny( - scrollViewer => scrollViewer.ViewportWidth, - change => change.Value) - .Select(value => Math.Max(1, (int)(value / 310))) - .Subscribe(i => currentViewportWidth = i) - .DisposeWith(d); - - ContainersList.Events() - .SelectionChanged - .Subscribe(args => - { - var imageContainerViewModel = args.AddedItems - .Cast() - .FirstOrDefault(); - - if (imageContainerViewModel == null) return; - - var (groupIndex, rowIndex) = _imageCollectionViewSource - .View - .Groups - .Cast() - .SelectMany((group, g) => group.Items - .Cast() - .Batch(currentViewportWidth) - .Select(models => (models, g))) - .Select((tuple, r) => (tuple.models, tuple.g, r)) - .Where(tuple => - tuple.models.Any(model => model.ContainerKey == imageContainerViewModel.ContainerKey)) - .Select(tuple => (tuple.g, tuple.r)) - .FirstOrDefault(); - - ImagesListScrollViewer.ScrollToVerticalOffset(rowIndex * 304 + groupIndex * 25.96); - }); - - Observable.Create(observer => - { - var disposable1 = _imageCollectionViewSource - .View - .ObserveCollectionChanges() - .Select(pattern => (ICollectionView) pattern.Sender) - .Select(view => (CollectionViewGroup) view.Groups.FirstOrDefault()) - .Select(group => (ImageViewModel) group?.Items.FirstOrDefault()) - .DistinctUntilChanged(model => model?.ContainerKey) - .Subscribe(imageViewModel => { observer.OnNext(imageViewModel?.ContainerKey); }); - - var disposable2 = ImagesListScrollViewer - .WhenAny( - scrollViewer => scrollViewer.VerticalOffset, - observedChange1 => observedChange1.Value) - .Skip(1) - .DistinctUntilChanged(verticalOffset => (int) (verticalOffset / 30)) - .Select(verticalOffset => - { - var listViewItem = GetFirstVisibleListViewItem(ImagesListScrollViewer); - var imageViewModel1 = (ImageViewModel) listViewItem?.DataContext; - return imageViewModel1?.ImageContainerViewModel; - }) - .DistinctUntilChanged() - .Subscribe(model => - { - if (disposable1 != null) - { - disposable1.Dispose(); - disposable1 = null; - } - - observer.OnNext(model?.ContainerKey); - }); - - return new CompositeDisposable(disposable1, disposable2); - }) - .BindTo(ViewModel, model => model.VisibleItemContainerKey); - this.BindCommand(ViewModel, model => model.AddFolder, window => window.AddFolder) @@ -249,14 +164,14 @@ public MainWindow(ILogger logger, IEnvironmentService environmentService, IFileS ea.RemovedItems.Cast()); }).DisposeWith(d); - ViewModel.UnselectImage - .ObserveOn(_schedulerProvider.MainThreadScheduler) - .Subscribe(imageViewModels => - { - foreach (var imageViewModel in imageViewModels) - ImagesList.SelectedItems.Remove(imageViewModel); - }) - .DisposeWith(d); +// ViewModel.UnselectImage +// .ObserveOn(_schedulerProvider.MainThreadScheduler) +// .Subscribe(imageViewModels => +// { +// foreach (var imageViewModel in imageViewModels) +// ImagesList.SelectedItems.Remove(imageViewModel); +// }) +// .DisposeWith(d); TrayImagesList.Events().SelectionChanged.Subscribe(ea => { @@ -267,14 +182,14 @@ public MainWindow(ILogger logger, IEnvironmentService environmentService, IFileS } }).DisposeWith(d); - ViewModel.UnselectTrayImage - .ObserveOn(_schedulerProvider.MainThreadScheduler) - .Subscribe(trayImageViewModels => - { - foreach (var trayImageViewModel in trayImageViewModels) - TrayImagesList.SelectedItems.Remove(trayImageViewModel); - }) - .DisposeWith(d); +// ViewModel.UnselectTrayImage +// .ObserveOn(_schedulerProvider.MainThreadScheduler) +// .Subscribe(trayImageViewModels => +// { +// foreach (var trayImageViewModel in trayImageViewModels) +// TrayImagesList.SelectedItems.Remove(trayImageViewModel); +// }) +// .DisposeWith(d); this.OneWayBind(ViewModel, model => model.TrayImages, diff --git a/src/SonOfPicasso.UI/App.xaml.cs b/src/SonOfPicasso.UI/AppConfiguration.cs similarity index 82% rename from src/SonOfPicasso.UI/App.xaml.cs rename to src/SonOfPicasso.UI/AppConfiguration.cs index 3522a077..e9bbffbe 100644 --- a/src/SonOfPicasso.UI/App.xaml.cs +++ b/src/SonOfPicasso.UI/AppConfiguration.cs @@ -1,7 +1,6 @@ using System; using System.IO.Abstractions; using System.Linq; -using System.Windows; using Akavache; using Autofac; using AutofacSerilogIntegration; @@ -17,9 +16,6 @@ using SonOfPicasso.Core.Services; using SonOfPicasso.Data.Repository; using SonOfPicasso.Data.Services; -using SonOfPicasso.UI.Services; -using SonOfPicasso.UI.ViewModels; -using SonOfPicasso.UI.Windows; using Splat; using Splat.Serilog; using SQLitePCL; @@ -27,53 +23,45 @@ namespace SonOfPicasso.UI { - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application + public class AppConfiguration { - private const string ApplicationName = "SonOfPicasso"; - - protected override void OnStartup(StartupEventArgs e) + public static ContainerBuilder Configure(string applicationName) { - base.OnStartup(e); + ConfigureLogging(); + ConfigureAkavache(applicationName); + ConfigureSqlite(); - var loggerConfiguration = new LoggerConfiguration() - .MinimumLevel.Debug() - .Enrich.WithThreadId() - .Enrich.With(); + return ConfigureContainerBuilder(applicationName); + } - var outputTemplate = - "{Timestamp:HH:mm:ss} [{Level:u4}] ({PaddedThreadId}) {ShortSourceContext} {Message}{NewLineIfException}{Exception}{NewLine}"; + private static void ConfigureSqlite() + { + Batteries_V2.Init(); + } - if (Common.IsDebug) - loggerConfiguration = loggerConfiguration - .WriteTo.Debug(outputTemplate: outputTemplate); - else if (Common.IsTrace) - loggerConfiguration = loggerConfiguration - .WriteTo.Trace(outputTemplate: outputTemplate); + public static void ConfigureContainer(IContainer container) + { + var resolver = new AutofacDependencyResolver(container); - if (Common.IsVerboseLoggingEnabled) loggerConfiguration = loggerConfiguration.MinimumLevel.Verbose(); + Locator.SetLocator(resolver); + Locator.CurrentMutable.InitializeReactiveUI(); - Func[] matches = - { - Matching.FromSource() - }; + var updatedBuilder = new ContainerBuilder(); - loggerConfiguration = loggerConfiguration.WriteTo.Logger(configuration => - { - configuration - .Filter.ByExcluding(logEvent => - matches.Select(func => func(logEvent)).Any() && logEvent.Level <= LogEventLevel.Verbose) - .WriteTo - .File("SonOfPicasso.log", outputTemplate: outputTemplate); - }); + updatedBuilder.RegisterType() + .AsSelf(); - Log.Logger = loggerConfiguration.CreateLogger(); + updatedBuilder.RegisterType() + .AsImplementedInterfaces(); - BlobCache.ApplicationName = ApplicationName; - BlobCache.EnsureInitialized(); + resolver.UpdateComponentContext(updatedBuilder); + + Locator.CurrentMutable.RegisterPlatformBitmapLoader(); + Locator.CurrentMutable.UseSerilogFullLogger(); + } + private static ContainerBuilder ConfigureContainerBuilder(string applicationName) + { var containerBuilder = new ContainerBuilder(); containerBuilder.RegisterType() @@ -89,7 +77,7 @@ protected override void OnStartup(StartupEventArgs e) var environmentService = context.Resolve(); var fileSystem = context.Resolve(); - return BuildDbContextOptions(environmentService, fileSystem); + return BuildDbContextOptions(environmentService, fileSystem, applicationName); }).As>() .InstancePerLifetimeScope(); @@ -117,12 +105,11 @@ protected override void OnStartup(StartupEventArgs e) cacheFolderOverride = directoryInfo.CreateSubdirectory("Thumbnails").FullName; } - return new ImageLoadingService(fileSystem, + return new ImageLoadingService(fileSystem, context.Resolve().ForContext(), - context.Resolve(), - context.Resolve(), + context.Resolve(), + context.Resolve(), cacheFolderOverride); - }).As() .InstancePerLifetimeScope(); @@ -130,7 +117,7 @@ protected override void OnStartup(StartupEventArgs e) { var environmentService = context.Resolve(); var cachePath = environmentService.GetEnvironmentVariable("SonOfPicasso_CachePath"); - + if (!string.IsNullOrWhiteSpace(cachePath)) { var fileSystem = context.Resolve(); @@ -141,9 +128,8 @@ protected override void OnStartup(StartupEventArgs e) var blobCacheProvider = new CustomBlobCacheProvider(fileSystem, cachePath); return blobCacheProvider; } - - return new BlobCacheProvider(); + return new BlobCacheProvider(); }).As() .InstancePerLifetimeScope(); @@ -151,58 +137,64 @@ protected override void OnStartup(StartupEventArgs e) .Where(type => type.Namespace.StartsWith("SonOfPicasso.Data.Services")) .AsImplementedInterfaces(); - containerBuilder.RegisterAssemblyTypes(GetType().Assembly) + containerBuilder.RegisterAssemblyTypes(typeof(AppConfiguration).Assembly) .Where(type => type.Namespace.StartsWith("SonOfPicasso.UI.Services")) .InstancePerLifetimeScope() .AsImplementedInterfaces(); - containerBuilder.RegisterAssemblyTypes(GetType().Assembly) - .Where(type => type.Namespace.StartsWith("SonOfPicasso.UI.Windows") - || type.Namespace.StartsWith("SonOfPicasso.UI.Views") - || type.Namespace.StartsWith("SonOfPicasso.UI.ViewModels")) + containerBuilder.RegisterAssemblyTypes(typeof(AppConfiguration).Assembly) + .Where(type => type.Namespace.StartsWith("SonOfPicasso.UI.ViewModels")) .AsImplementedInterfaces() .AsSelf(); containerBuilder.RegisterLogger(); - var container = containerBuilder.Build(); - var resolver = new AutofacDependencyResolver(container); - - Locator.SetLocator(resolver); - Locator.CurrentMutable.InitializeReactiveUI(); - - var updatedBuilder = new ContainerBuilder(); - - updatedBuilder.RegisterType() - .AsSelf(); - - updatedBuilder.RegisterType() - .AsImplementedInterfaces(); + return containerBuilder; + } - resolver.UpdateComponentContext(updatedBuilder); + private static void ConfigureAkavache(string applicationName) + { + BlobCache.ApplicationName = applicationName; + BlobCache.EnsureInitialized(); + } - Locator.CurrentMutable.RegisterPlatformBitmapLoader(); - Locator.CurrentMutable.UseSerilogFullLogger(); + private static void ConfigureLogging() + { + var loggerConfiguration = new LoggerConfiguration() + .MinimumLevel.Debug() + .Enrich.WithThreadId() + .Enrich.With(); - Batteries_V2.Init(); + var outputTemplate = + "{Timestamp:HH:mm:ss} [{Level:u4}] ({PaddedThreadId}) {ShortSourceContext} {Message}{NewLineIfException}{Exception}{NewLine}"; - var dataContext = container.Resolve(); - dataContext.Database.Migrate(); + if (Common.IsDebug) + loggerConfiguration = loggerConfiguration + .WriteTo.Debug(outputTemplate: outputTemplate); + else if (Common.IsTrace) + loggerConfiguration = loggerConfiguration + .WriteTo.Trace(outputTemplate: outputTemplate); - var mainWindow = container.Resolve(); + if (Common.IsVerboseLoggingEnabled) loggerConfiguration = loggerConfiguration.MinimumLevel.Verbose(); - mainWindow.ViewModel = container.Resolve(); - mainWindow.Show(); - } + Func[] matches = + { + Matching.FromSource() + }; - protected override void OnExit(ExitEventArgs e) - { - BlobCache.Shutdown().Wait(); + loggerConfiguration = loggerConfiguration.WriteTo.Logger(configuration => + { + configuration + .Filter.ByExcluding(logEvent => + matches.Select(func => func(logEvent)).Any() && logEvent.Level <= LogEventLevel.Verbose) + .WriteTo + .File("SonOfPicasso.log", outputTemplate: outputTemplate); + }); - base.OnExit(e); + Log.Logger = loggerConfiguration.CreateLogger(); } internal static DbContextOptions BuildDbContextOptions(IEnvironmentService environmentService, - IFileSystem fileSystem) + IFileSystem fileSystem, string applicationName) { var databasePath = environmentService.GetEnvironmentVariable("SonOfPicasso_DatabasePath"); if (!string.IsNullOrWhiteSpace(databasePath)) @@ -213,7 +205,7 @@ internal static DbContextOptions BuildDbContextOptions(IEnvironment else { var appDataPath = environmentService.GetFolderPath(Environment.SpecialFolder.ApplicationData); - databasePath = fileSystem.Path.Combine(appDataPath, ApplicationName, $"{ApplicationName}.db"); + databasePath = fileSystem.Path.Combine(appDataPath, applicationName, $"{applicationName}.db"); } var dbContextOptionsBuilder = new DbContextOptionsBuilder(); diff --git a/src/SonOfPicasso.UI/Converters/MultiValueEqualityConverter.cs b/src/SonOfPicasso.UI/Converters/MultiValueEqualityConverter.cs index 483bd6ae..1ead0403 100644 --- a/src/SonOfPicasso.UI/Converters/MultiValueEqualityConverter.cs +++ b/src/SonOfPicasso.UI/Converters/MultiValueEqualityConverter.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Windows.Data; -namespace SonOfPicasso.UI.Converters +namespace SonOfPicasso.UI.WPF.Converters { public class MultiValueEqualityConverter : IMultiValueConverter { diff --git a/src/SonOfPicasso.UI/Interfaces/IManageFolderRulesViewModel.cs b/src/SonOfPicasso.UI/Interfaces/IManageFolderRulesViewModel.cs index e5190a22..adc73895 100644 --- a/src/SonOfPicasso.UI/Interfaces/IManageFolderRulesViewModel.cs +++ b/src/SonOfPicasso.UI/Interfaces/IManageFolderRulesViewModel.cs @@ -3,7 +3,6 @@ using System.Reactive; using ReactiveUI; using SonOfPicasso.Core.Interfaces; -using SonOfPicasso.Data.Model; namespace SonOfPicasso.UI.Interfaces { diff --git a/src/SonOfPicasso.UI/SonOfPicasso.UI.csproj b/src/SonOfPicasso.UI/SonOfPicasso.UI.csproj index 19a0e3e0..d0aa6cb9 100644 --- a/src/SonOfPicasso.UI/SonOfPicasso.UI.csproj +++ b/src/SonOfPicasso.UI/SonOfPicasso.UI.csproj @@ -1,17 +1,18 @@ - + - WinExe netcoreapp3.0 - true false - SonOfPicasso.UI DEBUG;TRACE + + + + @@ -21,50 +22,22 @@ - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - \ No newline at end of file + diff --git a/src/SonOfPicasso.UI/ViewModels/Abstract/ValidatedViewModelBase.cs b/src/SonOfPicasso.UI/ViewModels/Abstract/ValidatedViewModelBase.cs index 98bba383..334d953b 100644 --- a/src/SonOfPicasso.UI/ViewModels/Abstract/ValidatedViewModelBase.cs +++ b/src/SonOfPicasso.UI/ViewModels/Abstract/ValidatedViewModelBase.cs @@ -1,5 +1,4 @@ -using System; -using System.Reactive.Concurrency; +using System.Reactive.Concurrency; using ReactiveUI; using ReactiveUI.Validation.Helpers; diff --git a/src/SonOfPicasso.UI/ViewModels/Abstract/ViewModelBase.cs b/src/SonOfPicasso.UI/ViewModels/Abstract/ViewModelBase.cs index 9056e5b0..b1de702d 100644 --- a/src/SonOfPicasso.UI/ViewModels/Abstract/ViewModelBase.cs +++ b/src/SonOfPicasso.UI/ViewModels/Abstract/ViewModelBase.cs @@ -1,5 +1,4 @@ -using System; -using ReactiveUI; +using ReactiveUI; namespace SonOfPicasso.UI.ViewModels.Abstract { diff --git a/src/SonOfPicasso.UI/ViewModels/ApplicationViewModel.cs b/src/SonOfPicasso.UI/ViewModels/ApplicationViewModel.cs index 05f67cc4..cf2c73eb 100644 --- a/src/SonOfPicasso.UI/ViewModels/ApplicationViewModel.cs +++ b/src/SonOfPicasso.UI/ViewModels/ApplicationViewModel.cs @@ -22,16 +22,8 @@ public class ApplicationViewModel : ActivatableViewModelBase, IDisposable { private readonly IImageContainerManagementService _imageContainerManagementService; private readonly IObservableCache _imageContainerViewModelCache; - private readonly IObservableCache _imageViewModelCache; private readonly ILogger _logger; private readonly ISchedulerProvider _schedulerProvider; - private readonly SourceCache _selectedImagesSourceCache; - private readonly IObservableCache _trayImageCache; - private readonly SourceCache _trayImageSourceCache; - private readonly Subject> _unselectImageSubject = - new Subject>(); - private readonly Subject> _unselectTrayImageSubject = - new Subject>(); private string _visibleItemContainerKey; @@ -45,8 +37,6 @@ public ApplicationViewModel(ISchedulerProvider schedulerProvider, _imageContainerManagementService = imageContainerManagementService; _logger = logger; - _selectedImagesSourceCache = new SourceCache(model => model.ImageId); - FolderManager = ReactiveCommand.CreateFromObservable( ExecuteFolderManager); @@ -87,62 +77,12 @@ public ApplicationViewModel(ISchedulerProvider schedulerProvider, .DisposeMany() .AsObservableCache(); - _imageViewModelCache = _imageContainerViewModelCache - .Connect() - .TransformMany(imageContainerViewModel => - imageContainerViewModel.ImageRefs.Select(imageRef => - new ImageViewModel(imageRef, imageContainerViewModel)), - imageViewModel => imageViewModel.ImageRefId) - .DisposeMany() - .AsObservableCache(); - - _trayImageSourceCache = new SourceCache(model => model.ImageId); - - _trayImageCache = _trayImageSourceCache - .Connect() - .Transform(model => new TrayImageViewModel(model)) - .DisposeMany() - .AsObservableCache(); - this.WhenActivated(d => { _imageContainerManagementService .Start() .Subscribe(); - _selectedImagesSourceCache - .Connect() - .Subscribe(set => - { - _trayImageSourceCache.Edit(updater => - { - foreach (var change in set) - switch (change.Reason) - { - case ChangeReason.Add: - if (!updater.Lookup(change.Current.ImageId).HasValue) - updater.AddOrUpdate(change.Current); - break; - - case ChangeReason.Update: - break; - - case ChangeReason.Remove: - var lookup = _trayImageCache.Lookup(change.Current.ImageId); - if (lookup.HasValue && !lookup.Value.Pinned) - updater.Remove(change.Current.ImageId); - break; - case ChangeReason.Refresh: - break; - case ChangeReason.Moved: - break; - default: - throw new ArgumentOutOfRangeException(); - } - }); - }) - .DisposeWith(d); - _imageContainerViewModelCache .Connect() .ObserveOn(_schedulerProvider.MainThreadScheduler) @@ -157,27 +97,9 @@ public ApplicationViewModel(ISchedulerProvider schedulerProvider, .Bind(AlbumImageContainers) .Subscribe() .DisposeWith(d); - - _imageViewModelCache - .Connect() - .ObserveOn(_schedulerProvider.MainThreadScheduler) - .Bind(Images) - .Subscribe() - .DisposeWith(d); - - _trayImageCache - .Connect() - .ObserveOn(_schedulerProvider.MainThreadScheduler) - .Bind(TrayImages) - .Subscribe() - .DisposeWith(d); }); } - public IObservable> UnselectImage => _unselectImageSubject; - - public IObservable> UnselectTrayImage => _unselectTrayImageSubject; - public Interaction AddFolderInteraction { get; } = new Interaction(); public Interaction NewAlbumInteraction { get; } = @@ -232,12 +154,6 @@ public string VisibleItemContainerKey public void Dispose() { _imageContainerViewModelCache?.Dispose(); - _imageViewModelCache?.Dispose(); - _selectedImagesSourceCache?.Dispose(); - _trayImageCache?.Dispose(); - _trayImageSourceCache?.Dispose(); - _unselectImageSubject?.Dispose(); - _unselectTrayImageSubject?.Dispose(); } private IObservable ExecuteNewAlbum(Unit _) @@ -310,31 +226,33 @@ private IObservable ExecutePinSelectedItems(IEnumerable ExecuteClearTrayItems( (IEnumerable trayImageViewModels, bool isAllItems) tuple) { - return Observable.Start(() => - { - var (trayImageViewModels, isAllItems) = tuple; - - if (isAllItems) - return ConfirmClearTrayItemsInteraction.Handle(Unit.Default) - .Select(b => (trayImageViewModels, b)); - - return Observable.Return((trayImageViewModels, true)); - }, _schedulerProvider.TaskPool) - .SelectMany(observable => observable) - .Select(valueTuple => - { - var (trayImageViewModels, shouldContinue) = valueTuple; - if (shouldContinue) - { - var trayImageViewModelsArray = trayImageViewModels.ToArray(); - var imageIds = trayImageViewModelsArray.Select(model => model.ImageViewModel.ImageId); - _trayImageSourceCache.RemoveKeys(imageIds); - _unselectImageSubject.OnNext(trayImageViewModelsArray.Select(model => model.ImageViewModel)); - _unselectTrayImageSubject.OnNext(trayImageViewModelsArray); - } - - return Unit.Default; - }); + throw new NotImplementedException(); + +// return Observable.Start(() => +// { +// var (trayImageViewModels, isAllItems) = tuple; +// +// if (isAllItems) +// return ConfirmClearTrayItemsInteraction.Handle(Unit.Default) +// .Select(b => (trayImageViewModels, b)); +// +// return Observable.Return((trayImageViewModels, true)); +// }, _schedulerProvider.TaskPool) +// .SelectMany(observable => observable) +// .Select(valueTuple => +// { +// var (trayImageViewModels, shouldContinue) = valueTuple; +// if (shouldContinue) +// { +// var trayImageViewModelsArray = trayImageViewModels.ToArray(); +// var imageIds = trayImageViewModelsArray.Select(model => model.ImageViewModel.ImageId); +// _trayImageSourceCache.RemoveKeys(imageIds); +// _unselectImageSubject.OnNext(trayImageViewModelsArray.Select(model => model.ImageViewModel)); +// _unselectTrayImageSubject.OnNext(trayImageViewModelsArray); +// } +// +// return Unit.Default; +// }); } private IObservable ExecuteAddTrayItemsToAlbum(Unit unit) @@ -344,11 +262,11 @@ private IObservable ExecuteAddTrayItemsToAlbum(Unit unit) public void ChangeSelectedImages(IEnumerable added, IEnumerable removed) { - _selectedImagesSourceCache.Edit(updater => - { - updater.AddOrUpdate(added); - updater.Remove(removed); - }); +// _selectedImagesSourceCache.Edit(updater => +// { +// updater.AddOrUpdate(added); +// updater.Remove(removed); +// }); } private IObservable ExecuteFolderManager(Unit unit) diff --git a/src/SonOfPicasso.UI/ViewModels/ImageViewModel.cs b/src/SonOfPicasso.UI/ViewModels/ImageViewModel.cs index 0039150c..06ab555c 100644 --- a/src/SonOfPicasso.UI/ViewModels/ImageViewModel.cs +++ b/src/SonOfPicasso.UI/ViewModels/ImageViewModel.cs @@ -1,5 +1,4 @@ using System; -using System.Windows.Media.Imaging; using SonOfPicasso.Core.Model; using SonOfPicasso.UI.ViewModels.Abstract;