EditControlAdapter.cs :  » Bloggers » dasBlog » newtelligence » DasBlog » Web » Core » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Bloggers » dasBlog 
dasBlog » newtelligence » DasBlog » Web » Core » EditControlAdapter.cs
using System;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace newtelligence.DasBlog.Web.Core{
  /// <summary>
  /// Converts a 3rd party text editor control's interface to the common interface needed by dasBlog
  /// </summary>
  public abstract class EditControlAdapter
  {
    /// <summary>
    /// An instance of the control being adapted
    /// </summary>
    public abstract Control Control { get ; }

    /// <summary>
    /// Gets or sets the text content of the control being adapted
    /// </summary>
    public abstract string Text 
    { 
      get;
      set;
    }

    /// <summary>
    /// true if the Text property holds a non-default value; otherwise false.
    /// </summary>
    /// <returns></returns>
    public virtual bool HasText() { return (Text != null && Text.Length > 0); }

    /// <summary>
    /// Performs additional initialization required after the control has been 
    /// added to a parent control tree.
    /// </summary>
    /// <remarks>While most initialization should be performed in the adapter's 
    /// constructor, there may be some steps that cannot be performed until the 
    /// adapted control has been added to a control tree (ex: Page).</remarks>
    public virtual void Initialize() {}

    /// <summary>
    /// Gets or sets the width of the adapted control
    /// </summary>
    public abstract Unit Width { get; set; }
    
    /// <summary>
    /// Gets or sets the height of the adapted control
    /// </summary>
    public abstract Unit Height { get; set; }

    /// <summary>
    /// Sets the direction of the text in the Text property.
    /// </summary>
    /// <param name="textDirection">The direction of the text in the Text property</param>
    public virtual void SetTextDirection(SharedBasePage.TextDirection textDirection) {}

    /// <summary>
    /// Sets the language of the text in the Text property.
    /// </summary>
    /// <param name="language">The language of the Text property.</param>
    public virtual void SetLanguage(string language) {}

  }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.