/// <seealso cref="Parser.GetHeaderInfo()" /> public override HeaderInfo GetHeaderInfo() { var xndTitle = XmlConfig.SelectSingleNode("/config/moduleName"); var strTitle = xndTitle.InnerText; var clrColour = Color.FromArgb( (Int32)(UInt32.Parse(xndTitle.Attributes["colour"].Value, NumberStyles.HexNumber, null) | 0xff000000)); var tpsPosition = (TextPosition)Enum.Parse(typeof(TextPosition), xndTitle.Attributes["position"].Value); var xndImage = XmlConfig.SelectSingleNode("/config/moduleImage"); if (xndImage != null) { var strImagePath = xndImage.Attributes["path"].Value; var imgImage = String.IsNullOrEmpty(strImagePath) ? Fomod.GetScreenshotImage() : new Bitmap(Fomod.GetImage(strImagePath)); var booShowImage = Boolean.Parse(xndImage.Attributes["showImage"].Value) && (imgImage != null); var booShowFade = Boolean.Parse(xndImage.Attributes["showFade"].Value); var intHeight = Int32.Parse(xndImage.Attributes["height"].Value); if ((intHeight == -1) && booShowImage) { intHeight = 75; } return(new HeaderInfo(strTitle, clrColour, tpsPosition, imgImage, booShowImage, booShowFade, intHeight)); } var imgScreenshot = Fomod.GetScreenshotImage(); return(new HeaderInfo(strTitle, clrColour, tpsPosition, imgScreenshot, imgScreenshot != null, true, (imgScreenshot != null) ? 75 : -1)); }
/// <seealso cref="Parser.GetHeaderInfo()" /> public override HeaderInfo GetHeaderInfo() { var imgScreenshot = Fomod.GetScreenshotImage(); return(new HeaderInfo(XmlConfig.SelectSingleNode("/config/moduleName").InnerText, Color.FromKnownColor(KnownColor.ControlText), TextPosition.Left, imgScreenshot, imgScreenshot != null, true, (imgScreenshot != null) ? 75 : -1)); }