Example #1
0
        private void SaveIconToSidecarImpl()
        {
            var directory     = SelectedDirectory;
            var icon          = IconReference.FromResource(directory.FullPath, SelectedIcon.FullPath);
            var directoryInfo = new DirectoryInfo(directory.FullPath);
            var infoFile      = new FolderInfoFile(directoryInfo);
            var info          = infoFile.Object;

            info.Icon.Main = icon.Resource;
            infoFile.Save();
            directory.Image.Refresh();
            directory.OnPropertyChanged(nameof(directory.SidecarExists));
            directory.OnPropertyChanged(nameof(directory.Sidecar));
        }
Example #2
0
        private void SaveIconToSidecarImpl()
        {
            var directory     = SelectedDirectory;
            var icon          = IconReference.FromResource(directory.FullPath, SelectedIcon.FullPath);
            var directoryInfo = new DirectoryInfo(directory.FullPath);
            //TODO: Simplify Access to FolderInfoFile Constructor
            var infoFile = new FolderInfoFile(directoryInfo, SidecarType.Main, null);
            var info     = infoFile.Object;

            info.Icon.Main = icon.Resource;
            infoFile.Save();
            directory.Image.Result.Refresh();
            directory.OnPropertyChanged(nameof(directory.SidecarExists));
            directory.OnPropertyChanged(nameof(directory.Sidecar));
        }