| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- //
- // System.Web.UI.TemplateControl.cs
- //
- // Duncan Mak ([email protected])
- //
- // (C) Ximian, Inc.
- //
- using System;
- namespace System.Web.UI {
- public abstract class TemplateControl : Control, INamingContainer
- {
- private object abortTransaction = new object ();
- private object commitTransaction = new object ();
- private object error = new object ();
- #region Constructor
- protected TemplateControl ()
- {
- Construct ();
- }
- #endregion
- #region Properties
- protected virtual int AutoHandlers
- {
- get { return 0; }
- set { }
- }
- protected virtual bool SupportAutoEvents
- {
- get { return true; }
- }
- #endregion
- #region Methods
- protected virtual void Construct ()
- {
- }
- [MonoTODO]
- protected virtual LiteralControl CreateResourceBasedLiteralControl (int offset,
- int size,
- bool fAsciiOnly)
- {
- return null;
- }
- protected virtual void FrameworkInitialize ()
- {
- }
- [MonoTODO]
- public Control LoadControl (string virtualPath)
- {
- return null;
- }
- [MonoTODO]
- public ITemplate LoadTemplate (string virtualPath)
- {
- return null;
- }
- protected virtual void OnAbortTransaction (EventArgs e)
- {
- EventHandler eh = (EventHandler) Events [error];
- if (eh != null)
- eh.Invoke (this, e);
- }
- protected virtual void OnCommitTransaction (EventArgs e)
- {
- EventHandler eh = (EventHandler) Events [commitTransaction];
- if (eh != null)
- eh.Invoke (this, e);
- }
- protected virtual void OnError (EventArgs e)
- {
- EventHandler eh = (EventHandler) Events [abortTransaction];
- if (eh != null)
- eh.Invoke (this, e);
- }
- [MonoTODO]
- public Control ParseControl (string content)
- {
- return null;
- }
- [MonoTODO]
- public static object ReadStringResource (Type t)
- {
- return null;
- }
- [MonoTODO]
- protected void SetStringResourcePointer (object stringResourcePointer,
- int maxResourceOffset)
- {
- }
- [MonoTODO]
- protected void WriteUTF8ResourceString (HtmlTextWriter output, int offset,
- int size, bool fAsciiOnly)
- {
- }
- #endregion
- #region Events
- public event EventHandler AbortTransaction
- {
- add {
- Events.AddHandler (abortTransaction, value);
- }
- remove {
- Events.RemoveHandler (abortTransaction, value);
- }
- }
- public event EventHandler CommitTransaction
- {
- add {
- Events.AddHandler (commitTransaction, value);
- }
- remove {
- Events.RemoveHandler (commitTransaction, value);
- }
- }
- public event EventHandler Error
- {
- add {
- Events.AddHandler (error, value);
- }
- remove {
- Events.RemoveHandler (error, value);
- }
- }
- #endregion
- }
- }
|