Browse Source

fix samples/DisplayBindings

pull/297/head
Siegfried Pammer 12 years ago
parent
commit
d2f52ab9e2
  1. 3
      samples/DisplayBindings/AlternateEditor/AlternateEditor.csproj
  2. 6
      samples/DisplayBindings/AlternateEditor/AlternateEditor.sln
  3. 12
      samples/DisplayBindings/AlternateEditor/AlternateEditorDisplayBinding.cs
  4. 13
      samples/DisplayBindings/AlternateEditor/Editor.cs
  5. 3
      samples/DisplayBindings/HtmlPreview/HtmlPreview.csproj
  6. 6
      samples/DisplayBindings/HtmlPreview/HtmlPreview.sln
  7. 3
      samples/DisplayBindings/HtmlPreview/Src/PreviewDisplayBinding.cs
  8. 3
      samples/DisplayBindings/HtmlPreview/Src/PreviewViewContent.cs
  9. 3
      samples/DisplayBindings/ImageViewer/ImageViewer.csproj
  10. 6
      samples/DisplayBindings/ImageViewer/ImageViewer.sln
  11. 4
      samples/DisplayBindings/ImageViewer/Src/ImageViewContent.cs
  12. 8
      samples/DisplayBindings/ImageViewer/Src/ImageViewerDisplayBinding.cs

3
samples/DisplayBindings/AlternateEditor/AlternateEditor.csproj

@ -16,7 +16,8 @@ @@ -16,7 +16,8 @@
<FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\..\..\AddIns\Samples\AlternateEditor\</OutputPath>

6
samples/DisplayBindings/AlternateEditor/AlternateEditor.sln

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# SharpDevelop 4.0.0.5571
# SharpDevelop 5.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlternateEditor", "AlternateEditor.csproj", "{2DCF1D56-2362-4C44-B0CE-C635B0B4BB7C}"
EndProject
Global
@ -10,9 +10,9 @@ Global @@ -10,9 +10,9 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2DCF1D56-2362-4C44-B0CE-C635B0B4BB7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DCF1D56-2362-4C44-B0CE-C635B0B4BB7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DCF1D56-2362-4C44-B0CE-C635B0B4BB7C}.Release|Any CPU.Build.0 = Release|Any CPU
{2DCF1D56-2362-4C44-B0CE-C635B0B4BB7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DCF1D56-2362-4C44-B0CE-C635B0B4BB7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DCF1D56-2362-4C44-B0CE-C635B0B4BB7C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

12
samples/DisplayBindings/AlternateEditor/AlternateEditorDisplayBinding.cs

@ -25,18 +25,18 @@ @@ -25,18 +25,18 @@
// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui;
using System;
using System.IO;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Workbench;
namespace AlternateEditor
{
public class AlternateEditorDisplayBinding : IDisplayBinding
{
public bool CanCreateContentForFile(string fileName)
public bool CanCreateContentForFile(FileName fileName)
{
return true;
}
@ -46,12 +46,12 @@ namespace AlternateEditor @@ -46,12 +46,12 @@ namespace AlternateEditor
return new Editor(file);
}
public bool IsPreferredBindingForFile(string fileName)
public bool IsPreferredBindingForFile(FileName fileName)
{
return true;
}
public double AutoDetectFileContent(string fileName, Stream fileContent, string detectedMimeType)
public double AutoDetectFileContent(FileName fileName, Stream fileContent, string detectedMimeType)
{
return 0;
}

13
samples/DisplayBindings/AlternateEditor/Editor.cs

@ -29,14 +29,11 @@ using System; @@ -29,14 +29,11 @@ using System;
using System.IO;
using System.Windows.Forms;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Editor;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Workbench;
namespace AlternateEditor
{
// TODO: implement ITextEditorProvider interface to enable advanced editor features
public class Editor : AbstractViewContent // , ITextEditorProvider
public class Editor : AbstractViewContent
{
RichTextBox rtb = new RichTextBox();
@ -88,12 +85,6 @@ namespace AlternateEditor @@ -88,12 +85,6 @@ namespace AlternateEditor
}
/*
public ITextEditor TextEditor {
get {
return new TextEditorAdapter(rtb);
}
}
public IDocument GetDocumentForFile(OpenedFile file)
{
if (file == this.PrimaryFile)

3
samples/DisplayBindings/HtmlPreview/HtmlPreview.csproj

@ -19,7 +19,8 @@ @@ -19,7 +19,8 @@
<StartAction>Program</StartAction>
<StartProgram>..\..\..\bin\SharpDevelop.exe</StartProgram>
<OutputPath>..\..\..\AddIns\Samples\HtmlPreview</OutputPath>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize>

6
samples/DisplayBindings/HtmlPreview/HtmlPreview.sln

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# SharpDevelop 4.0.0.5571
# SharpDevelop 5.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlPreview", "HtmlPreview.csproj", "{BECEEB35-A81D-4545-AC8E-BC622451DB99}"
EndProject
Global
@ -10,9 +10,9 @@ Global @@ -10,9 +10,9 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Release|Any CPU.Build.0 = Release|Any CPU
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

3
samples/DisplayBindings/HtmlPreview/Src/PreviewDisplayBinding.cs

@ -26,9 +26,8 @@ @@ -26,9 +26,8 @@
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Workbench;
namespace HtmlPreview
{

3
samples/DisplayBindings/HtmlPreview/Src/PreviewViewContent.cs

@ -27,8 +27,9 @@ @@ -27,8 +27,9 @@
using System;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Workbench;
namespace HtmlPreview
{

3
samples/DisplayBindings/ImageViewer/ImageViewer.csproj

@ -19,7 +19,8 @@ @@ -19,7 +19,8 @@
<StartAction>Program</StartAction>
<StartProgram>..\..\..\bin\SharpDevelop.exe</StartProgram>
<OutputPath>..\..\..\AddIns\Samples\ImageViewer\</OutputPath>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize>

6
samples/DisplayBindings/ImageViewer/ImageViewer.sln

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# SharpDevelop 4.3
# SharpDevelop 5.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageViewer", "ImageViewer.csproj", "{BECEEB35-A81D-4545-AC8E-BC622451DB99}"
EndProject
Global
@ -10,9 +10,9 @@ Global @@ -10,9 +10,9 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Release|Any CPU.Build.0 = Release|Any CPU
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BECEEB35-A81D-4545-AC8E-BC622451DB99}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

4
samples/DisplayBindings/ImageViewer/Src/ImageViewContent.cs

@ -30,9 +30,7 @@ using System.Drawing; @@ -30,9 +30,7 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Workbench;
namespace ImageViewer
{

8
samples/DisplayBindings/ImageViewer/Src/ImageViewerDisplayBinding.cs

@ -27,14 +27,14 @@ @@ -27,14 +27,14 @@
using System;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Workbench;
namespace ImageViewer
{
public class ImageViewerDisplayBinding : IDisplayBinding
{
public bool CanCreateContentForFile(string fileName) {
public bool CanCreateContentForFile(FileName fileName) {
return true;
}
@ -43,12 +43,12 @@ namespace ImageViewer @@ -43,12 +43,12 @@ namespace ImageViewer
return vc;
}
public bool IsPreferredBindingForFile(string fileName)
public bool IsPreferredBindingForFile(FileName fileName)
{
return true;
}
public double AutoDetectFileContent(string fileName, System.IO.Stream fileContent, string detectedMimeType)
public double AutoDetectFileContent(FileName fileName, System.IO.Stream fileContent, string detectedMimeType)
{
return 0;
}

Loading…
Cancel
Save