DO NOT DOWNLOAD. DOWNLOAT LATEST STABLE FROM RELEASE TAB

Created 4.1.0 branch

[TFS Changeset #55082]
This commit is contained in:
Shandem
2009-06-19 07:39:16 +00:00
commit f6d0d043b5
2917 changed files with 267089 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using umbraco.interfaces;
using umbraco.editorControls;
namespace umbraco.editorControls.userControlGrapper
{
public class usercontrolDataEditor : System.Web.UI.WebControls.PlaceHolder, umbraco.interfaces.IDataEditor
{
private umbraco.interfaces.IData _data;
private string _usercontrolPath;
public usercontrolDataEditor(umbraco.interfaces.IData Data, string UsercontrolPath)
{
_data = Data;
_usercontrolPath = UsercontrolPath;
}
public virtual bool TreatAsRichTextEditor
{
get {return false;}
}
public bool ShowLabel
{
get {return true;}
}
public Control Editor {get{return this;}}
public void Save()
{
IUsercontrolDataEditor uc =
(IUsercontrolDataEditor)Controls[0] as IUsercontrolDataEditor;
_data.Value = uc.value;
}
protected override void OnInit(EventArgs e)
{
base.OnInit (e);
this.Controls.Add(
new System.Web.UI.UserControl().LoadControl(_usercontrolPath));
if (!Page.IsPostBack)
((IUsercontrolDataEditor)Controls[0] as IUsercontrolDataEditor).value = _data.Value;
}
}
}