チェンジセット 1622 (default)
- 日時:
- 2023/09/22 17:10:14 (13ヵ月前)
- 場所:
- framework/trunk
- ファイル:
-
- 14個の更新
凡例:
- 未変更
- 追加
- 削除
-
framework/trunk/WebApplication/UI/WebControls/RequiredFieldValidatorPage.aspx
r683 r1622 58 58 </div> 59 59 60 <h2>親のコントロールの Enabled の状態</h2> 61 62 <h3>AffectedByAncestors="True" + PlaceHolder(Enabled="False")</h3> 63 <div> 64 <asp:TextBox ID="TextBox201" runat="server" /> 65 <sff:PlaceHolder runat="server" Enabled="False"> 66 <sff:RequiredFieldValidator ID="RequiredFieldValidator201" runat="server" 67 ControlToValidate="TextBox201" 68 ValidationGroup="ValidationGroup201" 69 Display="Dynamic" 70 Text="*" 71 ErrorMessage="RequiredFieldValidator201 Message" 72 AffectedByAncestors="True" /> 73 </sff:PlaceHolder> 74 <asp:Button ID="Button201" runat="server" 75 ValidationGroup="ValidationGroup201" 76 Text="Check" /> 77 </div> 78 <div> 79 <asp:ValidationSummary ID="ValidationSummary201" runat="server" 80 ValidationGroup="ValidationGroup201" /> 81 </div> 82 83 <h3>AffectedByAncestors="True" + PlaceHolder(Enabled=CheckBox.Checked)</h3> 84 <div> 85 <asp:CheckBox ID="CheckBox202" runat="server" 86 AutoPostBack="True" 87 OnCheckedChanged="CheckBox202_OnCheckedChanged"/> 88 <asp:TextBox ID="TextBox202" runat="server" /> 89 <sff:PlaceHolder runat="server" ID="PlaceHolder202" Enabled="False"> 90 <sff:RequiredFieldValidator ID="RequiredFieldValidator202" runat="server" 91 ControlToValidate="TextBox202" 92 ValidationGroup="ValidationGroup202" 93 Display="Dynamic" 94 Text="*" 95 ErrorMessage="RequiredFieldValidator202 Message" 96 AffectedByAncestors="True" /> 97 </sff:PlaceHolder> 98 <asp:Button ID="Button202" runat="server" 99 ValidationGroup="ValidationGroup202" 100 Text="Check" /> 101 </div> 102 <div> 103 <asp:ValidationSummary ID="ValidationSummary202" runat="server" 104 ValidationGroup="ValidationGroup202" /> 105 </div> 106 107 <h3>AffectedByAncestors="False" + PlaceHolder(Enabled="False")</h3> 108 <div> 109 <asp:TextBox ID="TextBox203" runat="server" /> 110 <sff:PlaceHolder runat="server" Enabled="False"> 111 <sff:RequiredFieldValidator ID="RequiredFieldValidator203" runat="server" 112 ControlToValidate="TextBox203" 113 ValidationGroup="ValidationGroup203" 114 Display="Dynamic" 115 Text="*" 116 ErrorMessage="RequiredFieldValidator203 Message" 117 AffectedByAncestors="False" /> 118 </sff:PlaceHolder> 119 <asp:Button ID="Button203" runat="server" 120 ValidationGroup="ValidationGroup203" 121 Text="Check" /> 122 </div> 123 <div> 124 <asp:ValidationSummary ID="ValidationSummary203" runat="server" 125 ValidationGroup="ValidationGroup203" /> 126 </div> 127 60 128 </div> 61 129 </form> -
framework/trunk/WebApplication/UI/WebControls/RequiredFieldValidatorPage.aspx.cs
r683 r1622 23 23 namespace FCSoft.SilverFrost.Framework.Web.UI.WebControls 24 24 { 25 using System; 26 27 25 28 /// <summary> 26 29 /// <see cref="RequiredFieldValidator"/> のテストです。 … … 36 39 // AVOID 37 40 } 41 42 /// <summary> 43 /// <see cref="CheckBox202"/> のチェック状態が変更された場合に呼び出されるイベントハンドラです。 44 /// </summary> 45 /// <param name="sender">イベントのソース。</param> 46 /// <param name="e">イベント データを格納している <see cref="EventArgs"/>。</param> 47 protected void CheckBox202_OnCheckedChanged(object sender, EventArgs e) 48 { 49 PlaceHolder202.Enabled = CheckBox202.Checked; 50 } 38 51 } 39 52 } -
framework/trunk/WebApplication/UI/WebControls/RequiredFieldValidatorPage.aspx.designer.cs
r683 r1622 1 1 //------------------------------------------------------------------------------ 2 // < auto-generated>2 // <自動生成> 3 3 // このコードはツールによって生成されました。 4 // ランタイム バージョン:2.0.50727.49525 4 // 6 5 // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 7 // コードが再生成されるときに損失したりします。 8 // </ auto-generated>6 // コードが再生成されるときに損失したりします。 7 // </自動生成> 9 8 //------------------------------------------------------------------------------ 10 9 … … 19 18 /// <remarks> 20 19 /// 自動生成されたフィールド。 21 /// 変更するには、フィールドの宣言をデザイナ ファイルから分離コード ファイルに移動します。20 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 22 21 /// </remarks> 23 22 protected global::System.Web.UI.HtmlControls.HtmlForm MainForm; … … 28 27 /// <remarks> 29 28 /// 自動生成されたフィールド。 30 /// 変更するには、フィールドの宣言をデザイナ ファイルから分離コード ファイルに移動します。29 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 31 30 /// </remarks> 32 31 protected global::System.Web.UI.WebControls.TextBox TextBox101; … … 37 36 /// <remarks> 38 37 /// 自動生成されたフィールド。 39 /// 変更するには、フィールドの宣言をデザイナ ファイルから分離コード ファイルに移動します。38 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 40 39 /// </remarks> 41 40 protected global::FCSoft.SilverFrost.Framework.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator101; … … 46 45 /// <remarks> 47 46 /// 自動生成されたフィールド。 48 /// 変更するには、フィールドの宣言をデザイナ ファイルから分離コード ファイルに移動します。47 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 49 48 /// </remarks> 50 49 protected global::System.Web.UI.WebControls.Button Button101; … … 55 54 /// <remarks> 56 55 /// 自動生成されたフィールド。 57 /// 変更するには、フィールドの宣言をデザイナ ファイルから分離コード ファイルに移動します。56 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 58 57 /// </remarks> 59 58 protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary101; … … 64 63 /// <remarks> 65 64 /// 自動生成されたフィールド。 66 /// 変更するには、フィールドの宣言をデザイナ ファイルから分離コード ファイルに移動します。65 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 67 66 /// </remarks> 68 67 protected global::System.Web.UI.WebControls.TextBox TextBox102; … … 73 72 /// <remarks> 74 73 /// 自動生成されたフィールド。 75 /// 変更するには、フィールドの宣言をデザイナ ファイルから分離コード ファイルに移動します。74 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 76 75 /// </remarks> 77 76 protected global::FCSoft.SilverFrost.Framework.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator102; … … 82 81 /// <remarks> 83 82 /// 自動生成されたフィールド。 84 /// 変更するには、フィールドの宣言をデザイナ ファイルから分離コード ファイルに移動します。83 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 85 84 /// </remarks> 86 85 protected global::System.Web.UI.WebControls.Button Button102; … … 91 90 /// <remarks> 92 91 /// 自動生成されたフィールド。 93 /// 変更するには、フィールドの宣言をデザイナ ファイルから分離コード ファイルに移動します。92 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 94 93 /// </remarks> 95 94 protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary102; 95 96 /// <summary> 97 /// TextBox201 コントロール。 98 /// </summary> 99 /// <remarks> 100 /// 自動生成されたフィールド。 101 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 102 /// </remarks> 103 protected global::System.Web.UI.WebControls.TextBox TextBox201; 104 105 /// <summary> 106 /// RequiredFieldValidator201 コントロール。 107 /// </summary> 108 /// <remarks> 109 /// 自動生成されたフィールド。 110 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 111 /// </remarks> 112 protected global::FCSoft.SilverFrost.Framework.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator201; 113 114 /// <summary> 115 /// Button201 コントロール。 116 /// </summary> 117 /// <remarks> 118 /// 自動生成されたフィールド。 119 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 120 /// </remarks> 121 protected global::System.Web.UI.WebControls.Button Button201; 122 123 /// <summary> 124 /// ValidationSummary201 コントロール。 125 /// </summary> 126 /// <remarks> 127 /// 自動生成されたフィールド。 128 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 129 /// </remarks> 130 protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary201; 131 132 /// <summary> 133 /// CheckBox202 コントロール。 134 /// </summary> 135 /// <remarks> 136 /// 自動生成されたフィールド。 137 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 138 /// </remarks> 139 protected global::System.Web.UI.WebControls.CheckBox CheckBox202; 140 141 /// <summary> 142 /// TextBox202 コントロール。 143 /// </summary> 144 /// <remarks> 145 /// 自動生成されたフィールド。 146 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 147 /// </remarks> 148 protected global::System.Web.UI.WebControls.TextBox TextBox202; 149 150 /// <summary> 151 /// PlaceHolder202 コントロール。 152 /// </summary> 153 /// <remarks> 154 /// 自動生成されたフィールド。 155 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 156 /// </remarks> 157 protected global::FCSoft.SilverFrost.Framework.Web.UI.WebControls.PlaceHolder PlaceHolder202; 158 159 /// <summary> 160 /// RequiredFieldValidator202 コントロール。 161 /// </summary> 162 /// <remarks> 163 /// 自動生成されたフィールド。 164 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 165 /// </remarks> 166 protected global::FCSoft.SilverFrost.Framework.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator202; 167 168 /// <summary> 169 /// Button202 コントロール。 170 /// </summary> 171 /// <remarks> 172 /// 自動生成されたフィールド。 173 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 174 /// </remarks> 175 protected global::System.Web.UI.WebControls.Button Button202; 176 177 /// <summary> 178 /// ValidationSummary202 コントロール。 179 /// </summary> 180 /// <remarks> 181 /// 自動生成されたフィールド。 182 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 183 /// </remarks> 184 protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary202; 185 186 /// <summary> 187 /// TextBox203 コントロール。 188 /// </summary> 189 /// <remarks> 190 /// 自動生成されたフィールド。 191 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 192 /// </remarks> 193 protected global::System.Web.UI.WebControls.TextBox TextBox203; 194 195 /// <summary> 196 /// RequiredFieldValidator203 コントロール。 197 /// </summary> 198 /// <remarks> 199 /// 自動生成されたフィールド。 200 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 201 /// </remarks> 202 protected global::FCSoft.SilverFrost.Framework.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator203; 203 204 /// <summary> 205 /// Button203 コントロール。 206 /// </summary> 207 /// <remarks> 208 /// 自動生成されたフィールド。 209 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 210 /// </remarks> 211 protected global::System.Web.UI.WebControls.Button Button203; 212 213 /// <summary> 214 /// ValidationSummary203 コントロール。 215 /// </summary> 216 /// <remarks> 217 /// 自動生成されたフィールド。 218 /// 変更するには、フィールドの宣言をデザイナー ファイルから分離コード ファイルに移動します。 219 /// </remarks> 220 protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary203; 96 221 } 97 222 } -
framework/trunk/WebLibrary/Sources/Reflections.cs
r1540 r1622 232 232 } 233 233 } 234 235 236 /// <summary> 237 /// <see cref="System.Web.UI.Control"/> に関係するリフレクションの集合です。 238 /// </summary> 239 internal static class Control 240 { 241 /// <summary> 242 /// <c>flags</c> フィールド情報です。 243 /// </summary> 244 private static readonly FieldInfo FlagsFieldInfo = InitializeFlagsFieldInfo(); 245 246 /// <summary> 247 /// <c>isWebControlDisabled</c> の値です。 248 /// </summary> 249 private static readonly int IsWebControlDisabledConstantValue = InitializeIsWebControlDisabledConstantValue(); 250 251 252 /// <summary> 253 /// 使用出来るかどうかを返します。 254 /// </summary> 255 /// <value> 256 /// 使用出来る場合は <see langword="true"/>。 257 /// それ以外の場合は <see langword="false"/>。 258 /// </value> 259 internal static bool IsValid 260 { 261 get 262 { 263 return FlagsFieldInfo != null 264 && IsWebControlDisabledConstantValue != 0; 265 } 266 } 267 268 /// <summary> 269 /// <c>isWebControlDisabled</c> の値を取得します。 270 /// </summary> 271 /// <value> 272 /// <c>isWebControlDisabled</c> の値。 273 /// </value> 274 internal static int IsWebControlDisabledValue 275 { 276 get 277 { 278 return IsWebControlDisabledConstantValue; 279 } 280 } 281 282 283 /// <summary> 284 /// <c>flags</c> フィールドのフラグの状態を取得します。 285 /// </summary> 286 /// <param name="control">コントロール。</param> 287 /// <param name="bit">フラグのピット。</param> 288 /// <returns> 289 /// フラグの状態。 290 /// </returns> 291 internal static bool GetFlag(System.Web.UI.Control control, int bit) 292 { 293 if (FlagsFieldInfo == null) 294 { 295 return false; 296 } 297 298 object flags = FlagsFieldInfo.GetValue(control); 299 return SimpleBitVector32.Get(flags, bit); 300 } 301 302 /// <summary> 303 /// <c>flags</c> フィールドにフラグを設定します。 304 /// </summary> 305 /// <param name="control">コントロール。</param> 306 /// <param name="bit">フラグのピット。</param> 307 internal static void SetFlag(System.Web.UI.Control control, int bit) 308 { 309 if (FlagsFieldInfo == null) 310 { 311 return; 312 } 313 314 object flags = FlagsFieldInfo.GetValue(control); 315 SimpleBitVector32.Set(flags, bit); 316 FlagsFieldInfo.SetValue(control, flags); 317 } 318 319 /// <summary> 320 /// <c>flags</c> フィールドのフラグをクリアします。 321 /// </summary> 322 /// <param name="control">コントロール。</param> 323 /// <param name="bit">フラグのピット。</param> 324 internal static void ClearFlag(System.Web.UI.Control control, int bit) 325 { 326 if (FlagsFieldInfo == null) 327 { 328 return; 329 } 330 331 object flags = FlagsFieldInfo.GetValue(control); 332 SimpleBitVector32.Clear(flags, bit); 333 FlagsFieldInfo.SetValue(control, flags); 334 } 335 336 337 /// <summary> 338 /// <see cref="FlagsFieldInfo"/> を初期化します。 339 /// </summary> 340 /// <returns> 341 /// <c>flags</c> フィールド情報。 342 /// </returns> 343 private static FieldInfo InitializeFlagsFieldInfo() 344 { 345 return typeof(System.Web.UI.Control).GetField( 346 "flags", 347 BindingFlags.Instance | BindingFlags.NonPublic); 348 } 349 350 /// <summary> 351 /// <see cref="IsWebControlDisabledConstantValue"/> を初期化します。 352 /// </summary> 353 /// <returns> 354 /// <c>isWebControlDisabled</c> の値。 355 /// </returns> 356 private static int InitializeIsWebControlDisabledConstantValue() 357 { 358 FieldInfo fieldInfo 359 = typeof(System.Web.UI.Control).GetField( 360 "isWebControlDisabled", 361 BindingFlags.Static | BindingFlags.NonPublic); 362 if (fieldInfo == null) 363 { 364 return 0; 365 } 366 367 return (int)fieldInfo.GetValue(null); 368 } 369 } 370 371 372 /// <summary> 373 /// <see cref="System.Web.UI.WebControls.WebControl"/> に関係するリフレクションの集合です。 374 /// </summary> 375 internal static class WebControl 376 { 377 /// <summary> 378 /// <c>_webControlFlags</c> フィールド情報です。 379 /// </summary> 380 private static readonly FieldInfo WebControlFlagsFieldInfo = InitializeWebControlFlagsFieldInfo(); 381 382 /// <summary> 383 /// <c>disabledDirty</c> の値です。 384 /// </summary> 385 private static readonly int DisabledDirtyConstantValue = InitializeDisabledDirtyConstantValue(); 386 387 388 /// <summary> 389 /// 使用出来るかどうかを返します。 390 /// </summary> 391 /// <value> 392 /// 使用出来る場合は <see langword="true"/>。 393 /// それ以外の場合は <see langword="false"/>。 394 /// </value> 395 internal static bool IsValid 396 { 397 get 398 { 399 return WebControlFlagsFieldInfo != null 400 && DisabledDirtyConstantValue != 0; 401 } 402 } 403 404 /// <summary> 405 /// <c>disabledDirty</c> の値を取得します。 406 /// </summary> 407 /// <value> 408 /// <c>disabledDirty</c> の値。 409 /// </value> 410 internal static int DisabledDirtyValue 411 { 412 get 413 { 414 return DisabledDirtyConstantValue; 415 } 416 } 417 418 419 /// <summary> 420 /// <c>_webControlFlags</c> フィールドにフラグを設定します。 421 /// </summary> 422 /// <param name="control">コントロール。</param> 423 /// <param name="bit">フラグのピット。</param> 424 internal static void SetWebControlFlags(System.Web.UI.WebControls.WebControl control, int bit) 425 { 426 if (WebControlFlagsFieldInfo == null) 427 { 428 return; 429 } 430 431 object flags = WebControlFlagsFieldInfo.GetValue(control); 432 SimpleBitVector32.Set(flags, bit); 433 WebControlFlagsFieldInfo.SetValue(control, flags); 434 } 435 436 437 /// <summary> 438 /// <see cref="WebControlFlagsFieldInfo"/> を初期化します。 439 /// </summary> 440 /// <returns> 441 /// <c>_webControlFlags</c> フィールド情報。 442 /// </returns> 443 private static FieldInfo InitializeWebControlFlagsFieldInfo() 444 { 445 return typeof(System.Web.UI.WebControls.WebControl).GetField( 446 "_webControlFlags", 447 BindingFlags.Instance | BindingFlags.NonPublic); 448 } 449 450 /// <summary> 451 /// <see cref="DisabledDirtyConstantValue"/> を初期化します。 452 /// </summary> 453 /// <returns> 454 /// <c>disabledDirty</c> の値。 455 /// </returns> 456 private static int InitializeDisabledDirtyConstantValue() 457 { 458 FieldInfo fieldInfo 459 = typeof(System.Web.UI.WebControls.WebControl).GetField( 460 "disabledDirty", 461 BindingFlags.Static | BindingFlags.NonPublic); 462 if (fieldInfo == null) 463 { 464 return 0; 465 } 466 467 return (int)fieldInfo.GetValue(null); 468 } 469 } 470 471 472 /// <summary> 473 /// <c>System.Web.Util.SimpleBitVector32</c> に関係するリフレクションの集合です。 474 /// </summary> 475 internal static class SimpleBitVector32 476 { 477 /// <summary> 478 /// インスタンスを作成するデリゲートです。 479 /// </summary> 480 private static readonly Func<object> CreateInstanceDelegate; 481 482 /// <summary> 483 /// <c>SimpleBitVector32.get_Item(int)</c> を使って値を取得するデリゲートです。 484 /// </summary> 485 private static readonly Func<object, int, bool> GetDelegate; 486 487 /// <summary> 488 /// <c>SimpleBitVector32.Set</c> メソッドを呼び出すデリゲートです。 489 /// </summary> 490 private static readonly Action<object, int> SetDelegate; 491 492 /// <summary> 493 /// <c>SimpleBitVector32.Clear</c> メソッドを呼び出すデリゲートです。 494 /// </summary> 495 private static readonly Action<object, int> ClearDelegate; 496 497 498 /// <summary> 499 /// クラスを初期化します。 500 /// </summary> 501 static SimpleBitVector32() 502 { 503 Type type = typeof(System.Web.UI.Control).Assembly.GetType("System.Web.Util.SimpleBitVector32", false); 504 if (type == null) 505 { 506 return; 507 } 508 509 CreateInstanceDelegate = delegate 510 { 511 return Activator.CreateInstance(type); 512 }; 513 514 PropertyInfo itemPropertyInfo 515 = type.GetProperty("Item", BindingFlags.Instance | BindingFlags.NonPublic, null, typeof(bool), new[] { typeof(int) }, null); 516 if (itemPropertyInfo != null) 517 { 518 GetDelegate = delegate(object obj, int bit) 519 { 520 return (bool)itemPropertyInfo.GetValue(obj, new[] { (object)bit }); 521 }; 522 } 523 524 MethodInfo setMethodInfo 525 = type.GetMethod("Set", BindingFlags.Instance | BindingFlags.NonPublic, null, new[] { typeof(int) }, null); 526 if (setMethodInfo != null) 527 { 528 SetDelegate = delegate(object obj, int bit) 529 { 530 setMethodInfo.Invoke(obj, new[] { (object)bit }); 531 }; 532 } 533 534 MethodInfo clearMethodInfo 535 = type.GetMethod("Clear", BindingFlags.Instance | BindingFlags.NonPublic, null, new[] { typeof(int) }, null); 536 if (clearMethodInfo != null) 537 { 538 ClearDelegate = delegate(object obj, int bit) 539 { 540 clearMethodInfo.Invoke(obj, new[] { (object)bit }); 541 }; 542 } 543 } 544 545 /// <summary> 546 /// 使用出来るかどうかを返します。 547 /// </summary> 548 /// <value> 549 /// 使用出来る場合は <see langword="true"/>。 550 /// それ以外の場合は <see langword="false"/>。 551 /// </value> 552 internal static bool IsValid 553 { 554 get 555 { 556 return CreateInstanceDelegate != null 557 && GetDelegate != null 558 && SetDelegate != null 559 && ClearDelegate != null; 560 } 561 } 562 563 564 /// <summary> 565 /// インスタンスを作成して返します。 566 /// </summary> 567 /// <returns> 568 /// 作成されたインスタンス。 569 /// </returns> 570 internal static object CreateInstance() 571 { 572 if (CreateInstanceDelegate == null) 573 { 574 return null; 575 } 576 577 return CreateInstanceDelegate(); 578 } 579 580 /// <summary> 581 /// ビットの状態を取得します。 582 /// </summary> 583 /// <param name="obj">オブジェクト。</param> 584 /// <param name="bit">ビット。</param> 585 /// <returns> 586 /// ビットの状態。 587 /// </returns> 588 internal static bool Get(object obj, int bit) 589 { 590 if (GetDelegate == null) 591 { 592 return false; 593 } 594 595 return GetDelegate(obj, bit); 596 } 597 598 /// <summary> 599 /// ビットをセットします。 600 /// </summary> 601 /// <param name="obj">オブジェクト。</param> 602 /// <param name="bit">ビット。</param> 603 internal static void Set(object obj, int bit) 604 { 605 if (SetDelegate == null) 606 { 607 return; 608 } 609 610 SetDelegate(obj, bit); 611 } 612 613 /// <summary> 614 /// ビットをクリアします。 615 /// </summary> 616 /// <param name="obj">オブジェクト。</param> 617 /// <param name="bit">ビット。</param> 618 internal static void Clear(object obj, int bit) 619 { 620 if (ClearDelegate == null) 621 { 622 return; 623 } 624 625 ClearDelegate(obj, bit); 626 } 627 } 234 628 } 235 629 } -
framework/trunk/WebLibrary/Sources/UI/WebControls/BaseCompareValidator.cs
r864 r1622 37 37 { 38 38 /// <summary> 39 /// <see cref="AffectedByAncestors"/> プロパティ用のキー。 40 /// </summary> 41 private const string AffectedByAncestorsKey = "AffectedByAncestors"; 42 43 /// <summary> 39 44 /// <see cref="ErrorMessageFormatString"/> プロパティ用のキー。 40 45 /// </summary> … … 66 71 } 67 72 73 74 /// <summary> 75 /// 親や祖先の要素の影響を受けるかどうかを取得または設定します。 76 /// </summary> 77 /// <value> 78 /// 親や祖先の要素の影響を受けてバリデーションを実行するかどうかを決定する場合は <see langword="true"/>。 79 /// それ以外の場合は <see langword="false"/>。 80 /// 既定値は <see langword="false"/>。 81 /// </value> 82 [Themeable(false)] 83 [DefaultValue(false)] 84 [WebCategory("Behavior")] 85 [WebDescription("Description_AllowBlank")] 86 public bool AffectedByAncestors 87 { 88 get 89 { 90 return (bool)(ViewState[AffectedByAncestorsKey] ?? false); 91 } 92 93 set 94 { 95 ViewState[AffectedByAncestorsKey] = value; 96 } 97 } 68 98 69 99 /// <summary> … … 142 172 143 173 /// <summary> 174 /// コントロールの <see cref="System.Web.UI.WebControls.WebControl.IsEnabled" /> 175 /// プロパティが <see langword="false"/> の場合、レンダリングされた HTML 要素の disabled 属性を 176 /// "無効" に設定するかどうかを示す値を取得します。 177 /// </summary> 178 /// <value> 179 /// <see cref="Control.RenderingCompatibility" /> プロパティが 180 /// 4.0 より低い ASP.NET のバージョンを示す場合は <see langword="true"/>。 181 /// それ以外の場合は <see langword="false"/>。 182 /// </value> 183 public override bool SupportsDisabledAttribute 184 { 185 get 186 { 187 return !AffectedByAncestors && base.SupportsDisabledAttribute; 188 } 189 } 190 191 /// <summary> 192 /// 検証コントロールを有効にするかどうかを示す値を取得または設定します。 193 /// </summary> 194 /// <value> 195 /// 検証コントロールを有効にする場合は <see langword="true"/>。 196 /// それ以外の場合は <see langword="false"/>。 197 /// 既定値は、<see langword="true"/> です。 198 /// </value> 199 public override bool Enabled 200 { 201 get 202 { 203 return base.Enabled && (!AffectedByAncestors || IsEnabled); 204 } 205 206 set 207 { 208 base.Enabled = value; 209 } 210 } 211 212 /// <summary> 144 213 /// エラーメッセージを準備する必要があるかどうかを取得及び設定します。 145 214 /// </summary> -
framework/trunk/WebLibrary/Sources/UI/WebControls/BaseValidator.cs
r864 r1622 37 37 { 38 38 /// <summary> 39 /// <see cref="AffectedByAncestors"/> プロパティ用のキー。 40 /// </summary> 41 private const string AffectedByAncestorsKey = "AffectedByAncestors"; 42 43 /// <summary> 39 44 /// <see cref="ErrorMessageFormatString"/> プロパティ用のキー。 40 45 /// </summary> … … 66 71 } 67 72 73 74 /// <summary> 75 /// 親や祖先の要素の影響を受けるかどうかを取得または設定します。 76 /// </summary> 77 /// <value> 78 /// 親や祖先の要素の影響を受けてバリデーションを実行するかどうかを決定する場合は <see langword="true"/>。 79 /// それ以外の場合は <see langword="false"/>。 80 /// 既定値は <see langword="false"/>。 81 /// </value> 82 [Themeable(false)] 83 [DefaultValue(false)] 84 [WebCategory("Behavior")] 85 [WebDescription("Description_AllowBlank")] 86 public bool AffectedByAncestors 87 { 88 get 89 { 90 return (bool)(ViewState[AffectedByAncestorsKey] ?? false); 91 } 92 93 set 94 { 95 ViewState[AffectedByAncestorsKey] = value; 96 } 97 } 68 98 69 99 /// <summary> … … 142 172 143 173 /// <summary> 174 /// コントロールの <see cref="System.Web.UI.WebControls.WebControl.IsEnabled" /> 175 /// プロパティが <see langword="false"/> の場合、レンダリングされた HTML 要素の disabled 属性を 176 /// "無効" に設定するかどうかを示す値を取得します。 177 /// </summary> 178 /// <value> 179 /// <see cref="Control.RenderingCompatibility" /> プロパティが 180 /// 4.0 より低い ASP.NET のバージョンを示す場合は <see langword="true"/>。 181 /// それ以外の場合は <see langword="false"/>。 182 /// </value> 183 public override bool SupportsDisabledAttribute 184 { 185 get 186 { 187 return !AffectedByAncestors && base.SupportsDisabledAttribute; 188 } 189 } 190 191 /// <summary> 192 /// 検証コントロールを有効にするかどうかを示す値を取得または設定します。 193 /// </summary> 194 /// <value> 195 /// 検証コントロールを有効にする場合は <see langword="true"/>。 196 /// それ以外の場合は <see langword="false"/>。 197 /// 既定値は、<see langword="true"/> です。 198 /// </value> 199 public override bool Enabled 200 { 201 get 202 { 203 return base.Enabled && (!AffectedByAncestors || IsEnabled); 204 } 205 206 set 207 { 208 base.Enabled = value; 209 } 210 } 211 212 /// <summary> 144 213 /// エラーメッセージを準備する必要があるかどうかを取得及び設定します。 145 214 /// </summary> -
framework/trunk/WebLibrary/Sources/UI/WebControls/CompareValidator.cs
r864 r1622 38 38 { 39 39 /// <summary> 40 /// <see cref="AffectedByAncestors"/> プロパティ用のキー。 41 /// </summary> 42 private const string AffectedByAncestorsKey = "AffectedByAncestors"; 43 44 /// <summary> 40 45 /// <see cref="ErrorMessageFormatString"/> プロパティ用のキー。 41 46 /// </summary> … … 72 77 } 73 78 79 80 /// <summary> 81 /// 親や祖先の要素の影響を受けるかどうかを取得または設定します。 82 /// </summary> 83 /// <value> 84 /// 親や祖先の要素の影響を受けてバリデーションを実行するかどうかを決定する場合は <see langword="true"/>。 85 /// それ以外の場合は <see langword="false"/>。 86 /// 既定値は <see langword="false"/>。 87 /// </value> 88 [Themeable(false)] 89 [DefaultValue(false)] 90 [WebCategory("Behavior")] 91 [WebDescription("Description_AllowBlank")] 92 public bool AffectedByAncestors 93 { 94 get 95 { 96 return (bool)(ViewState[AffectedByAncestorsKey] ?? false); 97 } 98 99 set 100 { 101 ViewState[AffectedByAncestorsKey] = value; 102 } 103 } 74 104 75 105 /// <summary> … … 181 211 182 212 /// <summary> 213 /// コントロールの <see cref="System.Web.UI.WebControls.WebControl.IsEnabled" /> 214 /// プロパティが <see langword="false"/> の場合、レンダリングされた HTML 要素の disabled 属性を 215 /// "無効" に設定するかどうかを示す値を取得します。 216 /// </summary> 217 /// <value> 218 /// <see cref="Control.RenderingCompatibility" /> プロパティが 219 /// 4.0 より低い ASP.NET のバージョンを示す場合は <see langword="true"/>。 220 /// それ以外の場合は <see langword="false"/>。 221 /// </value> 222 public override bool SupportsDisabledAttribute 223 { 224 get 225 { 226 return !AffectedByAncestors && base.SupportsDisabledAttribute; 227 } 228 } 229 230 /// <summary> 231 /// 検証コントロールを有効にするかどうかを示す値を取得または設定します。 232 /// </summary> 233 /// <value> 234 /// 検証コントロールを有効にする場合は <see langword="true"/>。 235 /// それ以外の場合は <see langword="false"/>。 236 /// 既定値は、<see langword="true"/> です。 237 /// </value> 238 public override bool Enabled 239 { 240 get 241 { 242 return base.Enabled && (!AffectedByAncestors || IsEnabled); 243 } 244 245 set 246 { 247 base.Enabled = value; 248 } 249 } 250 251 /// <summary> 183 252 /// エラーメッセージを準備する必要があるかどうかを取得及び設定します。 184 253 /// </summary> -
framework/trunk/WebLibrary/Sources/UI/WebControls/CustomValidator.cs
r864 r1622 37 37 { 38 38 /// <summary> 39 /// <see cref="AffectedByAncestors"/> プロパティ用のキー。 40 /// </summary> 41 private const string AffectedByAncestorsKey = "AffectedByAncestors"; 42 43 /// <summary> 39 44 /// <see cref="ErrorMessageFormatString"/> プロパティ用のキー。 40 45 /// </summary> … … 66 71 } 67 72 73 74 /// <summary> 75 /// 親や祖先の要素の影響を受けるかどうかを取得または設定します。 76 /// </summary> 77 /// <value> 78 /// 親や祖先の要素の影響を受けてバリデーションを実行するかどうかを決定する場合は <see langword="true"/>。 79 /// それ以外の場合は <see langword="false"/>。 80 /// 既定値は <see langword="false"/>。 81 /// </value> 82 [Themeable(false)] 83 [DefaultValue(false)] 84 [WebCategory("Behavior")] 85 [WebDescription("Description_AllowBlank")] 86 public bool AffectedByAncestors 87 { 88 get 89 { 90 return (bool)(ViewState[AffectedByAncestorsKey] ?? false); 91 } 92 93 set 94 { 95 ViewState[AffectedByAncestorsKey] = value; 96 } 97 } 68 98 69 99 /// <summary> … … 142 172 143 173 /// <summary> 174 /// コントロールの <see cref="System.Web.UI.WebControls.WebControl.IsEnabled" /> 175 /// プロパティが <see langword="false"/> の場合、レンダリングされた HTML 要素の disabled 属性を 176 /// "無効" に設定するかどうかを示す値を取得します。 177 /// </summary> 178 /// <value> 179 /// <see cref="Control.RenderingCompatibility" /> プロパティが 180 /// 4.0 より低い ASP.NET のバージョンを示す場合は <see langword="true"/>。 181 /// それ以外の場合は <see langword="false"/>。 182 /// </value> 183 public override bool SupportsDisabledAttribute 184 { 185 get 186 { 187 return !AffectedByAncestors && base.SupportsDisabledAttribute; 188 } 189 } 190 191 /// <summary> 192 /// 検証コントロールを有効にするかどうかを示す値を取得または設定します。 193 /// </summary> 194 /// <value> 195 /// 検証コントロールを有効にする場合は <see langword="true"/>。 196 /// それ以外の場合は <see langword="false"/>。 197 /// 既定値は、<see langword="true"/> です。 198 /// </value> 199 public override bool Enabled 200 { 201 get 202 { 203 return base.Enabled && (!AffectedByAncestors || IsEnabled); 204 } 205 206 set 207 { 208 base.Enabled = value; 209 } 210 } 211 212 /// <summary> 144 213 /// エラーメッセージを準備する必要があるかどうかを取得及び設定します。 145 214 /// </summary> -
framework/trunk/WebLibrary/Sources/UI/WebControls/PlaceHolder.cs
r864 r1622 23 23 namespace FCSoft.SilverFrost.Framework.Web.UI.WebControls 24 24 { 25 using System.ComponentModel; 26 using System.Web.UI; 27 28 25 29 /// <summary> 26 30 /// Web ページ上で動的に追加されたサーバー コントロールを格納します。 … … 32 36 { 33 37 /// <summary> 38 /// <see cref="Enabled"/> プロパティ用のキー。 39 /// </summary> 40 private const string EnabledKey = "Enabled"; 41 42 /// <summary> 43 /// 無効な情報をビューステートに保存する必要があるかどうか。 44 /// </summary> 45 private bool disabledDirty; 46 47 48 /// <summary> 34 49 /// インスタンスを作成します。 35 50 /// </summary> … … 38 53 ControlInitializer.ApplyProperties(this); 39 54 } 55 56 57 /// <summary> 58 /// オブジェクトが有効かどうかを取得または設定します。 59 /// </summary> 60 /// <value> 61 /// オブジェクトが有効な場合は <see langword="true"/>。 62 /// それ以外の場合は <see langword="false"/>。 63 /// 既定値は <see langword="true"/>。 64 /// </value> 65 [Bindable(true)] 66 [Themeable(false)] 67 [DefaultValue(true)] 68 [WebCategory("Behavior")] 69 [WebDescription("Description_Enabled")] 70 public virtual bool Enabled 71 { 72 get 73 { 74 // !flags[isWebControlDisabled]; 75 return !Reflections.Control.GetFlag(this, Reflections.Control.IsWebControlDisabledValue); 76 } 77 78 set 79 { 80 // enabled = !flags[isWebControlDisabled]; 81 bool enabled = !Reflections.Control.GetFlag(this, Reflections.Control.IsWebControlDisabledValue); 82 if (enabled == value) 83 { 84 return; 85 } 86 87 if (!value) 88 { 89 // flags.Set(isWebControlDisabled); 90 Reflections.Control.SetFlag(this, Reflections.Control.IsWebControlDisabledValue); 91 } 92 else 93 { 94 // flags.Clear(isWebControlDisabled); 95 Reflections.Control.ClearFlag(this, Reflections.Control.IsWebControlDisabledValue); 96 } 97 98 if (IsTrackingViewState) 99 { 100 // _webControlFlags.Set(disabledDirty); 101 disabledDirty = true; 102 } 103 } 104 } 105 106 /// <summary> 107 /// <see cref="SaveViewState" /> メソッドによって保存された前回のページ要求から 108 /// ビューステート情報を復元します。 109 /// </summary> 110 /// <param name="savedState">復元するコントロールの状態を表す <see cref="object" />。</param> 111 protected override void LoadViewState(object savedState) 112 { 113 // 親を呼び出す 114 base.LoadViewState(savedState); 115 116 object enabled = ViewState[EnabledKey]; 117 if (enabled != null) 118 { 119 if (!(bool)enabled) 120 { 121 // flags.Set(isWebControlDisabled); 122 Reflections.Control.SetFlag(this, Reflections.Control.IsWebControlDisabledValue); 123 } 124 else 125 { 126 // flags.Clear(isWebControlDisabled); 127 Reflections.Control.ClearFlag(this, Reflections.Control.IsWebControlDisabledValue); 128 } 129 130 // _webControlFlags.Set(disabledDirty); 131 disabledDirty = true; 132 } 133 } 134 135 /// <summary> 136 /// ページがサーバーにポスト バックされた時間以降に発生した、 137 /// サーバー コントロールのビューステートの変更を保存します。 138 /// </summary> 139 /// <returns> 140 /// サーバー コントロールの現在のビューステートを返します。 141 /// コントロールに関連付けられているビューステートがない場合、メソッドは 142 /// <see langword="null"/> を返します。 143 /// </returns> 144 protected override object SaveViewState() 145 { 146 // if (_webControlFlags[disabledDirty]) { 147 if (disabledDirty) 148 { 149 // ViewState["Enabled"] = !flags[isWebControlDisabled]; 150 ViewState[EnabledKey] = !Reflections.Control.GetFlag(this, Reflections.Control.IsWebControlDisabledValue); 151 } 152 153 return base.SaveViewState(); 154 } 40 155 } 41 156 } -
framework/trunk/WebLibrary/Sources/UI/WebControls/RangeValidator.cs
r864 r1622 37 37 { 38 38 /// <summary> 39 /// <see cref="AffectedByAncestors"/> プロパティ用のキー。 40 /// </summary> 41 private const string AffectedByAncestorsKey = "AffectedByAncestors"; 42 43 /// <summary> 39 44 /// <see cref="ErrorMessageFormatString"/> プロパティ用のキー。 40 45 /// </summary> … … 66 71 } 67 72 73 74 /// <summary> 75 /// 親や祖先の要素の影響を受けるかどうかを取得または設定します。 76 /// </summary> 77 /// <value> 78 /// 親や祖先の要素の影響を受けてバリデーションを実行するかどうかを決定する場合は <see langword="true"/>。 79 /// それ以外の場合は <see langword="false"/>。 80 /// 既定値は <see langword="false"/>。 81 /// </value> 82 [Themeable(false)] 83 [DefaultValue(false)] 84 [WebCategory("Behavior")] 85 [WebDescription("Description_AllowBlank")] 86 public bool AffectedByAncestors 87 { 88 get 89 { 90 return (bool)(ViewState[AffectedByAncestorsKey] ?? false); 91 } 92 93 set 94 { 95 ViewState[AffectedByAncestorsKey] = value; 96 } 97 } 68 98 69 99 /// <summary> … … 145 175 146 176 /// <summary> 177 /// コントロールの <see cref="System.Web.UI.WebControls.WebControl.IsEnabled" /> 178 /// プロパティが <see langword="false"/> の場合、レンダリングされた HTML 要素の disabled 属性を 179 /// "無効" に設定するかどうかを示す値を取得します。 180 /// </summary> 181 /// <value> 182 /// <see cref="Control.RenderingCompatibility" /> プロパティが 183 /// 4.0 より低い ASP.NET のバージョンを示す場合は <see langword="true"/>。 184 /// それ以外の場合は <see langword="false"/>。 185 /// </value> 186 public override bool SupportsDisabledAttribute 187 { 188 get 189 { 190 return !AffectedByAncestors && base.SupportsDisabledAttribute; 191 } 192 } 193 194 /// <summary> 195 /// 検証コントロールを有効にするかどうかを示す値を取得または設定します。 196 /// </summary> 197 /// <value> 198 /// 検証コントロールを有効にする場合は <see langword="true"/>。 199 /// それ以外の場合は <see langword="false"/>。 200 /// 既定値は、<see langword="true"/> です。 201 /// </value> 202 public override bool Enabled 203 { 204 get 205 { 206 return base.Enabled && (!AffectedByAncestors || IsEnabled); 207 } 208 209 set 210 { 211 base.Enabled = value; 212 } 213 } 214 215 /// <summary> 147 216 /// エラーメッセージを準備する必要があるかどうかを取得及び設定します。 148 217 /// </summary> -
framework/trunk/WebLibrary/Sources/UI/WebControls/RegularExpressionValidator.cs
r864 r1622 38 38 { 39 39 /// <summary> 40 /// <see cref="AffectedByAncestors"/> プロパティ用のキー。 41 /// </summary> 42 private const string AffectedByAncestorsKey = "AffectedByAncestors"; 43 44 /// <summary> 40 45 /// <see cref="ErrorMessageFormatString"/> プロパティ用のキー。 41 46 /// </summary> … … 67 72 } 68 73 74 75 /// <summary> 76 /// 親や祖先の要素の影響を受けるかどうかを取得または設定します。 77 /// </summary> 78 /// <value> 79 /// 親や祖先の要素の影響を受けてバリデーションを実行するかどうかを決定する場合は <see langword="true"/>。 80 /// それ以外の場合は <see langword="false"/>。 81 /// 既定値は <see langword="false"/>。 82 /// </value> 83 [Themeable(false)] 84 [DefaultValue(false)] 85 [WebCategory("Behavior")] 86 [WebDescription("Description_AllowBlank")] 87 public bool AffectedByAncestors 88 { 89 get 90 { 91 return (bool)(ViewState[AffectedByAncestorsKey] ?? false); 92 } 93 94 set 95 { 96 ViewState[AffectedByAncestorsKey] = value; 97 } 98 } 69 99 70 100 /// <summary> … … 143 173 144 174 /// <summary> 175 /// コントロールの <see cref="System.Web.UI.WebControls.WebControl.IsEnabled" /> 176 /// プロパティが <see langword="false"/> の場合、レンダリングされた HTML 要素の disabled 属性を 177 /// "無効" に設定するかどうかを示す値を取得します。 178 /// </summary> 179 /// <value> 180 /// <see cref="Control.RenderingCompatibility" /> プロパティが 181 /// 4.0 より低い ASP.NET のバージョンを示す場合は <see langword="true"/>。 182 /// それ以外の場合は <see langword="false"/>。 183 /// </value> 184 public override bool SupportsDisabledAttribute 185 { 186 get 187 { 188 return !AffectedByAncestors && base.SupportsDisabledAttribute; 189 } 190 } 191 192 /// <summary> 193 /// 検証コントロールを有効にするかどうかを示す値を取得または設定します。 194 /// </summary> 195 /// <value> 196 /// 検証コントロールを有効にする場合は <see langword="true"/>。 197 /// それ以外の場合は <see langword="false"/>。 198 /// 既定値は、<see langword="true"/> です。 199 /// </value> 200 public override bool Enabled 201 { 202 get 203 { 204 return base.Enabled && (!AffectedByAncestors || IsEnabled); 205 } 206 207 set 208 { 209 base.Enabled = value; 210 } 211 } 212 213 /// <summary> 145 214 /// エラーメッセージを準備する必要があるかどうかを取得及び設定します。 146 215 /// </summary> -
framework/trunk/WebLibrary/Sources/UI/WebControls/RequiredFieldValidator.cs
r864 r1622 48 48 49 49 /// <summary> 50 /// <see cref="AffectedByAncestors"/> プロパティ用のキー。 51 /// </summary> 52 private const string AffectedByAncestorsKey = "AffectedByAncestors"; 53 54 /// <summary> 50 55 /// <see cref="AllowBlank"/> プロパティ用のキー。 51 56 /// </summary> … … 67 72 /// クライアントサイドでの評価関数プロパティ用の属性名。 68 73 /// </summary> 69 private const string EvaluationFunctionAttributeName = "evaluationfunction";74 private const string EvaluationFunctionAttributeName = @"evaluationfunction"; 70 75 71 76 /// <summary> 72 77 /// <see cref="AllowBlank"/> プロパティ用の属性名。 73 78 /// </summary> 74 private const string AllowBlankAttributeName = "allowblank";79 private const string AllowBlankAttributeName = @"allowblank"; 75 80 76 81 // AgentSmith SpellCheck Restore … … 96 101 } 97 102 103 104 /// <summary> 105 /// 親や祖先の要素の影響を受けるかどうかを取得または設定します。 106 /// </summary> 107 /// <value> 108 /// 親や祖先の要素の影響を受けてバリデーションを実行するかどうかを決定する場合は <see langword="true"/>。 109 /// それ以外の場合は <see langword="false"/>。 110 /// 既定値は <see langword="false"/>。 111 /// </value> 112 [Themeable(false)] 113 [DefaultValue(false)] 114 [WebCategory("Behavior")] 115 [WebDescription("Description_AllowBlank")] 116 public bool AffectedByAncestors 117 { 118 get 119 { 120 return (bool)(ViewState[AffectedByAncestorsKey] ?? false); 121 } 122 123 set 124 { 125 ViewState[AffectedByAncestorsKey] = value; 126 } 127 } 98 128 99 129 /// <summary> … … 193 223 { 194 224 ViewState[AllowBlankKey] = value; 225 } 226 } 227 228 /// <summary> 229 /// コントロールの <see cref="System.Web.UI.WebControls.WebControl.IsEnabled" /> 230 /// プロパティが <see langword="false"/> の場合、レンダリングされた HTML 要素の disabled 属性を 231 /// "無効" に設定するかどうかを示す値を取得します。 232 /// </summary> 233 /// <value> 234 /// <see cref="Control.RenderingCompatibility" /> プロパティが 235 /// 4.0 より低い ASP.NET のバージョンを示す場合は <see langword="true"/>。 236 /// それ以外の場合は <see langword="false"/>。 237 /// </value> 238 public override bool SupportsDisabledAttribute 239 { 240 get 241 { 242 return !AffectedByAncestors && base.SupportsDisabledAttribute; 243 } 244 } 245 246 /// <summary> 247 /// 検証コントロールを有効にするかどうかを示す値を取得または設定します。 248 /// </summary> 249 /// <value> 250 /// 検証コントロールを有効にする場合は <see langword="true"/>。 251 /// それ以外の場合は <see langword="false"/>。 252 /// 既定値は、<see langword="true"/> です。 253 /// </value> 254 public override bool Enabled 255 { 256 get 257 { 258 return base.Enabled && (!AffectedByAncestors || IsEnabled); 259 } 260 261 set 262 { 263 base.Enabled = value; 195 264 } 196 265 } … … 301 370 } 302 371 372 // ReSharper disable once RedundantNameQualifier 303 373 System.Web.UI.Page page = Page; 304 374 if (page == null) -
framework/trunk/WebLibrary/Sources/UI/WebControls/StringLengthValidator.cs
r1276 r1622 92 92 /// クライアントサイドでの評価関数プロパティ用の属性名。 93 93 /// </summary> 94 private const string EvaluationFunctionAttributeName = "evaluationfunction";94 private const string EvaluationFunctionAttributeName = @"evaluationfunction"; 95 95 96 96 /// <summary> 97 97 /// <see cref="Encoding"/> プロパティ用の属性名。 98 98 /// </summary> 99 private const string EncodingAttributeName = "encoding";99 private const string EncodingAttributeName = @"encoding"; 100 100 101 101 /// <summary> 102 102 /// <see cref="MinimumLength"/> プロパティ用の属性名。 103 103 /// </summary> 104 private const string MinimumLengthAttributeName = "minimumlength";104 private const string MinimumLengthAttributeName = @"minimumlength"; 105 105 106 106 /// <summary> 107 107 /// <see cref="MaximumLength"/> プロパティ用の属性名。 108 108 /// </summary> 109 private const string MaximumLengthAttributeName = "maximumlength";109 private const string MaximumLengthAttributeName = @"maximumlength"; 110 110 111 111 /// <summary> 112 112 /// <see cref="MinimumLineLength"/> プロパティ用の属性名。 113 113 /// </summary> 114 private const string MinimumLineLengthAttributeName = "minimumlinelength";114 private const string MinimumLineLengthAttributeName = @"minimumlinelength"; 115 115 116 116 /// <summary> 117 117 /// <see cref="MaximumLineLength"/> プロパティ用の属性名。 118 118 /// </summary> 119 private const string MaximumLineLengthAttributeName = "maximumlinelength";119 private const string MaximumLineLengthAttributeName = @"maximumlinelength"; 120 120 121 121 /// <summary> 122 122 /// <see cref="MinimumLineCount"/> プロパティ用の属性名。 123 123 /// </summary> 124 private const string MinimumLineCountAttributeName = "minimumlinecount";124 private const string MinimumLineCountAttributeName = @"minimumlinecount"; 125 125 126 126 /// <summary> 127 127 /// <see cref="MaximumLineCount"/> プロパティ用の属性名。 128 128 /// </summary> 129 private const string MaximumLineCountAttributeName = "maximumlinecount";129 private const string MaximumLineCountAttributeName = @"maximumlinecount"; 130 130 131 131 // AgentSmith SpellCheck Restore … … 182 182 try 183 183 { 184 // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 184 185 EncodingClass.GetEncoding(value); 185 186 } -
framework/trunk/WebTest/Sources/ReflectionsTest.cs
r1540 r1622 93 93 Trace.WriteLine("FormsAuthentication.CookieSameSite = " + value); 94 94 } 95 96 /// <summary> 97 /// <see cref="Reflections.Control"/> が使用出来るかのテストです。 98 /// </summary> 99 [Test] 100 public void TestControlIsValid() 101 { 102 Assert.That(Reflections.Control.IsValid, Is.True); 103 } 104 105 /// <summary> 106 /// <see cref="Reflections.Control"/> の <c>isWebControlDisabled</c> へアクセスするテストです。 107 /// </summary> 108 [Test] 109 public void TestControlIsWebControlDisabledValue() 110 { 111 Assert.That(Reflections.Control.IsWebControlDisabledValue, Is.Not.Zero); 112 Trace.WriteLine("0x" + Reflections.Control.IsWebControlDisabledValue.ToString("X8")); 113 } 114 115 /// <summary> 116 /// <see cref="Reflections.Control"/> の <c>flags</c> へアクセスするテストです。 117 /// </summary> 118 [Test] 119 public void TestControlFlags() 120 { 121 const int Bit = 1; 122 123 System.Web.UI.Control control = new System.Web.UI.Control(); 124 125 Assert.That(Reflections.Control.GetFlag(control, Bit), Is.False, "1"); 126 Reflections.Control.SetFlag(control, Bit); 127 Assert.That(Reflections.Control.GetFlag(control, Bit), Is.True, "2"); 128 Reflections.Control.ClearFlag(control, Bit); 129 Assert.That(Reflections.Control.GetFlag(control, Bit), Is.False, "3"); 130 } 131 132 /// <summary> 133 /// <see cref="Reflections.WebControl"/> が使用出来るかのテストです。 134 /// </summary> 135 [Test] 136 public void TestWebControlIsValid() 137 { 138 Assert.That(Reflections.WebControl.IsValid, Is.True); 139 } 140 141 /// <summary> 142 /// <see cref="Reflections.Control"/> の <c>disabledDirty</c> へアクセスするテストです。 143 /// </summary> 144 [Test] 145 public void TestWebControlDisabledDirtyValue() 146 { 147 Assert.That(Reflections.WebControl.DisabledDirtyValue, Is.Not.Zero); 148 Trace.WriteLine("0x" + Reflections.WebControl.DisabledDirtyValue.ToString("X8")); 149 } 150 151 /// <summary> 152 /// <see cref="Reflections.WebControl"/> の <c>_webControlFlags</c> へアクセスするテストです。 153 /// </summary> 154 [Test] 155 public void TestWebControlWebControlFlags() 156 { 157 const int Bit = 1; 158 159 System.Web.UI.WebControls.WebControl control 160 = new System.Web.UI.WebControls.WebControl(System.Web.UI.HtmlTextWriterTag.Div); 161 162 Reflections.WebControl.SetWebControlFlags(control, Bit); 163 } 164 165 /// <summary> 166 /// <see cref="Reflections.SimpleBitVector32"/> が使用出来るかのテストです。 167 /// </summary> 168 [Test] 169 public void TestSimpleBitVector32IsValid() 170 { 171 Assert.That(Reflections.SimpleBitVector32.IsValid, Is.True); 172 } 173 174 /// <summary> 175 /// <see cref="Reflections.SimpleBitVector32"/> の各メソッドを呼び出せるかのテストです。 176 /// </summary> 177 [Test] 178 public void TestSimpleBitVector32Call() 179 { 180 const int Bit = 1; 181 182 object obj = Reflections.SimpleBitVector32.CreateInstance(); 183 Assert.That(Reflections.SimpleBitVector32.Get(obj, Bit), Is.False, "1"); 184 Reflections.SimpleBitVector32.Set(obj, Bit); 185 Assert.That(Reflections.SimpleBitVector32.Get(obj, Bit), Is.True, "2"); 186 Reflections.SimpleBitVector32.Clear(obj, Bit); 187 Assert.That(Reflections.SimpleBitVector32.Get(obj, Bit), Is.False, "3"); 188 } 95 189 } 96 190 }
※ 詳しい使い方は
TracChangeset を参照してください。