소스 검색

TreeView.cs: fixed: when specified image set is not one of the TreeViewImageSet values exception is threw.

svn path=/trunk/mcs/; revision=64983
Igor Zelmanovich 19 년 전
부모
커밋
ff21dfce47

+ 5 - 0
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,8 @@
+2006-09-06 Igor Zelmanovich <[email protected]>
+
+	* TreeView.cs: fixed: when specified image set is not one of 
+	the TreeViewImageSet values exception is threw.	 
+
 2006-09-05 Igor Zelmanovich <[email protected]>
 
 	* TreeNodeStyleCollection.cs: fixed: ViewState saved and restored correct.	 

+ 2 - 0
mcs/class/System.Web/System.Web.UI.WebControls/TreeView.cs

@@ -319,6 +319,8 @@ namespace System.Web.UI.WebControls
 				return (TreeViewImageSet)ViewState.GetInt ("ImageSet", (int)TreeViewImageSet.Custom);
 			}
 			set {
+				if (!Enum.IsDefined (typeof (TreeViewImageSet), value))
+					throw new ArgumentOutOfRangeException ();
 				ViewState["ImageSet"] = value;
 			}
 		}

+ 4 - 0
mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,7 @@
+2006-09-06 Igor Zelmanovich <[email protected]>
+
+	* TreeViewTest.cs: removed NotWorking attribute
+
 2006-09-05 Igor Zelmanovich <[email protected]>
 
 	* TreeNodeStyleCollectionTest.cs: New test was added

+ 0 - 1
mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeViewTest.cs

@@ -568,7 +568,6 @@ namespace MonoTests.System.Web.UI.WebControls {
 
 		[Test]
 		[ExpectedException (typeof (ArgumentOutOfRangeException))]
-		[Category ("NotWorking")]
 		public void TreeView_Exp_ImageSet () {
 			// The specified image set is not one of the TreeViewImageSet values.
 			PokerTreeView tv = new PokerTreeView ();