-
-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
61 changed files
with
1,584 additions
and
768 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Version 2.2 | ||
|
||
* SharpShell is now built with Visual Studio 2013 Community Edition. | ||
* Overhauled the logging mechanism. | ||
* Fixed preview handler bugs #33, #58, #50, #52, #56. | ||
* Preview handlers no longer flicker. | ||
|
||
|
||
### Breaking Changes | ||
|
||
* `Logging.DebugLog` and `Logging.DebugError` are no longer available. Logging is | ||
enabled based on configuration in the registry rather than debug mode. Use | ||
`Logging.Log` or `Logging.Error` instead. | ||
* `Logging` class has no facility to enable/disable logging. | ||
* Preview Handlers MUST be decorated with the `PreviewHandler` attribute. This | ||
pattern will be implemented for other extensions in time. | ||
|
||
### srm | ||
|
||
* Show SharpShell config on the machine with `srm config`. | ||
|
||
### Development | ||
|
||
* The SharpShell assembly embedded into SRM is updated automatically during the build. |
38 changes: 38 additions & 0 deletions
38
SharpShell/Samples/PreviewHandler/AbcPreviewHandler/AbcPreviewHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System.Runtime.InteropServices; | ||
using SharpShell.Attributes; | ||
using SharpShell.SharpPreviewHandler; | ||
|
||
namespace AbcPreviewHandler | ||
{ | ||
/// <summary> | ||
/// The Abc Preview Handler is a preview handler that shows a simple | ||
/// coloured background for ABC files. | ||
/// </summary> | ||
[ComVisible(true)] | ||
[COMServerAssociation(AssociationType.ClassOfExtension, ".abc")] | ||
[DisplayName("Abc Preview Handler")] | ||
[Guid("B86199F1-13D0-4711-AFE6-08C1E4C58905")] | ||
[PreviewHandler(DisableLowILProcessIsolation = false)] | ||
public class AbcPreviewHandler : SharpPreviewHandler | ||
{ | ||
/// <summary> | ||
/// DoPreview must create the preview handler user interface and initialize it with data | ||
/// provided by the shell. | ||
/// </summary> | ||
/// <returns> | ||
/// The preview handler user interface. | ||
/// </returns> | ||
protected override PreviewHandlerControl DoPreview() | ||
{ | ||
// Create the handler control. | ||
var handler = new AbcPreviewHandlerControl(); | ||
|
||
// Do we have a file path? If so, we can do a preview. | ||
if(!string.IsNullOrEmpty(SelectedFilePath)) | ||
handler.DoPreview(SelectedFilePath); | ||
|
||
// Return the handler control. | ||
return handler; | ||
} | ||
} | ||
} |
81 changes: 81 additions & 0 deletions
81
SharpShell/Samples/PreviewHandler/AbcPreviewHandler/AbcPreviewHandler.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{1A56CE6E-68DF-42A3-A8C4-B28D6E5EF632}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>AbcPreviewHandler</RootNamespace> | ||
<AssemblyName>AbcPreviewHandler</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SignAssembly>true</SignAssembly> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="System.Windows.Forms" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="AbcPreviewHandler.cs" /> | ||
<Compile Include="AbcPreviewHandlerControl.cs"> | ||
<SubType>UserControl</SubType> | ||
</Compile> | ||
<Compile Include="AbcPreviewHandlerControl.Designer.cs"> | ||
<DependentUpon>AbcPreviewHandlerControl.cs</DependentUpon> | ||
</Compile> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="Key.snk" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<EmbeddedResource Include="AbcPreviewHandlerControl.resx"> | ||
<DependentUpon>AbcPreviewHandlerControl.cs</DependentUpon> | ||
</EmbeddedResource> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\SharpShell\SharpShell.csproj"> | ||
<Project>{B5D5F670-BFBA-4D09-91C6-74BB12B7EDD4}</Project> | ||
<Name>SharpShell</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
44 changes: 44 additions & 0 deletions
44
SharpShell/Samples/PreviewHandler/AbcPreviewHandler/AbcPreviewHandlerControl.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
SharpShell/Samples/PreviewHandler/AbcPreviewHandler/AbcPreviewHandlerControl.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System.Collections.Generic; | ||
using System.Drawing; | ||
using System.Linq; | ||
using System.Windows.Forms; | ||
using SharpShell.Diagnostics; | ||
using SharpShell.SharpPreviewHandler; | ||
|
||
namespace AbcPreviewHandler | ||
{ | ||
/// <summary> | ||
/// A user control that shows the icons in an icon file. | ||
/// </summary> | ||
public partial class AbcPreviewHandlerControl : PreviewHandlerControl | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="AbcPreviewHandlerControl"/> class. | ||
/// </summary> | ||
public AbcPreviewHandlerControl() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Does the preview. | ||
/// </summary> | ||
/// <param name="selectedFilePath">The selected file path.</param> | ||
public void DoPreview(string selectedFilePath) | ||
{ | ||
|
||
} | ||
|
||
/// <summary> | ||
/// Sets the color of the background, if possible, to coordinate with the windows | ||
/// color scheme. | ||
/// </summary> | ||
/// <param name="color">The color.</param> | ||
protected override void SetVisualsBackgroundColor(Color color) | ||
{ | ||
// Set the background color. | ||
//BackColor = color; | ||
} | ||
} | ||
} |
File renamed without changes.
Binary file not shown.
36 changes: 36 additions & 0 deletions
36
SharpShell/Samples/PreviewHandler/AbcPreviewHandler/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("AbcPreviewHandler")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("AbcPreviewHandler")] | ||
[assembly: AssemblyCopyright("Copyright © 2014")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("e15a6c4a-3b3d-4385-bbac-30466a9eee37")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.