~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to samples/DisplayBindings/HtmlPreview/Src/PreviewDisplayBinding.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// SharpDevelop samples
 
2
// Copyright (c) 2006, AlphaSierraPapa
 
3
// All rights reserved.
 
4
//
 
5
// Redistribution and use in source and binary forms, with or without modification, are
 
6
// permitted provided that the following conditions are met:
 
7
//
 
8
// - Redistributions of source code must retain the above copyright notice, this list
 
9
//   of conditions and the following disclaimer.
 
10
//
 
11
// - Redistributions in binary form must reproduce the above copyright notice, this list
 
12
//   of conditions and the following disclaimer in the documentation and/or other materials
 
13
//   provided with the distribution.
 
14
//
 
15
// - Neither the name of the SharpDevelop team nor the names of its contributors may be used to
 
16
//   endorse or promote products derived from this software without specific prior written
 
17
//   permission.
 
18
//
 
19
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &AS IS& AND ANY EXPRESS
 
20
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 
21
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 
22
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
23
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 
24
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 
25
// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 
26
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
27
 
 
28
using System;
 
29
using ICSharpCode.Core;
 
30
using ICSharpCode.SharpDevelop;
 
31
using ICSharpCode.SharpDevelop.Gui;
 
32
 
 
33
namespace HtmlPreview
 
34
{
 
35
        /// <summary>
 
36
        /// Description of PreviewDisplayBinding.
 
37
        /// </summary>
 
38
        public class PreviewDisplayBinding : ISecondaryDisplayBinding
 
39
        {
 
40
                public bool ReattachWhenParserServiceIsReady {
 
41
                        get {
 
42
                                return false;
 
43
                        }
 
44
                }
 
45
                
 
46
                public bool CanAttachTo(IViewContent content) {
 
47
                        return true;
 
48
                }
 
49
                
 
50
                public IViewContent[] CreateSecondaryViewContent(IViewContent viewContent) {
 
51
                        return new IViewContent[] { new PreviewViewContent(viewContent) };
 
52
                }
 
53
        }
 
54
}