Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs')
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs71
1 files changed, 23 insertions, 48 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs b/mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs
index 7993443ae4b..fe7716ef12a 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs
@@ -95,12 +95,6 @@ namespace System.Web.UI.WebControls
Target = target;
}
- [MonoTODO]
- protected TreeNode (TreeView owner, bool isRoot)
- {
- throw new NotImplementedException ();
- }
-
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
public int Depth {
@@ -166,7 +160,7 @@ namespace System.Web.UI.WebControls
}
[DefaultValue (false)]
- public bool Checked {
+ public virtual bool Checked {
get {
object o = ViewState ["Checked"];
if (o != null) return (bool)o;
@@ -183,7 +177,7 @@ namespace System.Web.UI.WebControls
[MergableProperty (false)]
[Browsable (false)]
[PersistenceMode (PersistenceMode.InnerDefaultProperty)]
- public TreeNodeCollection ChildNodes {
+ public virtual TreeNodeCollection ChildNodes {
get {
if (nodes == null) {
if (PopulateOnDemand && tree == null)
@@ -206,12 +200,12 @@ namespace System.Web.UI.WebControls
}
}
- [DefaultValue (null)]
- public bool? Expanded {
+ [DefaultValue (false)]
+ public virtual bool Expanded {
get {
object o = ViewState ["Expanded"];
if (o != null) return (bool)o;
- return true;
+ return false;
}
set {
ViewState ["Expanded"] = value;
@@ -222,7 +216,7 @@ namespace System.Web.UI.WebControls
[Localizable (true)]
[DefaultValue ("")]
- public string ImageToolTip {
+ public virtual string ImageToolTip {
get {
object o = ViewState ["ImageToolTip"];
if (o != null) return (string)o;
@@ -244,7 +238,7 @@ namespace System.Web.UI.WebControls
[DefaultValue ("")]
[UrlProperty]
[Editor ("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, typeof (System.Drawing.Design.UITypeEditor))]
- public string ImageUrl {
+ public virtual string ImageUrl {
get {
object o = ViewState ["ImageUrl"];
if (o != null) return (string)o;
@@ -266,7 +260,7 @@ namespace System.Web.UI.WebControls
[DefaultValue ("")]
[UrlProperty]
[Editor ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, typeof (System.Drawing.Design.UITypeEditor))]
- public string NavigateUrl {
+ public virtual string NavigateUrl {
get {
object o = ViewState ["NavigateUrl"];
if (o != null) return (string)o;
@@ -319,8 +313,8 @@ namespace System.Web.UI.WebControls
}
}
- [DefaultValue (null)]
- public bool? ShowCheckBox {
+ [DefaultValue (false)]
+ public bool ShowCheckBox {
get {
object o = ViewState ["ShowCheckBox"];
if (o != null) return (bool)o;
@@ -329,7 +323,7 @@ namespace System.Web.UI.WebControls
if (bin != null)
return bin.ShowCheckBox;
}
- return true;
+ return false;
}
set {
ViewState ["ShowCheckBox"] = value;
@@ -341,7 +335,7 @@ namespace System.Web.UI.WebControls
}
[DefaultValue ("")]
- public string Target {
+ public virtual string Target {
get {
object o = ViewState ["Target"];
if(o != null) return (string)o;
@@ -363,7 +357,7 @@ namespace System.Web.UI.WebControls
[Localizable (true)]
[DefaultValue ("")]
[WebSysDescription ("The display text of the tree node.")]
- public string Text {
+ public virtual string Text {
get {
object o = ViewState ["Text"];
if (o != null) return (string)o;
@@ -393,7 +387,7 @@ namespace System.Web.UI.WebControls
[Localizable (true)]
[DefaultValue ("")]
- public string ToolTip {
+ public virtual string ToolTip {
get {
object o = ViewState ["ToolTip"];
if(o != null) return (string)o;
@@ -414,7 +408,7 @@ namespace System.Web.UI.WebControls
[Localizable (true)]
[DefaultValue ("")]
- public string Value {
+ public virtual string Value {
get {
object o = ViewState ["Value"];
if(o != null) return (string)o;
@@ -436,7 +430,7 @@ namespace System.Web.UI.WebControls
}
[DefaultValue (false)]
- public bool Selected {
+ public virtual bool Selected {
get {
return SelectedFlag;
}
@@ -526,7 +520,7 @@ namespace System.Web.UI.WebControls
get { return nodes != null; }
}
- internal void Populate ()
+ protected virtual void Populate ()
{
tree.NotifyPopulateRequired (this);
}
@@ -575,12 +569,7 @@ namespace System.Web.UI.WebControls
Expanded = !Expanded;
}
- void IStateManager.LoadViewState (object savedState)
- {
- LoadViewState (savedState);
- }
-
- protected virtual void LoadViewState (object savedState)
+ public void LoadViewState (object savedState)
{
if (savedState == null)
return;
@@ -595,12 +584,7 @@ namespace System.Web.UI.WebControls
((IStateManager)ChildNodes).LoadViewState (states [1]);
}
- object IStateManager.SaveViewState ()
- {
- return SaveViewState ();
- }
-
- protected virtual object SaveViewState ()
+ public object SaveViewState ()
{
object[] states = new object[2];
states[0] = ViewState.SaveViewState();
@@ -612,13 +596,8 @@ namespace System.Web.UI.WebControls
}
return null;
}
-
- void IStateManager.TrackViewState ()
- {
- TrackViewState ();
- }
-
- protected void TrackViewState ()
+
+ public void TrackViewState ()
{
if (marked) return;
marked = true;
@@ -628,11 +607,7 @@ namespace System.Web.UI.WebControls
((IStateManager)nodes).TrackViewState ();
}
- bool IStateManager.IsTrackingViewState {
- get { return IsTrackingViewState; }
- }
-
- protected bool IsTrackingViewState
+ public bool IsTrackingViewState
{
get { return marked; }
}
@@ -642,7 +617,7 @@ namespace System.Web.UI.WebControls
ViewState.SetDirty (true);
}
- public virtual object Clone ()
+ public object Clone ()
{
TreeNode nod = tree != null ? tree.CreateNode () : new TreeNode ();
foreach (DictionaryEntry e in ViewState)