本文整理汇总了C#中MediaPortal.GUI.Library.GUIFont类的典型用法代码示例。如果您正苦于以下问题:C# GUIFont类的具体用法?C# GUIFont怎么用?C# GUIFont使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GUIFont类属于MediaPortal.GUI.Library命名空间,在下文中一共展示了GUIFont类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: FontRenderContext
public FontRenderContext(GUIFont font, string t)
{
string text = font.GetRTLText(t);
_outOfBounds = font.containsOutOfBoundsChar(text);
_ptrStr = Marshal.StringToCoTaskMemUni(text);
}
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:8,代码来源:GUIFont.cs
示例2: FinalizeConstruction
public override void FinalizeConstruction()
{
base.FinalizeConstruction();
HasCamera = _hasCamera;
Camera = new System.Drawing.Point(_cameraXPos, _cameraYPos);
_font1 = GUIFontManager.GetFont(_fontName1);
_font2 = GUIFontManager.GetFont(_fontName2);
// Create the background.
_imageBackground = LoadAnimationControl(_controlId, 0, _backgroundPositionX, _backgroundPositionY,
_backgroundWidth, _backgroundHeight, _backgroundTextureName);
_imageBackground.ParentControl = this;
_imageBackground.DimColor = DimColor;
// Create the foreground.
_imageForeground = LoadAnimationControl(_controlId, 0, _foregroundPositionX, _foregroundPositionY,
_foregroundWidth, _foregroundHeight, _foregroundTextureName);
_imageForeground.ParentControl = this;
_imageForeground.DimColor = DimColor;
// Create a single focus frame for the card that is in focus.
_frameFocus = LoadAnimationControl(0, 0,
0, 0,
_cardWidth, _cardHeight,
_frameFocusName);
_frameFocus.ParentControl = null;
_frameFocus.DimColor = DimColor;
_frameFocus.FlipY = _flipY;
_frameFocus.DiffuseFileName = _diffuseFilename;
_frameFocus.MaskFileName = _maskFilename;
_frameFocus.AllocResources();
// Create the card labels.
int y = _positionY + _label1OffsetY;
_label1 = new GUILabelControl(_controlId, 0,
0, y,
Width, 0,
_fontName1, "", 0x0,
Alignment.ALIGN_CENTER, VAlignment.ALIGN_TOP,
false,
_shadowAngle, _shadowDistance, _shadowColor);
y = _positionY + _label2OffsetY;
_label2 = new GUILabelControl(_controlId, 0,
0, y,
Width, 0,
_fontName2, "", 0x0,
Alignment.ALIGN_CENTER, VAlignment.ALIGN_TOP,
false,
_shadowAngle, _shadowDistance, _shadowColor);
// Create the horizontal scrollbar.
int scrollbarWidth = _scrollbarWidth;
int scrollbarHeight = _scrollbarHeight;
GUIGraphicsContext.ScaleHorizontal(ref scrollbarWidth);
GUIGraphicsContext.ScaleVertical(ref scrollbarHeight);
int scrollbarPosX = _positionX + (_width / 2) - (scrollbarWidth / 2);
_horizontalScrollbar = new GUIHorizontalScrollbar(_controlId, 0,
scrollbarPosX, _positionY + _scrollbarOffsetY,
scrollbarWidth, scrollbarHeight,
_scrollbarBackgroundTextureName, _scrollbarLeftTextureName,
_scrollbarRightTextureName);
_horizontalScrollbar.ParentControl = this;
_horizontalScrollbar.DimColor = DimColor;
// Create controls for the back of the selected card. All of the controls are provided as a single subitem.
XmlDocument doc = new XmlDocument();
if (SubItemCount > 0) // avoid exception when no SubItems are available
{
doc.LoadXml((string)GetSubItem(0));
XmlNodeList nodeList = doc.DocumentElement.SelectNodes("/controls/*");
IDictionary<string, string> defines = new Dictionary<string, string>(); // An empty set of defines.
foreach (XmlNode node in nodeList)
{
try
{
GUIControl newControl = GUIControlFactory.Create(_windowId, node, defines, null);
_cardBackControls.Add(newControl);
}
catch (Exception ex)
{
Log.Error("GUICoverFlow: Unable to load control. exception:{0}", ex.ToString());
}
}
}
}
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:90,代码来源:GUICoverFlow.cs
示例3: FinalizeConstruction
/// <summary>
/// This function is called after all of the XmlSkinnable fields have been filled
/// with appropriate data.
/// Use this to do any construction work other than simple data member assignments,
/// for example, initializing new reference types, extra calculations, etc..
/// </summary>
public override sealed void FinalizeConstruction()
{
base.FinalizeConstruction();
if (_fontName == null)
{
_fontName = string.Empty;
}
if (_fontName != "" && _fontName != "-")
{
_font = GUIFontManager.GetFont(_fontName);
}
GUILocalizeStrings.LocalizeLabel(ref _labelText);
if (_labelText == null)
{
_labelText = string.Empty;
}
if (_labelText.IndexOf("#") >= 0)
{
_containsProperty = true;
}
CachedLabel();
}
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:31,代码来源:GUILabelControl.cs
示例4: AllocResources
/// <summary>
/// Allocate any direct3d sources
/// </summary>
public override void AllocResources()
{
_propertyHasChanged = true;
if (_registeredForEvent == false)
{
GUIPropertyManager.OnPropertyChanged -= GUIPropertyManager_OnPropertyChanged;
GUIPropertyManager.OnPropertyChanged += GUIPropertyManager_OnPropertyChanged;
_registeredForEvent = true;
}
_font = GUIFontManager.GetFont(_fontName);
Update();
base.AllocResources();
}
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:17,代码来源:GUILabelControl.cs
示例5: FinalizeConstruction
public override void FinalizeConstruction()
{
base.FinalizeConstruction();
_lowItemHeight = _itemHeight;
_lowItemWidth = _itemWidth;
_lowTextureWidth = _textureWidth;
_lowTextureHeight = _textureHeight;
_controlUpDown = new GUISpinControl(GetID, 0, _spinControlPositionX, _spinControlPositionY,
_spinControlWidth, _spinControlHeight,
_upTextureName, _downTextureName, _upTextureNameFocus, _downTextureNameFocus,
_fontName, _spinControlColor,
GUISpinControl.SpinType.SPIN_CONTROL_TYPE_INT,
_spinControlAlignment);
_controlUpDown.ParentControl = this;
_controlUpDown.DimColor = DimColor;
int xpos = 5 + _positionX + _width;
if (xpos + 15 > GUIGraphicsContext.Width)
{
xpos = GUIGraphicsContext.Width - 15;
}
_verticalScrollBar = new GUIVerticalScrollbar(_controlId, 0,
5 + _positionX + _width + _scrollbarXOff, _positionY,
_scrollbarWidth, _height,
_scrollbarBackGroundTextureName, _scrollbarTopTextureName,
_scrollbarBottomTextureName);
_verticalScrollBar.ParentControl = this;
_verticalScrollBar.SendNotifies = false;
_verticalScrollBar.DimColor = DimColor;
_font = GUIFontManager.GetFont(_fontName);
SetTextureDimensions(_textureWidth, _textureHeight);
SetThumbDimensionsLow(_xPositionThumbNail, _yPositionThumbNail, _thumbNailWidth, _thumbNailHeight);
_frameNoFocusControl = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _itemWidth,
_itemHeight,
_frameNoFocusName);
_frameNoFocusControl.ParentControl = this;
_frameNoFocusControl.DimColor = DimColor;
_frameNoFocusControl.MaskFileName = _frameNoFocusMask;
_frameNoFocusControl.SetAnimations(_allThumbAnimations);
_frameFocusControl = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _itemWidth,
_itemHeight,
_frameFocusName);
_frameFocusControl.ParentControl = this;
_frameFocusControl.DimColor = DimColor;
_frameFocusControl.MaskFileName = _frameFocusMask;
_frameFocusControl.SetAnimations(_allThumbAnimations);
using (Settings xmlreader = new MPSettings())
{
_loopDelay = xmlreader.GetValueAsInt("gui", "listLoopDelay", 100);
}
}
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:56,代码来源:GUIThumbnailPanel.cs
示例6: AllocResources
public override void AllocResources()
{
_sleeper = 0;
_font = GUIFontManager.GetFont(_fontName);
base.AllocResources();
_controlUpDown.AllocResources();
_controlUpDown.DimColor = DimColor;
_verticalScrollBar.AllocResources();
_verticalScrollBar.DimColor = DimColor;
if (ThumbAnimations == null || ThumbAnimations.Count < 1)
_allThumbAnimations.Add(new VisualEffect());
else
_allThumbAnimations.AddRange(ThumbAnimations);
if (_showFrame)
{
_frameFocusControl.AllocResources();
_frameNoFocusControl.AllocResources();
_frameFocusControl.DimColor = DimColor;
_frameNoFocusControl.DimColor = DimColor;
_frameFocusControl.SetAnimations(_allThumbAnimations);
_frameNoFocusControl.SetAnimations(_allThumbAnimations);
}
Calculate();
}
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:28,代码来源:GUIThumbnailPanel.cs
示例7: AllocResources
/// <summary>
/// Allocates the control its DirectX resources.
/// </summary>
public override void AllocResources()
{
base.AllocResources();
_imageCheckMarkFocused.AllocResources();
_imageCheckMarkNonFocused.AllocResources();
_font = GUIFontManager.GetFont(_fontName);
}
开发者ID:sanyaade-embedded-systems,项目名称:MediaPortal-1,代码行数:10,代码来源:GUICheckMarkControl.cs
示例8: AllocResources
/// <summary>
/// Allocates the control its DirectX resources.
/// </summary>
public override void AllocResources()
{
_font = GUIFontManager.GetFont(_fontName);
}
开发者ID:akhilgt,项目名称:MediaPortal-1,代码行数:7,代码来源:GUIFadeLabel.cs
示例9: FinalizeConstruction
/// <summary>
/// This function is called after all of the XmlSkinnable fields have been filled
/// with appropriate data.
/// Use this to do any construction work other than simple data member assignments,
/// for example, initializing new reference types, extra calculations, etc..
/// </summary>
public override sealed void FinalizeConstruction()
{
base.FinalizeConstruction();
GUILocalizeStrings.LocalizeLabel(ref _label);
// The labelTail is used to fill the backend of a scrolling label for both wrapping and non-wrapping labels
// The wrapString is the text that joins the back to the front of a wrapping label (not used if the label should not wrap).
if (_userWrapString.Length > 0)
{
_labelTail = "" + _userWrapString[_userWrapString.Length - 1];
_wrapString = _userWrapString.Substring(0, _userWrapString.Length - 1);
}
_labelControl = new GUILabelControl(_parentControlId, 0, _positionX, _positionY, _width, _height, _fontName,
_label, _textColor, _textAlignment, _textVAlignment, false,
_shadowAngle, _shadowDistance, _shadowColor)
{
CacheFont = false,
ParentControl = this
};
_labelControl.SetAnimations(Animations);
if (_fontName != "" && _fontName != "-")
{
_font = GUIFontManager.GetFont(_fontName);
}
if (_label.IndexOf("#", System.StringComparison.Ordinal) >= 0)
{
_containsProperty = true;
}
}
开发者ID:akhilgt,项目名称:MediaPortal-1,代码行数:36,代码来源:GUIFadeLabel.cs
示例10: AllocResources
/// <summary>
/// Allocates the control its DirectX resources.
/// </summary>
public override void AllocResources()
{
base.AllocResources();
_frameCounter = 0;
_imageFocused.AllocResources();
_imageNonFocused.AllocResources();
_width = _imageFocused.Width;
_height = _imageFocused.Height;
_imageBackground.AllocResources();
_imageLeft.AllocResources();
_imageLeftFocus.AllocResources();
_imageRight.AllocResources();
_imageRightFocus.AllocResources();
_font = GUIFontManager.GetFont(_fontName);
PositionLeftAndRightImages();
_labelControl.AllocResources();
}
开发者ID:nio22,项目名称:MediaPortal-1,代码行数:25,代码来源:GUISelectButtonControl.cs
示例11: FinalizeConstruction
public override void FinalizeConstruction()
{
base.FinalizeConstruction();
int x1 = 16;
int y1 = 16;
GUIGraphicsContext.ScalePosToScreenResolution(ref x1, ref y1);
_imageFocused = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
_textureFocusName);
_imageFocused.ParentControl = this;
_imageFocused.DimColor = DimColor;
_imageNonFocused = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
_textureNoFocusName);
_imageNonFocused.ParentControl = this;
_imageNonFocused.DimColor = DimColor;
_imageBackground = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _width, _height,
_backgroundTextureName);
_imageBackground.ParentControl = this;
_imageBackground.DimColor = DimColor;
_imageLeft = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _leftTextureWidth, _leftTextureHeight, _leftTextureName);
_imageLeft.DimColor = DimColor;
_imageLeft.ParentControl = this;
_imageLeftFocus = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _leftTextureFocusWidth, _leftTextureFocusHeight,
_leftFocusName);
_imageLeftFocus.ParentControl = this;
_imageLeftFocus.DimColor = DimColor;
_imageRight = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _rightTextureWidth, _rightTextureHeight, _rightTextureName);
_imageRight.ParentControl = this;
_imageRight.DimColor = DimColor;
_imageRightFocus = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY, _rightTextureFocusWidth, _rightTextureFocusHeight,
_rightFocusName);
_imageRightFocus.ParentControl = this;
_imageRightFocus.DimColor = DimColor;
if (_fontName != "" && _fontName != "-")
{
_font = GUIFontManager.GetFont(_fontName);
}
GUILocalizeStrings.LocalizeLabel(ref _label);
_imageFocused.Filtering = false;
_imageNonFocused.Filtering = false;
_imageBackground.Filtering = false;
_imageLeft.Filtering = false;
_imageLeftFocus.Filtering = false;
_imageRight.Filtering = false;
_imageRightFocus.Filtering = false;
_labelControl = new GUILabelControl(_parentControlId);
_labelControl.CacheFont = true;
_labelControl.ParentControl = this;
_labelControl.SetShadow(_shadowAngle, _shadowDistance, _shadowColor);
}
开发者ID:nio22,项目名称:MediaPortal-1,代码行数:56,代码来源:GUISelectButtonControl.cs
示例12: LoadFonts
/// <summary>
/// Loads the fonts from a file.
/// </summary>
/// <param name="strFilename">The filename from where the fonts are loaded.</param>
/// <returns>true if loaded else false</returns>
public static bool LoadFonts(string strFilename)
{
// Clear current set of fonts
Dispose();
lock (Renderlock)
{
int counter = 0;
Log.Info(" Load fonts from {0}", strFilename);
_listFonts.DisposeAndClear();
// Load the debug font
GUIFont fontDebug = new GUIFont("debug", "Arial", 12);
fontDebug.ID = counter++;
fontDebug.Load();
_listFonts.Add(fontDebug);
try
{
// Load the XML document
XmlDocument doc = new XmlDocument();
doc.Load(strFilename);
// Check the root element
if (doc.DocumentElement == null)
{
return false;
}
string strRoot = doc.DocumentElement.Name;
if (strRoot != "fonts")
{
return false;
}
// Select the list of fonts
XmlNodeList list = doc.DocumentElement.SelectNodes("/fonts/font");
foreach (XmlNode node in list)
{
XmlNode nodeStart = node.SelectSingleNodeFast("startchar");
XmlNode nodeEnd = node.SelectSingleNodeFast("endchar");
XmlNode nodeName = node.SelectSingleNodeFast("name");
XmlNode nodeFileName = node.SelectSingleNodeFast("filename");
XmlNode nodeHeight = node.SelectSingleNodeFast("height");
XmlNode nodeBold = node.SelectSingleNodeFast("bold");
XmlNode nodeItalics = node.SelectSingleNodeFast("italic");
if (nodeHeight != null && nodeName != null && nodeFileName != null)
{
bool bold = false;
bool italic = false;
if (nodeBold != null && nodeBold.InnerText != null && nodeBold.InnerText.Equals("yes"))
{
bold = true;
}
if (nodeItalics != null && nodeItalics.InnerText != null && nodeItalics.InnerText.Equals("yes"))
{
italic = true;
}
string strName = nodeName.InnerText;
string strFileName = nodeFileName.InnerText;
int iHeight = Int32.Parse(nodeHeight.InnerText);
// height is based on 720x576
float fPercent = (((float)GUIGraphicsContext.Height) * GUIGraphicsContext.ZoomVertical) / 576.0f;
fPercent *= iHeight;
iHeight = (int)fPercent;
FontStyle style = new FontStyle();
style = FontStyle.Regular;
if (bold)
{
style |= FontStyle.Bold;
}
if (italic)
{
style |= FontStyle.Italic;
}
GUIFont font = new GUIFont(strName, strFileName, iHeight, style);
font.ID = counter++;
// .NET's LocalisationProvider should give the correct amount of chars.
if (nodeStart != null && nodeStart.InnerText != "" && nodeEnd != null && nodeEnd.InnerText != "")
{
int start = Int32.Parse(nodeStart.InnerText);
int end = Int32.Parse(nodeEnd.InnerText);
font.SetRange(start, end);
}
else
{
font.SetRange(0, GUIGraphicsContext.CharsInCharacterSet);
}
font.Load();
_listFonts.Add(font);
}
}
// Select the list of aliases
XmlNodeList listAlias = doc.DocumentElement.SelectNodes("/fonts/alias");
foreach (XmlNode node in listAlias)
//.........这里部分代码省略.........
开发者ID:disaster123,项目名称:MediaPortal-1,代码行数:101,代码来源:GUIFontManager.cs
示例13: SetLabel
/// <summary>
/// Set the text of the control.
/// </summary>
/// <param name="strFontName">The font name.</param>
/// <param name="strLabel">The text.</param>
/// <param name="dwColor">The font color.</param>
public void SetLabel(string strFontName, string strLabel, long dwColor)
{
if (strFontName == null || strLabel == null)
{
return;
}
_label = strLabel;
_textColor = dwColor;
_fontName = strFontName;
_font = GUIFontManager.GetFont(_fontName);
}
开发者ID:sanyaade-embedded-systems,项目名称:MediaPortal-1,代码行数:17,代码来源:GUICheckMarkControl.cs
示例14: FinalizeConstruction
/// <summary>
/// This method gets called when the control is created and all properties has been set
/// It allows the control todo any initialization
/// </summary>
public override void FinalizeConstruction()
{
base.FinalizeConstruction();
_imageCheckMarkFocused = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY,
_checkMarkWidth, _checkMarkHeight, _checkMarkFocusTextureName);
_imageCheckMarkFocused.ParentControl = this;
_imageCheckMarkFocused.DimColor = DimColor;
_imageCheckMarkNonFocused = LoadAnimationControl(_parentControlId, _controlId, _positionX, _positionY,
_checkMarkWidth, _checkMarkHeight, _checkMarkNoFocusTextureName);
_imageCheckMarkNonFocused.ParentControl = this;
_imageCheckMarkNonFocused.DimColor = DimColor;
if (_fontName != "" && _fontName != "-")
{
_font = GUIFontManager.GetFont(_fontName);
}
GUILocalizeStrings.LocalizeLabel(ref _label);
}
开发者ID:sanyaade-embedded-systems,项目名称:MediaPortal-1,代码行数:25,代码来源:GUICheckMarkControl.cs
示例15: PreAllocResources
public override void PreAllocResources()
{
base.PreAllocResources();
float fWidth = 0, fHeight = 0;
_font = GUIFontManager.GetFont(_fontName);
if (null == _font)
{
return;
}
_font.GetTextExtent("afy", ref fWidth, ref fHeight);
try
{
_itemHeight = (int)(fHeight);
float fTotalHeight = (float)_height;
_itemsPerPage = (int)Math.Floor(fTotalHeight / (fHeight * _lineSpacing));
if (_itemsPerPage == 0)
{
_itemsPerPage = 1;
}
}
catch (Exception)
{
_itemHeight = 1;
_itemsPerPage = 1;
}
}
开发者ID:MediaPortal,项目名称:MediaPortal-1,代码行数:27,代码来源:GUITextScrollUpControl.cs
示例16: AllocResources
/// <summary>
/// Allocates the control its DirectX resources.
/// </summary>
public override void AllocResources()
{
Dispose();
base.AllocResources();
_upDownControl.AllocResources();
_verticalScrollbar.AllocResources();
_font = GUIFontManager.GetFont(_fontName);
_font2 = GUIFontManager.GetFont(_fontName2Name);
float fHeight = (float)_itemHeight + _spaceBetweenItems;
float fTotalHeight = _height - _upDownControl.Height - 5;
_itemsPerPage = (int)(fTotalHeight / fHeight);
_listButtons = new List<GUIControl>();
_labelControls1 = new List<GUILabelControl>();
_labelControls2 = new List<GUILabelControl>();
_labelControls3 = new List<GUILabelControl>();
AllocButtons();
for (int i = 0; i < _itemsPerPage; ++i)
{
GUILabelControl cntl1 = new GUILabelControl(_controlId, 0, 0, 0, 0, 0, _fontName, "", _textColor,
Alignment.ALIGN_LEFT, VAlignment.ALIGN_TOP, false,
_shadowAngle, _shadowDistance, _shadowColor);
GUILabelControl cntl2 = new GUILabelControl(_controlId, 0, 0, 0, 0, 0, _fontName2Name, "", _textColor2,
Alignment.ALIGN_LEFT, VAlignment.ALIGN_TOP, false,
_shadowAngle, _shadowDistance, _shadowColor);
GUILabelControl cntl3 = new GUILabelControl(_controlId, 0, 0, 0, 0, 0, _fontName2Name, "", _textColor3,
Alignment.ALIGN_RIGHT, VAlignment.ALIGN_TOP, false,
_shadowAngle, _shadowDistance, _shadowColor);
cntl1.ParentControl = this;
cntl2.ParentControl = this;
cntl3.ParentControl = this;
cntl1.AllocResources();
cntl2.AllocResources();
cntl3.AllocResources();
cntl1.DimColor = DimColor;
cntl2.DimColor = DimColor;
cntl3.DimColor = DimColor;
_labelControls1.Add(cntl1);
_labelControls2.Add(cntl2);
_labelControls3.Add(cntl3);
}
int iPages = 1;
if (_listItems.Count > 0)
{
iPages = _itemsPerPage == 0 ? 0 : _listItems.Count / _itemsPerPage;
if (_itemsPerPage != 0)
{
if ((_listItems.Count % _itemsPerPage) != 0)
{
iPages++;
}
}
}
_upDownControl.SetRange(1, iPages);
_upDownControl.Value = 1;
_upDownControl.DimColor = DimColor;
_verticalScrollbar.DimColor = DimColor;
}
开发者ID:doskabouter,项目名称:MediaPortal-1,代码行数:64,代码来源:GUIListControl.cs
示例17: FinalizeConstruction
public override void FinalizeConstruction()
{
base.FinalizeConstruction();
_font = GUIFontManager.GetFont(_fontName);
if (_property.IndexOf("#", StringComparison.Ordinal) >= 0)
{
_containsProperty = true;
}
}
开发者ID:MediaPortal,项目名称:MediaPortal-1,代码行数:9,代码来源:GUITextScrollUpControl.cs
示例18: FinalizeConstruction
public override sealed void FinalizeConstruction()
{
base.FinalizeConstruction();
_font = GUIFontManager.GetFont(_fontName);
if (_fontName2Name == string.Empty)
{
_fontName2Name = _fontName;
}
if (_fontName3Name == string.Empty)
{
_fontName3Name = _fontName2Name;
}
Font2 = _fontName2Name;
Font3 = _fontName3Name;
_upDownControl = new GUISpinControl(_controlId, 0, _spinControlPositionX, _spinControlPositionY, _spinControlWidth,
_spinControlHeight, _upTextureName, _downTextureName, _upTextureNameFocus,
_downTextureNameFocus, _fontName, _spinControlColor,
GUISpinControl.SpinType.SPIN_CONTROL_TYPE_INT, _spinControlAlignment)
{
ParentControl = this,
DimColor = DimColor
};
_verticalScrollbar = new GUIVerticalScrollbar(_controlId, 0, 5 + _positionX + _width + _scrollbarXOff, _positionY,
_scrollbarWidth, _height,
_scrollbarBackgroundName, _scrollbarTopName, _scrollbarBottomName)
{
ParentControl = this,
SendNotifies = false,
DimColor =DimColor
};
_upDownControl.WindowId = WindowId;
using (Settings xmlreader = new MPSettings())
{
_loopDelay = xmlreader.GetValueAsInt("gui", "listLoopDelay", 100);
}
}
开发者ID:doskabouter,项目名称:MediaPortal-1,代码行数:40,代码来源:GUIListControl.cs
示例19: AllocResources
public override void AllocResources()
{
_sleeper = 0;
base.AllocResources();
_font = GUIFontManager.GetFont(_fontName);
if (_imageBackground != null)
{
_imageBackground.AllocResources();
}
if (_imageInfo != null)
{
_imageInfo.AllocResources();
}
if (_upDownControl != null)
{
_upDownControl.AllocResources();
}
if (ThumbAnimations == null || ThumbAnimations.Count < 1)
_allThumbAnimations.Add(new VisualEffect());
else
_allThumbAnimations.AddRange(ThumbAnimations);
for (int i = 0; i < _imageFolder.Count; ++i)
{
_imageFolder[i].AllocResources();
_imageFolderFocus[i].AllocResources();
_frameControl[i].AllocResources();
_frameFocusControl[i].AllocResources();
_listLabels[i].AllocResources();
_imageFolder[i].SetAnimations(_allThumbAnimations);
_imageFolderFocus[i].SetAnimations(_allThumbAnimations);
_frameControl[i].SetAnimations(_allThumbAnimations);
_frameFocusControl[i].SetAnimations(_allThumbAnimations);
}
if (_horizontalScrollbar != null)
{
_horizontalScrollbar.AllocResources();
}
Calculate();
_upDownControl.ParentID = GetID;
}
开发者ID:MediaPortal,项目名称:MediaPortal-1,代码行数:46,代码来源:GUIFilmstripControl.cs
示例20: AllocResources
public override void AllocResources()
{
base.AllocResources();
_font = GUIFontManager.GetFont(_fontName);
_imageTop.AllocResources();
_imageBottom.AllocResources();
_imageMid.AllocResources();
_imageRight.AllocResources();
_imageLeft.AllocResources();
_imageFillBackground.AllocResources();
_imageFill1.AllocResources();
_imageFill2.AllocResources();
_imageFill3.AllocResources();
if (_imageFillMarker != null)
{
_imageFillMarker.AllocResources();
_imageFillMarker.Height = _height - 6;
_imageFillMarker.Filtering = false;
}
_imageTick.AllocResources();
_imageLogo.AllocResources();
_imageTop.Filtering = false;
_imageBottom.Filtering = false;
_imageMid.Filtering = false;
_imageRight.Filtering = false;
_imageLeft.Filtering = false;
_imageFill1.Filtering = false;
_imageFill2.Filtering = false;
_imageFill3.Filtering = false;
_imageTick.Filtering = false;
if (_height == 0)
{
_height = _imageRight.TextureHeight;
}
// _imageTop.Height=_height;
_imageRight.Height = _height;
_imageLeft.Height = _height;
_imageMid.Height = _height;
_imageFill1.Height = _height - 6;
_imageFill2.Height = _height - 6;
_imageFill3.Height = _height - 6;
//_imageTick.Height=_height;
}
开发者ID:nio22,项目名称:MediaPortal-1,代码行数:44,代码来源:GUITVProgressControl.cs
注:本文中的MediaPortal.GUI.Library.GUIFont类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论