コード例 #1
0
ファイル: Label.cs プロジェクト: HAF-Blade/MediaPortal-2
 void AllocFont()
 {
   if (_asset == null)
     _asset = new TextBuffer(GetFontFamilyOrInherited(), GetFontSizeOrInherited()) {Text = _resourceString};
 }
コード例 #2
0
ファイル: Label.cs プロジェクト: HAF-Blade/MediaPortal-2
 public override void Deallocate()
 {
   base.Deallocate();
   if (_asset != null)
   {
     _asset.Dispose();
     _asset = null;
   }
 }
コード例 #3
0
ファイル: TextControl.cs プロジェクト: BigGranu/MediaPortal-2
 void AllocFont()
 {
   if (_asset == null)
   {
     // We want to select the font based on the maximum zoom height (fullscreen)
     // This means that the font will be scaled down in windowed mode, but look
     // good in full screen. 
     _asset = new TextBuffer(GetFontFamilyOrInherited(), GetFontSizeOrInherited()) { Text = VisibleText };
   }
 }