チェンジセット 1642 (default)
- 日時:
- 2024/03/13 17:51:51 (7ヵ月前)
- 場所:
- framework/trunk
- ファイル:
-
- 14個の追加
- 2個の更新
凡例:
- 未変更
- 追加
- 削除
-
framework/trunk/WebApplication/WebApplication.csproj
r1641 r1642 60 60 <Content Include="Scripts\test1.js" /> 61 61 <Content Include="Scripts\test2.js" /> 62 <Content Include="Styles\test-block-1.css" /> 63 <Content Include="Styles\test-block-2.css" /> 62 64 <Content Include="Styles\test1.css" /> 63 65 <Content Include="Styles\test2.css" /> 66 <Content Include="UI\StyleNonPriorityPage.aspx" /> 67 <Content Include="UI\StylePriorityPage.aspx" /> 68 <Content Include="UI\StylePriorityWithContentPlaceHolderPage.aspx" /> 64 69 <Content Include="UI\CompoundClientScript.aspx" /> 65 70 <Content Include="UI\CulturePage.aspx" /> … … 189 194 <Compile Include="Services\SimpleServiceMethod.cs" /> 190 195 <Compile Include="Services\WaitServiceMethod.cs" /> 196 <Compile Include="UI\StyleNonPriorityPage.aspx.cs"> 197 <DependentUpon>StyleNonPriorityPage.aspx</DependentUpon> 198 <SubType>ASPXCodeBehind</SubType> 199 </Compile> 200 <Compile Include="UI\StyleNonPriorityPage.aspx.designer.cs"> 201 <DependentUpon>StyleNonPriorityPage.aspx</DependentUpon> 202 </Compile> 203 <Compile Include="UI\StylePriorityPage.aspx.cs"> 204 <DependentUpon>StylePriorityPage.aspx</DependentUpon> 205 <SubType>ASPXCodeBehind</SubType> 206 </Compile> 207 <Compile Include="UI\StylePriorityPage.aspx.designer.cs"> 208 <DependentUpon>StylePriorityPage.aspx</DependentUpon> 209 </Compile> 210 <Compile Include="UI\StylePriorityWithContentPlaceHolderPage.aspx.cs"> 211 <DependentUpon>StylePriorityWithContentPlaceHolderPage.aspx</DependentUpon> 212 <SubType>ASPXCodeBehind</SubType> 213 </Compile> 214 <Compile Include="UI\StylePriorityWithContentPlaceHolderPage.aspx.designer.cs"> 215 <DependentUpon>StylePriorityWithContentPlaceHolderPage.aspx</DependentUpon> 216 </Compile> 217 <Compile Include="UI\StylePriorityWithContentPlaceHolderMaster.master.cs"> 218 <DependentUpon>StylePriorityWithContentPlaceHolderMaster.master</DependentUpon> 219 <SubType>ASPXCodeBehind</SubType> 220 </Compile> 221 <Compile Include="UI\StylePriorityWithContentPlaceHolderMaster.master.designer.cs"> 222 <DependentUpon>StylePriorityWithContentPlaceHolderMaster.master</DependentUpon> 223 </Compile> 191 224 <Compile Include="UI\CompoundClientScript.aspx.cs"> 192 225 <DependentUpon>CompoundClientScript.aspx</DependentUpon> … … 650 683 <Content Include="App_Themes\Blue\Controls.skin" /> 651 684 <Content Include="App_Themes\Red\Controls.skin" /> 685 <Content Include="UI\StylePriorityWithContentPlaceHolderMaster.master" /> 652 686 </ItemGroup> 653 687 <ItemGroup> -
framework/trunk/WebLibrary/Sources/UI/StyleUtility.cs
r1347 r1642 175 175 /// <param name="priority"> 176 176 /// <c>head</c> 内に設定された <see cref="System.Web.UI.HtmlControls.HtmlLink"/> 177 /// によるスタイルより 優先する場合は <see langword="true"/>。177 /// によるスタイルより先に登録する場合は <see langword="true"/>。 178 178 /// それ以外の場合は <see langword="false"/>。 179 179 /// </param> … … 211 211 /// <param name="priority"> 212 212 /// <c>head</c> 内に設定された <see cref="System.Web.UI.HtmlControls.HtmlLink"/> 213 /// によるスタイルより 優先する場合は <see langword="true"/>。213 /// によるスタイルより先に登録する場合は <see langword="true"/>。 214 214 /// それ以外の場合は <see langword="false"/>。 215 215 /// </param> … … 276 276 /// <param name="priority"> 277 277 /// <c>head</c> 内に設定された <see cref="System.Web.UI.HtmlControls.HtmlLink"/> 278 /// によるスタイルより 優先する場合は <see langword="true"/>。278 /// によるスタイルより先に登録する場合は <see langword="true"/>。 279 279 /// それ以外の場合は <see langword="false"/>。 280 280 /// </param> … … 310 310 /// <param name="priority"> 311 311 /// <c>head</c> 内に設定された <see cref="System.Web.UI.HtmlControls.HtmlLink"/> 312 /// によるスタイルより 優先する場合は <see langword="true"/>。312 /// によるスタイルより先に登録する場合は <see langword="true"/>。 313 313 /// それ以外の場合は <see langword="false"/>。 314 314 /// </param> … … 432 432 /// <param name="priority"> 433 433 /// <c>head</c> 内に設定された <see cref="System.Web.UI.HtmlControls.HtmlLink"/> 434 /// によるスタイルより 優先する場合は <see langword="true"/>。434 /// によるスタイルより先に登録する場合は <see langword="true"/>。 435 435 /// それ以外の場合は <see langword="false"/>。 436 436 /// </param> … … 463 463 foreach (Control headerControl in page.Header.Controls) 464 464 { 465 if ( headerControl is System.Web.UI.HtmlControls.HtmlLink)465 if (ContainsHtmlLink(headerControl)) 466 466 { 467 467 break; … … 485 485 486 486 page.Header.Controls.AddAt(index, control); 487 } 488 489 /// <summary> 490 /// 指定したコントロールが <see cref="System.Web.UI.HtmlControls.HtmlLink"/> 491 /// を含むかどうかを返します。 492 /// </summary> 493 /// <param name="control">調べるコントロール。</param> 494 /// <returns> 495 /// <paramref name="control"/> が 496 /// <see cref="System.Web.UI.HtmlControls.HtmlLink"/> を含む場合は <see langword="true"/>。 497 /// それ以外の場合は <see langword="false"/>。 498 /// </returns> 499 private static bool ContainsHtmlLink(Control control) 500 { 501 if (control == null) 502 { 503 return false; 504 } 505 506 if (control is System.Web.UI.HtmlControls.HtmlLink) 507 { 508 return true; 509 } 510 511 HtmlGenericControl genericControl = control as HtmlGenericControl; 512 if (genericControl != null && string.Equals(genericControl.TagName, "link", StringComparison.OrdinalIgnoreCase)) 513 { 514 return true; 515 } 516 517 518 foreach (Control childControl in control.Controls) 519 { 520 if (ContainsHtmlLink(childControl)) 521 { 522 return true; 523 } 524 } 525 526 return false; 487 527 } 488 528 … … 700 740 { 701 741 /// <summary> 702 /// 優先するかどうか。742 /// 先に登録するかどうか。 703 743 /// </summary> 704 744 private readonly bool priority; … … 713 753 /// <param name="priority"> 714 754 /// <c>head</c> 内に設定された <see cref="System.Web.UI.HtmlControls.HtmlLink"/> 715 /// によるスタイルより 優先する場合は <see langword="true"/>。755 /// によるスタイルより先に登録する場合は <see langword="true"/>。 716 756 /// それ以外の場合は <see langword="false"/>。 717 757 /// </param> … … 724 764 725 765 /// <summary> 726 /// 優先するかどうかを取得します。766 /// 先に登録するかどうかを取得します。 727 767 /// </summary> 728 768 /// <value> 729 769 /// <c>head</c> 内に設定された <see cref="System.Web.UI.HtmlControls.HtmlLink"/> 730 /// によるスタイルより 優先する場合は <see langword="true"/>。770 /// によるスタイルより先に登録する場合は <see langword="true"/>。 731 771 /// それ以外の場合は <see langword="false"/>。 732 772 /// </value> … … 754 794 /// <param name="priority"> 755 795 /// <c>head</c> 内に設定された <see cref="System.Web.UI.HtmlControls.HtmlLink"/> 756 /// によるスタイルより 優先する場合は <see langword="true"/>。796 /// によるスタイルより先に登録する場合は <see langword="true"/>。 757 797 /// それ以外の場合は <see langword="false"/>。 758 798 /// </param> … … 797 837 /// <param name="priority"> 798 838 /// <c>head</c> 内に設定された <see cref="System.Web.UI.HtmlControls.HtmlLink"/> 799 /// によるスタイルより 優先する場合は <see langword="true"/>。839 /// によるスタイルより先に登録する場合は <see langword="true"/>。 800 840 /// それ以外の場合は <see langword="false"/>。 801 841 /// </param>
※ 詳しい使い方は
TracChangeset を参照してください。