diff --git a/BundleManager.sln b/BundleManager.sln index 6b5f7f1..40d2fcb 100644 --- a/BundleManager.sln +++ b/BundleManager.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.33627.172 +# Visual Studio Version 18 +VisualStudioVersion = 18.5.11723.231 stable MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BundleManager", "BundleManager\BundleManager.csproj", "{F11A0DF0-A25C-4E94-AA54-D0DD51F15A8E}" ProjectSection(ProjectDependencies) = postProject @@ -31,8 +31,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MathLib", "MathLib\MathLib. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BundleUtilities", "BundleUtilities\BundleUtilities.csproj", "{34471573-F236-4A7C-ABD9-C1FE4686B37E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IconLibrary", "IconLibrary\IconLibrary.csproj", "{A56B769D-941F-4B1E-9905-F5A981FA6EAD}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModelViewer", "ModelViewer\ModelViewer.csproj", "{463D5389-3704-473E-B4C3-B334474CEFDE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LangEditor", "LangEditor\LangEditor.csproj", "{20E7A1C4-AFCD-4B8A-8AEF-06B0C27E72B7}" @@ -194,18 +192,6 @@ Global {34471573-F236-4A7C-ABD9-C1FE4686B37E}.Release|x64.Build.0 = Release|Any CPU {34471573-F236-4A7C-ABD9-C1FE4686B37E}.Release|x86.ActiveCfg = Release|Any CPU {34471573-F236-4A7C-ABD9-C1FE4686B37E}.Release|x86.Build.0 = Release|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Debug|x64.ActiveCfg = Debug|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Debug|x64.Build.0 = Debug|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Debug|x86.ActiveCfg = Debug|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Debug|x86.Build.0 = Debug|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Release|Any CPU.Build.0 = Release|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Release|x64.ActiveCfg = Release|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Release|x64.Build.0 = Release|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Release|x86.ActiveCfg = Release|Any CPU - {A56B769D-941F-4B1E-9905-F5A981FA6EAD}.Release|x86.Build.0 = Release|Any CPU {463D5389-3704-473E-B4C3-B334474CEFDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {463D5389-3704-473E-B4C3-B334474CEFDE}.Debug|Any CPU.Build.0 = Debug|Any CPU {463D5389-3704-473E-B4C3-B334474CEFDE}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -329,7 +315,6 @@ Global {07E80234-B95F-42DC-99A3-A89A929DDDBF} = {60F98E02-807F-4EDC-8747-147C365606B1} {E9E7FFA3-84AE-42AF-BFE3-C50D2B034C28} = {3BA7CE56-4E22-418F-9D13-F2189413D30B} {34471573-F236-4A7C-ABD9-C1FE4686B37E} = {3BA7CE56-4E22-418F-9D13-F2189413D30B} - {A56B769D-941F-4B1E-9905-F5A981FA6EAD} = {3BA7CE56-4E22-418F-9D13-F2189413D30B} {463D5389-3704-473E-B4C3-B334474CEFDE} = {3BA7CE56-4E22-418F-9D13-F2189413D30B} {20E7A1C4-AFCD-4B8A-8AEF-06B0C27E72B7} = {60F98E02-807F-4EDC-8747-147C365606B1} {757F0204-F091-464D-AA42-FE8919FF73BB} = {3BA7CE56-4E22-418F-9D13-F2189413D30B} diff --git a/BundleManager.sln.DotSettings.user b/BundleManager.sln.DotSettings.user deleted file mode 100644 index 36ca543..0000000 --- a/BundleManager.sln.DotSettings.user +++ /dev/null @@ -1,17 +0,0 @@ - - True - True - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="" Style="AA_BB" /></Policy> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="False" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="BIF_" Suffix="" Style="AA_BB"><ExtraRule Prefix="" Suffix="" Style="AA_BB" /></Policy> - <Policy Inspect="False" Prefix="_" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <AssemblyExplorer> - <Assembly Path="E:\Repositories\Bundle Manager\BundleFormat\bin\Release\ManagedZLib.dll" /> -</AssemblyExplorer> \ No newline at end of file diff --git a/Graphics/icon-128.png b/Graphics/icon-128.png deleted file mode 100644 index 00c46dc..0000000 Binary files a/Graphics/icon-128.png and /dev/null differ diff --git a/Graphics/icon-128.psd b/Graphics/icon-128.psd deleted file mode 100644 index f83d243..0000000 Binary files a/Graphics/icon-128.psd and /dev/null differ diff --git a/Graphics/icon-16.png b/Graphics/icon-16.png deleted file mode 100644 index 8d097af..0000000 Binary files a/Graphics/icon-16.png and /dev/null differ diff --git a/Graphics/icon-16.psd b/Graphics/icon-16.psd deleted file mode 100644 index 1d5f25d..0000000 Binary files a/Graphics/icon-16.psd and /dev/null differ diff --git a/Graphics/icon-256.png b/Graphics/icon-256.png deleted file mode 100644 index bea82f7..0000000 Binary files a/Graphics/icon-256.png and /dev/null differ diff --git a/Graphics/icon-256.psd b/Graphics/icon-256.psd deleted file mode 100644 index da115c6..0000000 Binary files a/Graphics/icon-256.psd and /dev/null differ diff --git a/Graphics/icon-32.png b/Graphics/icon-32.png deleted file mode 100644 index 462286d..0000000 Binary files a/Graphics/icon-32.png and /dev/null differ diff --git a/Graphics/icon-32.psd b/Graphics/icon-32.psd deleted file mode 100644 index ac4c159..0000000 Binary files a/Graphics/icon-32.psd and /dev/null differ diff --git a/Graphics/icon-64.png b/Graphics/icon-64.png deleted file mode 100644 index 972454c..0000000 Binary files a/Graphics/icon-64.png and /dev/null differ diff --git a/Graphics/icon-64.psd b/Graphics/icon-64.psd deleted file mode 100644 index b22a0ec..0000000 Binary files a/Graphics/icon-64.psd and /dev/null differ diff --git a/Graphics/icon.ico b/Graphics/icon.ico deleted file mode 100644 index de5bbe3..0000000 Binary files a/Graphics/icon.ico and /dev/null differ diff --git a/Graphics/icon.xcf b/Graphics/icon.xcf deleted file mode 100644 index 192b3dc..0000000 Binary files a/Graphics/icon.xcf and /dev/null differ diff --git a/IconLibrary/IconHelper.cs b/IconLibrary/IconHelper.cs deleted file mode 100644 index bcac4ba..0000000 --- a/IconLibrary/IconHelper.cs +++ /dev/null @@ -1,240 +0,0 @@ -// From https://www.codeproject.com/Articles/2532/Obtaining-and-managing-file-and-folder-icons-using - -using System; -using System.Runtime.InteropServices; - -namespace IconLibrary -{ - /// - /// Provides static methods to read system icons for both folders and files. - /// - /// - /// IconReader.GetFileIcon("c:\\general.xls"); - /// - public class IconReader - { - /// - /// Options to specify the size of icons to return. - /// - public enum IconSize - { - /// - /// Specify large icon - 32 pixels by 32 pixels. - /// - Large = 0, - /// - /// Specify small icon - 16 pixels by 16 pixels. - /// - Small = 1 - } - - /// - /// Options to specify whether folders should be in the open or closed state. - /// - public enum FolderType - { - /// - /// Specify open folder. - /// - Open = 0, - /// - /// Specify closed folder. - /// - Closed = 1 - } - - /// - /// Returns an icon for a given file - indicated by the name parameter. - /// - /// Pathname for file. - /// Large or small - /// Whether to include the link icon - /// System.Drawing.Icon - public static System.Drawing.Icon GetFileIcon(string name, IconSize size, bool linkOverlay) - { - Shell32.SHFILEINFO shfi = new Shell32.SHFILEINFO(); - uint flags = Shell32.SHGFI_ICON | Shell32.SHGFI_USEFILEATTRIBUTES; - - if (true == linkOverlay) flags += Shell32.SHGFI_LINKOVERLAY; - - /* Check the size specified for return. */ - if (IconSize.Small == size) - { - flags += Shell32.SHGFI_SMALLICON ; - } - else - { - flags += Shell32.SHGFI_LARGEICON ; - } - - Shell32.SHGetFileInfo(name, - Shell32.FILE_ATTRIBUTE_NORMAL, - ref shfi, - (uint) System.Runtime.InteropServices.Marshal.SizeOf(shfi), - flags ); - - // Copy (clone) the returned icon to a new object, thus allowing us to clean-up properly - System.Drawing.Icon icon = (System.Drawing.Icon)System.Drawing.Icon.FromHandle(shfi.hIcon).Clone(); - User32.DestroyIcon( shfi.hIcon ); // Cleanup - return icon; - } - - /// - /// Used to access system folder icons. - /// - /// Specify large or small icons. - /// Specify open or closed FolderType. - /// System.Drawing.Icon - public static System.Drawing.Icon GetFolderIcon( IconSize size, FolderType folderType ) - { - // Need to add size check, although errors generated at present! - uint flags = Shell32.SHGFI_ICON | Shell32.SHGFI_USEFILEATTRIBUTES; - - if (FolderType.Open == folderType) - { - flags += Shell32.SHGFI_OPENICON; - } - - if (IconSize.Small == size) - { - flags += Shell32.SHGFI_SMALLICON; - } - else - { - flags += Shell32.SHGFI_LARGEICON; - } - - // Get the folder icon - Shell32.SHFILEINFO shfi = new Shell32.SHFILEINFO(); - Shell32.SHGetFileInfo(null, - Shell32.FILE_ATTRIBUTE_DIRECTORY, - ref shfi, - (uint) System.Runtime.InteropServices.Marshal.SizeOf(shfi), - flags ); - - System.Drawing.Icon.FromHandle(shfi.hIcon); // Load the icon from an HICON handle - - // Now clone the icon, so that it can be successfully stored in an ImageList - System.Drawing.Icon icon = (System.Drawing.Icon)System.Drawing.Icon.FromHandle(shfi.hIcon).Clone(); - - User32.DestroyIcon( shfi.hIcon ); // Cleanup - return icon; - } - } - - /// - /// Wraps necessary Shell32.dll structures and functions required to retrieve Icon Handles using SHGetFileInfo. Code - /// courtesy of MSDN Cold Rooster Consulting case study. - /// - /// - - // This code has been left largely untouched from that in the CRC example. The main changes have been moving - // the icon reading code over to the IconReader type. - public class Shell32 - { - - public const int MAX_PATH = 256; - [StructLayout(LayoutKind.Sequential)] - public struct SHITEMID - { - public ushort cb; - [MarshalAs(UnmanagedType.LPArray)] - public byte[] abID; - } - - [StructLayout(LayoutKind.Sequential)] - public struct ITEMIDLIST - { - public SHITEMID mkid; - } - - [StructLayout(LayoutKind.Sequential)] - public struct BROWSEINFO - { - public IntPtr hwndOwner; - public IntPtr pidlRoot; - public IntPtr pszDisplayName; - [MarshalAs(UnmanagedType.LPTStr)] - public string lpszTitle; - public uint ulFlags; - public IntPtr lpfn; - public int lParam; - public IntPtr iImage; - } - - // Browsing for directory. - public const uint BIF_RETURNONLYFSDIRS = 0x0001; - public const uint BIF_DONTGOBELOWDOMAIN = 0x0002; - public const uint BIF_STATUSTEXT = 0x0004; - public const uint BIF_RETURNFSANCESTORS = 0x0008; - public const uint BIF_EDITBOX = 0x0010; - public const uint BIF_VALIDATE = 0x0020; - public const uint BIF_NEWDIALOGSTYLE = 0x0040; - public const uint BIF_USENEWUI = (BIF_NEWDIALOGSTYLE | BIF_EDITBOX); - public const uint BIF_BROWSEINCLUDEURLS = 0x0080; - public const uint BIF_BROWSEFORCOMPUTER = 0x1000; - public const uint BIF_BROWSEFORPRINTER = 0x2000; - public const uint BIF_BROWSEINCLUDEFILES = 0x4000; - public const uint BIF_SHAREABLE = 0x8000; - - [StructLayout(LayoutKind.Sequential)] - public struct SHFILEINFO - { - public const int NAMESIZE = 80; - public IntPtr hIcon; - public int iIcon; - public uint dwAttributes; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst=MAX_PATH)] - public string szDisplayName; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst=NAMESIZE)] - public string szTypeName; - }; - - public const uint SHGFI_ICON = 0x000000100; // get icon - public const uint SHGFI_DISPLAYNAME = 0x000000200; // get display name - public const uint SHGFI_TYPENAME = 0x000000400; // get type name - public const uint SHGFI_ATTRIBUTES = 0x000000800; // get attributes - public const uint SHGFI_ICONLOCATION = 0x000001000; // get icon location - public const uint SHGFI_EXETYPE = 0x000002000; // return exe type - public const uint SHGFI_SYSICONINDEX = 0x000004000; // get system icon index - public const uint SHGFI_LINKOVERLAY = 0x000008000; // put a link overlay on icon - public const uint SHGFI_SELECTED = 0x000010000; // show icon in selected state - public const uint SHGFI_ATTR_SPECIFIED = 0x000020000; // get only specified attributes - public const uint SHGFI_LARGEICON = 0x000000000; // get large icon - public const uint SHGFI_SMALLICON = 0x000000001; // get small icon - public const uint SHGFI_OPENICON = 0x000000002; // get open icon - public const uint SHGFI_SHELLICONSIZE = 0x000000004; // get shell size icon - public const uint SHGFI_PIDL = 0x000000008; // pszPath is a pidl - public const uint SHGFI_USEFILEATTRIBUTES = 0x000000010; // use passed dwFileAttribute - public const uint SHGFI_ADDOVERLAYS = 0x000000020; // apply the appropriate overlays - public const uint SHGFI_OVERLAYINDEX = 0x000000040; // Get the index of the overlay - - public const uint FILE_ATTRIBUTE_DIRECTORY = 0x00000010; - public const uint FILE_ATTRIBUTE_NORMAL = 0x00000080; - - [DllImport("Shell32.dll")] - public static extern IntPtr SHGetFileInfo( - string pszPath, - uint dwFileAttributes, - ref SHFILEINFO psfi, - uint cbFileInfo, - uint uFlags - ); - } - - /// - /// Wraps necessary functions imported from User32.dll. Code courtesy of MSDN Cold Rooster Consulting example. - /// - public class User32 - { - /// - /// Provides access to function required to delete handle. This method is used internally - /// and is not required to be called separately. - /// - /// Pointer to icon handle. - /// N/A - [DllImport("User32.dll")] - public static extern int DestroyIcon( IntPtr hIcon ); - } -} - diff --git a/IconLibrary/IconLibrary.csproj b/IconLibrary/IconLibrary.csproj deleted file mode 100644 index 776e59e..0000000 --- a/IconLibrary/IconLibrary.csproj +++ /dev/null @@ -1,7 +0,0 @@ - - - net8.0-windows;net9.0-windows;net10.0-windows - Library - true - - \ No newline at end of file diff --git a/IconLibrary/IconListManager.cs b/IconLibrary/IconListManager.cs deleted file mode 100644 index 5d5f98e..0000000 --- a/IconLibrary/IconListManager.cs +++ /dev/null @@ -1,115 +0,0 @@ -// From https://www.codeproject.com/Articles/2532/Obtaining-and-managing-file-and-folder-icons-using - -using System; -using System.Collections; -using System.Windows.Forms; - -namespace IconLibrary -{ - /// - /// Maintains a list of currently added file extensions - /// - public class IconListManager - { - private Hashtable _extensionList = new Hashtable(); - private System.Collections.ArrayList _imageLists = new ArrayList(); //will hold ImageList objects - private IconReader.IconSize _iconSize; - bool ManageBothSizes = false; //flag, used to determine whether to create two ImageLists. - - /// - /// Creates an instance of IconListManager that will add icons to a single ImageList using the - /// specified IconSize. - /// - /// ImageList to add icons to. - /// Size to use (either 32 or 16 pixels). - public IconListManager(System.Windows.Forms.ImageList imageList, IconReader.IconSize iconSize ) - { - // Initialise the members of the class that will hold the image list we're - // targeting, as well as the icon size (32 or 16) - _imageLists.Add( imageList ); - _iconSize = iconSize; - } - - /// - /// Creates an instance of IconListManager that will add icons to two ImageList types. The two - /// image lists are intended to be one for large icons, and the other for small icons. - /// - /// The ImageList that will hold small icons. - /// The ImageList that will hold large icons. - public IconListManager(System.Windows.Forms.ImageList smallImageList, System.Windows.Forms.ImageList largeImageList ) - { - //add both our image lists - _imageLists.Add( smallImageList ); - _imageLists.Add( largeImageList ); - - //set flag - ManageBothSizes = true; - } - - /// - /// Used internally, adds the extension to the hashtable, so that its value can then be returned. - /// - /// String of the file's extension. - /// Position of the extension in the ImageList. - private void AddExtension( string Extension, int ImageListPosition ) - { - _extensionList.Add( Extension, ImageListPosition ); - } - - /// - /// Called publicly to add a file's icon to the ImageList. - /// - /// Full path to the file. - /// Integer of the icon's position in the ImageList - public int AddFileIcon( string filePath ) - { - // Check if the file exists, otherwise, throw exception. - if (!System.IO.File.Exists( filePath ) && !System.IO.Directory.Exists( filePath )) throw new System.IO.FileNotFoundException("File does not exist"); - - // Split it down so we can get the extension - string[] splitPath = filePath.Split(new Char[] {'.'}); - string extension = (string)splitPath.GetValue( splitPath.GetUpperBound(0) ); - - //Check that we haven't already got the extension, if we have, then - //return back its index - if (_extensionList.ContainsKey( extension.ToUpper() )) - { - return (int)_extensionList[extension.ToUpper()]; //return existing index - } - else - { - // It's not already been added, so add it and record its position. - - int pos = ((ImageList)_imageLists[0]).Images.Count; //store current count -- new item's index - - if (ManageBothSizes == true) - { - //managing two lists, so add it to small first, then large - ((ImageList)_imageLists[0]).Images.Add( IconReader.GetFileIcon( filePath, IconReader.IconSize.Small, false ) ); - ((ImageList)_imageLists[1]).Images.Add( IconReader.GetFileIcon( filePath, IconReader.IconSize.Large, false ) ); - } - else - { - //only doing one size, so use IconSize as specified in _iconSize. - ((ImageList)_imageLists[0]).Images.Add( IconReader.GetFileIcon( filePath, _iconSize, false ) ); //add to image list - } - - AddExtension( extension.ToUpper(), pos ); // add to hash table - return pos; - } - } - - /// - /// Clears any ImageLists that IconListManager is managing. - /// - public void ClearLists() - { - foreach( ImageList imageList in _imageLists ) - { - imageList.Images.Clear(); //clear current imagelist. - } - - _extensionList.Clear(); //empty hashtable of entries too. - } - } -} diff --git a/ResBNDManager.rct b/ResBNDManager.rct deleted file mode 100644 index 33e7bbf..0000000 Binary files a/ResBNDManager.rct and /dev/null differ