├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── question.md └── release.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── build └── build.ps1 ├── crowdin.yml ├── forum ├── control_01.jpg ├── main_01.jpg ├── main_02.jpg ├── settings_01.jpg └── settings_02.jpg ├── manifest └── Lacro59_ScreenshotsVisualizer.yaml ├── screenshots ├── plugin_mainview.jpg ├── plugin_settings.jpg ├── plugin_side.jpg └── thumbs │ ├── plugin_mainview.jpg │ ├── plugin_settings.jpg │ └── plugin_side.jpg └── source ├── App.xaml ├── Controls ├── PluginButton.xaml ├── PluginButton.xaml.cs ├── PluginListScreenshots.xaml ├── PluginListScreenshots.xaml.cs ├── PluginListScreenshotsVertical.xaml ├── PluginListScreenshotsVertical.xaml.cs ├── PluginScreenshots.xaml ├── PluginScreenshots.xaml.cs ├── PluginSinglePicture.xaml ├── PluginSinglePicture.xaml.cs ├── PluginViewItem.xaml ├── PluginViewItem.xaml.cs └── ZoomBorder.cs ├── Localization ├── LocSource.xaml ├── ar_SA.xaml ├── bg_BG.xaml ├── ca_ES.xaml ├── cs_CZ.xaml ├── da_DK.xaml ├── de_DE.xaml ├── el_GR.xaml ├── en_US.xaml ├── es_ES.xaml ├── et_EE.xaml ├── fa_IR.xaml ├── fi_FI.xaml ├── fr_FR.xaml ├── gl_ES.xaml ├── he_IL.xaml ├── hr_HR.xaml ├── hu_HU.xaml ├── id_ID.xaml ├── it_IT.xaml ├── ja_JP.xaml ├── ko_KR.xaml ├── lt_LT.xaml ├── nl_NL.xaml ├── no_NO.xaml ├── pl_PL.xaml ├── pt_BR.xaml ├── pt_PT.xaml ├── ro_RO.xaml ├── ru_RU.xaml ├── sk_SK.xaml ├── sr_SP.xaml ├── sv_SE.xaml ├── tr_TR.xaml ├── uk_UA.xaml ├── vi_VN.xaml ├── zh_CN.xaml └── zh_TW.xaml ├── Models ├── GameScreenshots.cs ├── GameSettings.cs ├── Screenshot.cs ├── ScreeshotsVisualizeCollection.cs └── StartPage │ └── SsvCarouselOptions.cs ├── Properties └── AssemblyInfo.cs ├── ScreenshotsVisualizer.cs ├── ScreenshotsVisualizer.csproj ├── ScreenshotsVisualizer.sln ├── ScreenshotsVisualizerSettings.cs ├── ScreenshotsVisualizer_jxbq1suf_wpftmp.csproj ├── ScreenshotsVisualizer_pkje2g0m_wpftmp.csproj ├── ScreenshotsVisualizer_tiozy1pf_wpftmp.csproj ├── Services ├── ScreenshotsVisualizerDatabase.cs ├── ScreenshotsVisualizerTopPanelItem.cs └── ScreenshotsVisualizerViewSidebar.cs ├── Views ├── ScreenshotsVisualizerSettingsView.xaml ├── ScreenshotsVisualizerSettingsView.xaml.cs ├── SsvScreenshotsManager.xaml ├── SsvScreenshotsManager.xaml.cs ├── SsvScreenshotsView.xaml ├── SsvScreenshotsView.xaml.cs ├── SsvSinglePictureView.xaml ├── SsvSinglePictureView.xaml.cs └── StartPage │ ├── SsvCarousel.xaml │ ├── SsvCarousel.xaml.cs │ ├── SsvCarouselSettings.xaml │ └── SsvCarouselSettings.xaml.cs ├── extension.yaml ├── icon.png └── packages.config /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: lacro59 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 16 | **Expected behavior** 17 | A clear and concise description of what you expected to happen. 18 | 19 | **Screenshots** 20 | If applicable, add screenshots to help explain your problem. 21 | 22 | **Extensions log** 23 | Attach Playnite's `Extensions.log` file. It is located in Playnite's installation directory in the portable version or in `%AppData%\Playnite` (Can be pasted in Explorer) in the installed version 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen or implemented. 12 | 13 | **Screenshots** 14 | If applicable, add screenshots to help explain your problem. 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Ask a question on project 4 | title: '' 5 | labels: question 6 | assignees: '' 7 | --- 8 | -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | # .github/release.yml 2 | 3 | changelog: 4 | categories: 5 | - title: 'Fixed:' 6 | labels: 7 | - bug 8 | - title: 'Added:' 9 | labels: 10 | - enhancement 11 | - title: 'Other Changes:' 12 | labels: 13 | - "*" 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | [Originals]/ 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # MSTest test Results 33 | [Tt]est[Rr]esult*/ 34 | [Bb]uild[Ll]og.* 35 | 36 | # NUNIT 37 | *.VisualState.xml 38 | TestResult.xml 39 | 40 | # Build Results of an ATL Project 41 | [Dd]ebugPS/ 42 | [Rr]eleasePS/ 43 | dlldata.c 44 | 45 | # DNX 46 | project.lock.json 47 | project.fragment.lock.json 48 | artifacts/ 49 | 50 | *_i.c 51 | *_p.c 52 | *_i.h 53 | *.ilk 54 | *.meta 55 | *.obj 56 | *.pch 57 | *.pdb 58 | *.pgc 59 | *.pgd 60 | *.rsp 61 | *.sbr 62 | *.tlb 63 | *.tli 64 | *.tlh 65 | *.tmp 66 | *.tmp_proj 67 | *.log 68 | *.vspscc 69 | *.vssscc 70 | .builds 71 | *.pidb 72 | *.svclog 73 | *.scc 74 | 75 | # Chutzpah Test files 76 | _Chutzpah* 77 | 78 | # Visual C++ cache files 79 | ipch/ 80 | *.aps 81 | *.ncb 82 | *.opendb 83 | *.opensdf 84 | *.sdf 85 | *.cachefile 86 | *.VC.db 87 | *.VC.VC.opendb 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | *.sap 94 | 95 | # TFS 2012 Local Workspace 96 | $tf/ 97 | 98 | # Guidance Automation Toolkit 99 | *.gpState 100 | 101 | # ReSharper is a .NET coding add-in 102 | _ReSharper*/ 103 | *.[Rr]e[Ss]harper 104 | *.DotSettings.user 105 | 106 | # JustCode is a .NET coding add-in 107 | .JustCode 108 | 109 | # TeamCity is a build add-in 110 | _TeamCity* 111 | 112 | # DotCover is a Code Coverage Tool 113 | *.dotCover 114 | 115 | # NCrunch 116 | _NCrunch_* 117 | .*crunch*.local.xml 118 | nCrunchTemp_* 119 | 120 | # MightyMoose 121 | *.mm.* 122 | AutoTest.Net/ 123 | 124 | # Web workbench (sass) 125 | .sass-cache/ 126 | 127 | # Installshield output folder 128 | [Ee]xpress/ 129 | 130 | # DocProject is a documentation generator add-in 131 | DocProject/buildhelp/ 132 | DocProject/Help/*.HxT 133 | DocProject/Help/*.HxC 134 | DocProject/Help/*.hhc 135 | DocProject/Help/*.hhk 136 | DocProject/Help/*.hhp 137 | DocProject/Help/Html2 138 | DocProject/Help/html 139 | 140 | # Click-Once directory 141 | publish/ 142 | 143 | # Publish Web Output 144 | *.[Pp]ublish.xml 145 | *.azurePubxml 146 | # TODO: Comment the next line if you want to checkin your web deploy settings 147 | # but database connection strings (with potential passwords) will be unencrypted 148 | *.pubxml 149 | *.publishproj 150 | 151 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 152 | # checkin your Azure Web App publish settings, but sensitive information contained 153 | # in these scripts will be unencrypted 154 | PublishScripts/ 155 | 156 | # NuGet Packages 157 | *.nupkg 158 | # The packages folder can be ignored because of Package Restore 159 | **/packages/* 160 | # except build/, which is used as an MSBuild target. 161 | !**/packages/build/ 162 | # Uncomment if necessary however generally it will be regenerated when needed 163 | #!**/packages/repositories.config 164 | # NuGet v3's project.json files produces more ignoreable files 165 | *.nuget.props 166 | *.nuget.targets 167 | 168 | # Microsoft Azure Build Output 169 | csx/ 170 | *.build.csdef 171 | 172 | # Microsoft Azure Emulator 173 | ecf/ 174 | rcf/ 175 | 176 | # Windows Store app package directories and files 177 | AppPackages/ 178 | BundleArtifacts/ 179 | Package.StoreAssociation.xml 180 | _pkginfo.txt 181 | 182 | # Visual Studio cache files 183 | # files ending in .cache can be ignored 184 | *.[Cc]ache 185 | # but keep track of directories ending in .cache 186 | !*.[Cc]ache/ 187 | 188 | # Others 189 | ClientBin/ 190 | ~$* 191 | *~ 192 | *.dbmdl 193 | *.dbproj.schemaview 194 | *.pfx 195 | *.publishsettings 196 | node_modules/ 197 | orleans.codegen.cs 198 | 199 | # Since there are multiple workflows, uncomment next line to ignore bower_components 200 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 201 | #bower_components/ 202 | 203 | # RIA/Silverlight projects 204 | Generated_Code/ 205 | 206 | # Backup & report files from converting an old project file 207 | # to a newer Visual Studio version. Backup files are not needed, 208 | # because we have git ;-) 209 | _UpgradeReport_Files/ 210 | Backup*/ 211 | UpgradeLog*.XML 212 | UpgradeLog*.htm 213 | 214 | # SQL Server files 215 | *.mdf 216 | *.ldf 217 | 218 | # Business Intelligence projects 219 | *.rdl.data 220 | *.bim.layout 221 | *.bim_*.settings 222 | 223 | # Microsoft Fakes 224 | FakesAssemblies/ 225 | 226 | # GhostDoc plugin setting file 227 | *.GhostDoc.xml 228 | 229 | # Node.js Tools for Visual Studio 230 | .ntvs_analysis.dat 231 | 232 | # Visual Studio 6 build log 233 | *.plg 234 | 235 | # Visual Studio 6 workspace options file 236 | *.opt 237 | 238 | # Visual Studio LightSwitch build output 239 | **/*.HTMLClient/GeneratedArtifacts 240 | **/*.DesktopClient/GeneratedArtifacts 241 | **/*.DesktopClient/ModelManifest.xml 242 | **/*.Server/GeneratedArtifacts 243 | **/*.Server/ModelManifest.xml 244 | _Pvt_Extensions 245 | 246 | # Paket dependency manager 247 | .paket/paket.exe 248 | paket-files/ 249 | 250 | # FAKE - F# Make 251 | .fake/ 252 | 253 | # JetBrains Rider 254 | .idea/ 255 | *.sln.iml 256 | 257 | # CodeRush 258 | .cr/ 259 | 260 | # Visual Studio Code stuff 261 | .vscode/ 262 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "source/playnite-plugincommon"] 2 | path = source/playnite-plugincommon 3 | url = https://github.com/Lacro59/playnite-plugincommon.git 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Lacro59 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Crowdin](https://badges.crowdin.net/playnite-extensions/localized.svg)](https://crowdin.com/project/playnite-extensions) 2 | [![GitHub release (latest by date)](https://img.shields.io/github/v/release/Lacro59/playnite-screenshotsvisualizer-plugin?cacheSeconds=5000&logo=github)](https://github.com/Lacro59/playnite-screenshotsvisualizer-plugin/releases/latest) 3 | [![GitHub Release Date](https://img.shields.io/github/release-date/Lacro59/playnite-screenshotsvisualizer-plugin?cacheSeconds=5000)](https://github.com/Lacro59/playnite-screenshotsvisualizer-plugin/releases/latest) 4 | [![Github Lastest Releases](https://img.shields.io/github/downloads/Lacro59/playnite-screenshotsvisualizer-plugin/latest/total.svg)]() 5 | [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/Lacro59/playnite-screenshotsvisualizer-plugin)](https://github.com/Lacro59/playnite-screenshotsvisualizer-plugin/graphs/commit-activity) 6 | [![GitHub contributors](https://img.shields.io/github/contributors/Lacro59/playnite-screenshotsvisualizer-plugin?cacheSeconds=5000)](https://github.com/Lacro59/playnite-screenshotsvisualizer-plugin/graphs/contributors) 7 | [![GitHub](https://img.shields.io/github/license/Lacro59/playnite-screenshotsvisualizer-plugin?cacheSeconds=50000)](https://github.com/Lacro59/playnite-screenshotsvisualizer-plugin/blob/master/LICENSE) 8 | 9 | # playnite-screenshotsvisualizer-plugin 10 | Extension for [Playnite](https://playnite.link). 11 | 12 | ## Informations 13 | The plugin shows your screenshots and video capture.. 14 | 15 | 16 | 17 | main_01 18 | 19 | 20 | 21 | 22 | main_01 23 | 24 | 25 | 26 | 27 | steamgriddb_01 28 | 29 | 30 | 31 | 32 | settings_01 33 | 34 | 35 | 36 | 37 | settings_01 38 | 39 | 40 | 41 | With this plugin you can 42 | * scan multi folders to show screenshoots and video capture 43 | * move screenshots and video capture on other folders (ex cloud folder) 44 | 45 | If the theme support function, you can: 46 | * add plugin data in game list in "Details View" & "Grid View" 47 | * add plugin data in game details 48 | 49 | ## Translations 50 | You can help to translate the extensions do different languages via the project [Crowdin](https://crowdin.com/project/playnite-extensions) page. 51 | 52 | ## Custom theme integration 53 | The extension contains elements that can fit into a custom theme. 54 | [More informations](https://github.com/Lacro59/playnite-screenshotsvisualizer-plugin/wiki/Addition-in-a-custom-theme) 55 | 56 | ## More 57 | Remember to support [Playnite](https://www.patreon.com/playnite). 58 | Buy Me a Coffee at ko-fi.com 59 | -------------------------------------------------------------------------------- /build/build.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/build/build.ps1 -------------------------------------------------------------------------------- /crowdin.yml: -------------------------------------------------------------------------------- 1 | files: 2 | - source: LocSource.xaml 3 | translation: /%original_path%/%locale_with_underscore%.xaml 4 | -------------------------------------------------------------------------------- /forum/control_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/forum/control_01.jpg -------------------------------------------------------------------------------- /forum/main_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/forum/main_01.jpg -------------------------------------------------------------------------------- /forum/main_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/forum/main_02.jpg -------------------------------------------------------------------------------- /forum/settings_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/forum/settings_01.jpg -------------------------------------------------------------------------------- /forum/settings_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/forum/settings_02.jpg -------------------------------------------------------------------------------- /screenshots/plugin_mainview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/screenshots/plugin_mainview.jpg -------------------------------------------------------------------------------- /screenshots/plugin_settings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/screenshots/plugin_settings.jpg -------------------------------------------------------------------------------- /screenshots/plugin_side.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/screenshots/plugin_side.jpg -------------------------------------------------------------------------------- /screenshots/thumbs/plugin_mainview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/screenshots/thumbs/plugin_mainview.jpg -------------------------------------------------------------------------------- /screenshots/thumbs/plugin_settings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/screenshots/thumbs/plugin_settings.jpg -------------------------------------------------------------------------------- /screenshots/thumbs/plugin_side.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lacro59/playnite-screenshotsvisualizer-plugin/36679566ca58cc3d2aa805a9b25918cf74d2d551/screenshots/thumbs/plugin_side.jpg -------------------------------------------------------------------------------- /source/Controls/PluginButton.xaml: -------------------------------------------------------------------------------- 1 |  14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 95 | 96 | -------------------------------------------------------------------------------- /source/Controls/PluginButton.xaml.cs: -------------------------------------------------------------------------------- 1 | using CommonPluginsShared; 2 | using CommonPluginsShared.Collections; 3 | using CommonPluginsShared.Controls; 4 | using CommonPluginsShared.Converters; 5 | using CommonPluginsShared.Interfaces; 6 | using Playnite.SDK; 7 | using Playnite.SDK.Models; 8 | using ScreenshotsVisualizer.Models; 9 | using ScreenshotsVisualizer.Services; 10 | using ScreenshotsVisualizer.Views; 11 | using System; 12 | using System.Collections.Generic; 13 | using System.Linq; 14 | using System.Text; 15 | using System.Threading.Tasks; 16 | using System.Windows; 17 | 18 | namespace ScreenshotsVisualizer.Controls 19 | { 20 | /// 21 | /// Logique d'interaction pour PluginButton.xaml 22 | /// 23 | public partial class PluginButton : PluginUserControlExtend 24 | { 25 | private ScreenshotsVisualizerDatabase PluginDatabase => ScreenshotsVisualizer.PluginDatabase; 26 | internal override IPluginDatabase pluginDatabase => PluginDatabase; 27 | 28 | private PluginButtonDataContext ControlDataContext = new PluginButtonDataContext(); 29 | internal override IDataContext controlDataContext 30 | { 31 | get => ControlDataContext; 32 | set => ControlDataContext = (PluginButtonDataContext)controlDataContext; 33 | } 34 | 35 | 36 | public PluginButton() 37 | { 38 | AlwaysShow = false; 39 | 40 | InitializeComponent(); 41 | this.DataContext = ControlDataContext; 42 | 43 | _ = Task.Run(() => 44 | { 45 | // Wait extension database are loaded 46 | _ = System.Threading.SpinWait.SpinUntil(() => PluginDatabase.IsLoaded, -1); 47 | 48 | _ = Application.Current.Dispatcher.BeginInvoke((Action)delegate 49 | { 50 | PluginDatabase.PluginSettings.PropertyChanged += PluginSettings_PropertyChanged; 51 | PluginDatabase.Database.ItemUpdated += Database_ItemUpdated; 52 | PluginDatabase.Database.ItemCollectionChanged += Database_ItemCollectionChanged; 53 | API.Instance.Database.Games.ItemUpdated += Games_ItemUpdated; 54 | 55 | // Apply settings 56 | PluginSettings_PropertyChanged(null, null); 57 | }); 58 | }); 59 | } 60 | 61 | 62 | public override void SetDefaultDataContext() 63 | { 64 | ControlDataContext.IsActivated = PluginDatabase.PluginSettings.Settings.EnableIntegrationButton; 65 | ControlDataContext.DisplayDetails = PluginDatabase.PluginSettings.Settings.EnableIntegrationButtonDetails; 66 | 67 | ControlDataContext.Text = "\uea38"; 68 | ControlDataContext.SsvDateLast = DateTime.Now; 69 | ControlDataContext.SsvTotal = 0; 70 | } 71 | 72 | 73 | public override void SetData(Game newContext, PluginDataBaseGameBase PluginGameData) 74 | { 75 | GameScreenshots gameScreenshots = (GameScreenshots)PluginGameData; 76 | 77 | if (ControlDataContext.DisplayDetails) 78 | { 79 | if (gameScreenshots.HasData) 80 | { 81 | List tmp = gameScreenshots.Items; 82 | tmp.Sort((x, y) => y.Modifed.CompareTo(x.Modifed)); 83 | DateTime SsvDateLast = tmp[0].Modifed; 84 | 85 | LocalDateConverter localDateConverter = new LocalDateConverter(); 86 | 87 | ControlDataContext.SsvDateLast = SsvDateLast; 88 | ControlDataContext.SsvTotal = gameScreenshots.Items.Count(); 89 | } 90 | else 91 | { 92 | ControlDataContext.DisplayDetails = false; 93 | } 94 | } 95 | else 96 | { 97 | ControlDataContext.DisplayDetails = false; 98 | } 99 | } 100 | 101 | 102 | #region Events 103 | private void PART_PluginButton_Click(object sender, RoutedEventArgs e) 104 | { 105 | WindowOptions windowOptions = new WindowOptions 106 | { 107 | ShowMinimizeButton = false, 108 | ShowMaximizeButton = true, 109 | ShowCloseButton = true, 110 | CanBeResizable = true, 111 | Height = 720, 112 | Width = 1200 113 | }; 114 | 115 | SsvScreenshotsView ViewExtension = new SsvScreenshotsView(PluginDatabase.GameContext); 116 | Window windowExtension = PlayniteUiHelper.CreateExtensionWindow(ResourceProvider.GetString("LOCSsvTitle"), ViewExtension, windowOptions); 117 | windowExtension.ShowDialog(); 118 | } 119 | #endregion 120 | } 121 | 122 | 123 | public class PluginButtonDataContext : ObservableObject, IDataContext 124 | { 125 | private bool isActivated; 126 | public bool IsActivated { get => isActivated; set => SetValue(ref isActivated, value); } 127 | 128 | private bool displayDetails; 129 | public bool DisplayDetails { get => displayDetails; set => SetValue(ref displayDetails, value); } 130 | 131 | private bool buttonContextMenu; 132 | public bool ButtonContextMenu { get => buttonContextMenu; set => SetValue(ref buttonContextMenu, value); } 133 | 134 | private string text = "\uea38"; 135 | public string Text { get => text; set => SetValue(ref text, value); } 136 | 137 | private DateTime ssvDateLast = DateTime.Now; 138 | public DateTime SsvDateLast { get => ssvDateLast; set => SetValue(ref ssvDateLast, value); } 139 | 140 | private int ssvTotal = 7; 141 | public int SsvTotal { get => ssvTotal; set => SetValue(ref ssvTotal, value); } 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /source/Controls/PluginListScreenshotsVertical.xaml.cs: -------------------------------------------------------------------------------- 1 | using CommonPluginsShared; 2 | using CommonPluginsShared.Collections; 3 | using CommonPluginsShared.Controls; 4 | using CommonPluginsShared.Interfaces; 5 | using Playnite.SDK; 6 | using Playnite.SDK.Models; 7 | using ScreenshotsVisualizer.Models; 8 | using ScreenshotsVisualizer.Services; 9 | using System; 10 | using System.Collections.Generic; 11 | using System.Collections.ObjectModel; 12 | using System.Linq; 13 | using System.Text; 14 | using System.Threading.Tasks; 15 | using System.Windows; 16 | using System.Windows.Controls; 17 | using System.Windows.Input; 18 | 19 | namespace ScreenshotsVisualizer.Controls 20 | { 21 | /// 22 | /// Logique d'interaction pour PluginListScreenshotsVertical.xaml 23 | /// 24 | public partial class PluginListScreenshotsVertical : PluginUserControlExtend 25 | { 26 | private ScreenshotsVisualizerDatabase PluginDatabase => ScreenshotsVisualizer.PluginDatabase; 27 | internal override IPluginDatabase pluginDatabase => PluginDatabase; 28 | 29 | private PluginListScreenshotsVerticalDataContext ControlDataContext = new PluginListScreenshotsVerticalDataContext(); 30 | internal override IDataContext controlDataContext 31 | { 32 | get => ControlDataContext; 33 | set => ControlDataContext = (PluginListScreenshotsVerticalDataContext)controlDataContext; 34 | } 35 | 36 | 37 | public PluginListScreenshotsVertical() 38 | { 39 | InitializeComponent(); 40 | this.DataContext = ControlDataContext; 41 | 42 | _ = Task.Run(() => 43 | { 44 | // Wait extension database are loaded 45 | _ = System.Threading.SpinWait.SpinUntil(() => PluginDatabase.IsLoaded, -1); 46 | 47 | _ = Application.Current.Dispatcher.BeginInvoke((Action)delegate 48 | { 49 | PluginDatabase.PluginSettings.PropertyChanged += PluginSettings_PropertyChanged; 50 | PluginDatabase.Database.ItemUpdated += Database_ItemUpdated; 51 | PluginDatabase.Database.ItemCollectionChanged += Database_ItemCollectionChanged; 52 | API.Instance.Database.Games.ItemUpdated += Games_ItemUpdated; 53 | 54 | // Apply settings 55 | PluginSettings_PropertyChanged(null, null); 56 | 57 | PART_ListScreenshots.AddHandler(UIElement.MouseDownEvent, new MouseButtonEventHandler(PluginDatabase.ListBoxItem_MouseLeftButtonDownClick), true); 58 | }); 59 | }); 60 | } 61 | 62 | 63 | public override void SetDefaultDataContext() 64 | { 65 | ControlDataContext.IsActivated = PluginDatabase.PluginSettings.Settings.EnableIntegrationShowPicturesVertical; 66 | ControlDataContext.AddBorder = PluginDatabase.PluginSettings.Settings.AddBorder; 67 | ControlDataContext.AddRoundedCorner = PluginDatabase.PluginSettings.Settings.AddRoundedCorner; 68 | ControlDataContext.HideInfos = PluginDatabase.PluginSettings.Settings.HideScreenshotsInfos; 69 | 70 | ControlDataContext.CountItems = 0; 71 | ControlDataContext.ItemsSource = new ObservableCollection(); 72 | } 73 | 74 | 75 | public override void SetData(Game newContext, PluginDataBaseGameBase PluginGameData) 76 | { 77 | GameScreenshots gameScreenshots = (GameScreenshots)PluginGameData; 78 | 79 | List screenshots = gameScreenshots.Items; 80 | screenshots.Sort((x, y) => y.Modifed.CompareTo(x.Modifed)); 81 | 82 | ControlDataContext.ItemsSource = screenshots.ToObservable(); 83 | ControlDataContext.CountItems = screenshots.Count; 84 | } 85 | 86 | 87 | #region Events 88 | private void PART_ListScreenshots_SelectionChanged(object sender, SelectionChangedEventArgs e) 89 | { 90 | if (PluginDatabase.PluginSettings.Settings.LinkWithSinglePicture && PluginDatabase.PluginSettings.Settings.EnableIntegrationShowSinglePicture) 91 | { 92 | PluginSinglePicture ssvSinglePicture = UI.FindVisualChildren(Application.Current.MainWindow).FirstOrDefault(); 93 | 94 | if (ssvSinglePicture != null) 95 | { 96 | ssvSinglePicture.SetPictureFromList(PART_ListScreenshots.SelectedIndex); 97 | } 98 | } 99 | } 100 | #endregion 101 | } 102 | 103 | 104 | public class PluginListScreenshotsVerticalDataContext : ObservableObject, IDataContext 105 | { 106 | private bool isActivated; 107 | public bool IsActivated { get => isActivated; set => SetValue(ref isActivated, value); } 108 | 109 | private bool addBorder; 110 | public bool AddBorder { get => addBorder; set => SetValue(ref addBorder, value); } 111 | 112 | private bool addRoundedCorner; 113 | public bool AddRoundedCorner { get => addRoundedCorner; set => SetValue(ref addRoundedCorner, value); } 114 | 115 | private bool hideInfos; 116 | public bool HideInfos { get => hideInfos; set => SetValue(ref hideInfos, value); } 117 | 118 | private int countItems = 10; 119 | public int CountItems { get => countItems; set => SetValue(ref countItems, value); } 120 | 121 | private ObservableCollection itemsSource = new ObservableCollection 122 | { 123 | new Screenshot 124 | { 125 | FileName = @"icon.png", 126 | Modifed = DateTime.Now 127 | } 128 | }; 129 | public ObservableCollection ItemsSource { get => itemsSource; set => SetValue(ref itemsSource, value); } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /source/Controls/PluginScreenshots.xaml: -------------------------------------------------------------------------------- 1 |  21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 42 | 43 | 44 | 46 | 47 | 58 | 59 | 60 | 61 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |