FileAssociation/FileAssociationInfo.cs
/// <summary>
/// Gets array of containing program file names which should be displayed in the Open With List.
/// </summary>
/// <param name="file"><see cref="FileAssociationInfo"/> that provides specifics of the extension to be changed.</param>
/// <returns>Program file names</returns>
Gets array of containing program file names which should be displayed in the Open With List.
Gets array of containing program file names which should be displayed in the Open With List .
protected string[] GetOpenWithList(FileAssociationInfo file)
        {
            if (!file.Exists)
                throw new Exception("Extension does not exist");
            RegistryKey root = RegistryWrapper.ClassesRoot;
            RegistryKey key = root.OpenSubKey(file.extension);
            key = key.OpenSubKey("OpenWithList");
            if (key == null)
            {
                return new string[0];
            }
            return key.GetSubKeyNames();
        }
protected string [ ] GetOpenWithList ( FileAssociationInfo file ) { if ( ! file . Exists ) throw new Exception ( " " ) ; RegistryKey root = RegistryWrapper . ClassesRoot ; RegistryKey key = root . OpenSubKey ( file . extension ) ; key = key . OpenSubKey ( " " ) ; if ( key == null ) { return new string [ 0 ] ; } return key . GetSubKeyNames ( ) ; }
Gets array of containing program file names which should be displayed in the Open With List.
Gets array of containing program file names which should be displayed in the Open With List .
Program file names
Program file names
file
FileAssociationInfo
that provides specifics of the extension to be changed.
that provides specifics of the extension to be changed .