private void Init(Computer c, OS os, string name, DatabaseDaemon.DatabasePermissions permissions, string DataTypeIdentifier, string Foldername, Color themeColor) { this.sideEffect = new MovingBarsEffect(); this.Permissions = permissions; this.State = DatabaseDaemon.DatabaseState.Welcome; this.DataTypeIdentifier = DataTypeIdentifier; this.DataType = ObjectSerializer.GetTypeForName(DataTypeIdentifier); this.ScrollPanel = new ScrollableSectionedPanel(26, GuiData.spriteBatch.GraphicsDevice); this.TextRegion = new ScrollableTextRegion(GuiData.spriteBatch.GraphicsDevice); this.Foldername = Foldername == null ? "Database" : Foldername; this.ThemeColor = themeColor; if (DataTypeIdentifier.EndsWith("NeopalsAccount")) { this.WildcardAssets.Add((object)Neopal.PetType.Blundo, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Blundo")); this.WildcardAssets.Add((object)Neopal.PetType.Chisha, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Chisha")); this.WildcardAssets.Add((object)Neopal.PetType.Jubdub, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Jubdub")); this.WildcardAssets.Add((object)Neopal.PetType.Kachici, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Kachici")); this.WildcardAssets.Add((object)Neopal.PetType.Kyrill, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Kyrill")); this.WildcardAssets.Add((object)Neopal.PetType.Myncl, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Myncl")); this.WildcardAssets.Add((object)Neopal.PetType.Pageri, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Pageri")); this.WildcardAssets.Add((object)Neopal.PetType.Psybunny, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Psybunny")); this.WildcardAssets.Add((object)Neopal.PetType.Scorchum, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Scorchum")); this.WildcardAssets.Add((object)Neopal.PetType.Unisam, os.content.Load <Texture2D>("DLC/Sprites/Neopals/Unisam")); } this.PlaceholderSprite = os.content.Load <Texture2D>("Sprites/Chip"); this.Triangle = os.content.Load <Texture2D>("DLC/Sprites/Triangle"); }
public void DrawUI(Rectangle dest, OS os) { int ButtonHeight = (int)((double)GuiData.ActiveFontConfig.tinyFontCharHeight + 10.0); if (this.panel.PanelHeight != ButtonHeight + 4) { this.panel = new ScrollableSectionedPanel(ButtonHeight + 4, GuiData.spriteBatch.GraphicsDevice); } List <DisplayModuleLSHelper.LSItem> items = this.BuildDirectoryDrawList(os.connectedComp == null ? os.thisComputer.files.root : os.connectedComp.files.root, 0, 0, os); this.panel.NumberOfPanels = items.Count; int width = dest.Width - 25; Action <int, Rectangle, SpriteBatch> DrawSection = (Action <int, Rectangle, SpriteBatch>)((index, bounds, sb) => { DisplayModuleLSHelper.LSItem lsItem = items[index]; if (lsItem.IsEmtyDisplay) { TextItem.doFontLabel(new Vector2((float)(bounds.X + 5 + lsItem.indent), (float)(bounds.Y + 2)), "-" + LocaleTerms.Loc("Empty") + "-", GuiData.tinyfont, new Color?(), (float)width, (float)ButtonHeight, false); } else if (Button.doButton(300000 + index, bounds.X + 5 + lsItem.indent, bounds.Y + 2, width - lsItem.indent, ButtonHeight, lsItem.DisplayName, new Color?())) { lsItem.Clicked(); } }); Button.DisableIfAnotherIsActive = true; this.panel.Draw(DrawSection, GuiData.spriteBatch, dest); Button.DisableIfAnotherIsActive = false; }
public MessageBoardDaemon(Computer c, OS os) : base(c, "Message Board", os) { if (Images == null) { Images = new Dictionary <MessageBoardPostImage, Texture2D>(); Images.Add(MessageBoardPostImage.Academic, os.content.Load <Texture2D>("Sprites/Academic_Logo")); Images.Add(MessageBoardPostImage.Sun, os.content.Load <Texture2D>("Sprites/Sun")); Images.Add(MessageBoardPostImage.Snake, os.content.Load <Texture2D>("Sprites/Snake")); Images.Add(MessageBoardPostImage.Circle, os.content.Load <Texture2D>("CircleOutline")); Images.Add(MessageBoardPostImage.Duck, os.content.Load <Texture2D>("Sprites/Duck")); Images.Add(MessageBoardPostImage.Page, os.content.Load <Texture2D>("Sprites/Page")); Images.Add(MessageBoardPostImage.Speech, os.content.Load <Texture2D>("Sprites/SpeechBubble")); Images.Add(MessageBoardPostImage.Mod, os.content.Load <Texture2D>("Sprites/Hammer")); Images.Add(MessageBoardPostImage.Chip, os.content.Load <Texture2D>("Sprites/Chip")); } threadsPanel = new ScrollableSectionedPanel(415, GuiData.spriteBatch.GraphicsDevice); }
private int DrawMailMessageText(Rectangle textBounds, SpriteBatch sb, string[] text) { if (this.sectionedPanel == null || this.sectionedPanel.PanelHeight != this.GetRenderTextHeight()) { this.sectionedPanel = new ScrollableSectionedPanel(this.GetRenderTextHeight(), sb.GraphicsDevice); } this.sectionedPanel.NumberOfPanels = text.Length; int itemsDrawn = 0; this.sectionedPanel.Draw((Action <int, Rectangle, SpriteBatch>)((index, dest, spBatch) => { spBatch.DrawString(GuiData.tinyfont, LocalizedFileLoader.SafeFilterString(text[index]), new Vector2((float)dest.X, (float)dest.Y), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.8f); ++itemsDrawn; }), sb, textBounds); if (this.sectionedPanel.NumberOfPanels * this.sectionedPanel.PanelHeight < textBounds.Height) { return(this.sectionedPanel.NumberOfPanels * this.sectionedPanel.PanelHeight); } return(textBounds.Height); }
private int DrawMailMessageText(Rectangle textBounds, SpriteBatch sb, string[] text) { if (sectionedPanel == null || sectionedPanel.PanelHeight != GetRenderTextHeight()) { sectionedPanel = new ScrollableSectionedPanel(GetRenderTextHeight(), sb.GraphicsDevice); } sectionedPanel.NumberOfPanels = text.Length; var itemsDrawn = 0; sectionedPanel.Draw((index, dest, spBatch) => { spBatch.DrawString(GuiData.tinyfont, text[index], new Vector2(dest.X, dest.Y), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.8f); ++itemsDrawn; }, sb, textBounds); if (sectionedPanel.NumberOfPanels * sectionedPanel.PanelHeight < textBounds.Height) { return(sectionedPanel.NumberOfPanels * sectionedPanel.PanelHeight); } return(textBounds.Height); }
public void DrawUI(Rectangle dest, OS os) { var ButtonHeight = (int)(GuiData.ActiveFontConfig.tinyFontCharHeight + 10.0); if (panel.PanelHeight != ButtonHeight + 4) { panel = new ScrollableSectionedPanel(ButtonHeight + 4, GuiData.spriteBatch.GraphicsDevice); } var items = BuildDirectoryDrawList( os.connectedComp == null ? os.thisComputer.files.root : os.connectedComp.files.root, 0, 0, os); panel.NumberOfPanels = items.Count; var width = dest.Width - 25; Action <int, Rectangle, SpriteBatch> DrawSection = (index, bounds, sb) => { var lsItem = items[index]; if (lsItem.IsEmtyDisplay) { TextItem.doFontLabel(new Vector2(bounds.X + 5 + lsItem.indent, bounds.Y + 2), "-Empty-", GuiData.tinyfont, new Color?(), width, ButtonHeight); } else { if ( !Button.doButton(300000 + index, bounds.X + 5 + lsItem.indent, bounds.Y + 2, width - lsItem.indent, ButtonHeight, lsItem.DisplayName, new Color?())) { return; } lsItem.Clicked(); } }; Button.DisableIfAnotherIsActive = true; panel.Draw(DrawSection, GuiData.spriteBatch, dest); Button.DisableIfAnotherIsActive = false; }
public DisplayModuleLSHelper() { this.panel = new ScrollableSectionedPanel(24, GuiData.spriteBatch.GraphicsDevice); }
private void DrawUpgrades(Rectangle bounds, SpriteBatch sb) { int panelHeight = 28; if (this.scrollerPanel == null) { this.scrollerPanel = new ScrollableSectionedPanel(panelHeight, sb.GraphicsDevice); } this.scrollerPanel.NumberOfPanels = this.upgradeNames.Count; Button.outlineOnly = true; Button.drawingOutline = false; int drawnThisCycle = 0; bool needsButtonChecks = bounds.Contains(GuiData.getMousePoint()); this.scrollerPanel.Draw((Action <int, Rectangle, SpriteBatch>)((index, drawAreaFull, sprBatch) => { Rectangle destinationRectangle = new Rectangle(drawAreaFull.X, drawAreaFull.Y, drawAreaFull.Width - 12, drawAreaFull.Height); int myID = 115700 + index * 111; if (needsButtonChecks && Button.doButton(myID, destinationRectangle.X, destinationRectangle.Y, destinationRectangle.Width, destinationRectangle.Height, "", new Color?(Color.Transparent))) { this.PurchaseUpgrade(index); } else if (!needsButtonChecks && GuiData.hot == myID) { GuiData.hot = -1; } bool flag1 = (double)this.upgradeCosts[index] <= (double)this.activeState.points; bool flag2 = flag1 && GuiData.hot == myID; if (GuiData.hot == myID) { this.hoverIndex = index; } if (flag2) { int height = destinationRectangle.Height; int num1 = 0; int num2 = 0; if (drawAreaFull.X == 0 && drawAreaFull.Y == 0) { if (drawnThisCycle == 0) { num1 = bounds.X; num2 = bounds.Y; } else { num1 = bounds.X; num2 = bounds.Y + bounds.Height - panelHeight / 2; } } Rectangle rectangle = new Rectangle(num1 + destinationRectangle.X - height, num2 + destinationRectangle.Y - height, destinationRectangle.Width + 2 * height, destinationRectangle.Height + 2 * height); for (int index1 = 0; index1 < this.Stars.Count; ++index1) { this.DrawStar(rectangle, sb, this.Stars[index1]); } sb.Draw(this.scanlinesTextBackground, rectangle, this.ThemeColor * (GuiData.active == myID ? 0.6f : 0.3f)); } sprBatch.Draw(this.scanlinesTextBackground, destinationRectangle, new Rectangle?(new Rectangle(this.scanlinesTextBackground.Width / 2, this.scanlinesTextBackground.Height / 9 * 4, this.scanlinesTextBackground.Width / 2, this.scanlinesTextBackground.Height / 4)), flag1 ? this.ThemeColor * 0.2f : Utils.AddativeWhite * 0.08f); if (GuiData.hot == myID) { RenderedRectangle.doRectangle(destinationRectangle.X + 1, destinationRectangle.Y + 1, destinationRectangle.Width - 2, destinationRectangle.Height - 2, new Color?(flag2 ? (GuiData.active == myID ? Color.Black : this.ThemeColorBacking) : Color.Black)); } if (index == 0) { Utils.drawLine(sprBatch, new Vector2((float)(destinationRectangle.X + 1), (float)(destinationRectangle.Y + 1)), new Vector2((float)(destinationRectangle.X + destinationRectangle.Width - 2), (float)(destinationRectangle.Y + 1)), Vector2.Zero, this.ThemeColor, 0.8f); } Utils.drawLine(sprBatch, new Vector2((float)(destinationRectangle.X + 1), (float)(destinationRectangle.Y + destinationRectangle.Height - 2)), new Vector2((float)(destinationRectangle.X + destinationRectangle.Width - 2), (float)(destinationRectangle.Y + destinationRectangle.Height - 2)), Vector2.Zero, this.ThemeColor, 0.8f); if (flag1) { sprBatch.Draw(Utils.white, new Rectangle(destinationRectangle.X, destinationRectangle.Y + 1, 8, destinationRectangle.Height - 2), this.ThemeColor); } string text = "[" + this.activeState.upgradeCounts[index].ToString("000") + "] " + this.upgradeNames[index]; TextItem.doFontLabel(new Vector2((float)(destinationRectangle.X + 4 + (flag1 ? 10 : 0)), (float)(destinationRectangle.Y + 4)), text, GuiData.UISmallfont, new Color?(flag2 ? (GuiData.active == myID ? this.ThemeColor : (flag1 ? Color.White : Color.Gray)) : (flag1 ? Utils.AddativeWhite : Color.Gray)), (float)(destinationRectangle.Width - 6), float.MaxValue, false); ++drawnThisCycle; }), sb, bounds); Button.outlineOnly = false; Button.drawingOutline = true; }
public static void RenderObject(object o, Rectangle bounds, SpriteBatch spriteBatch, ScrollableSectionedPanel panel, Color TitleColor) { List <ReflectiveRenderer.RenderableField> fields = ReflectiveRenderer.GetRenderablesFromType(o.GetType(), o, 0); int entryLineHeight = ReflectiveRenderer.GetEntryLineHeight(); panel.PanelHeight = entryLineHeight; panel.NumberOfPanels = fields.Count; int pixelsPerIndentLevel = 20; panel.Draw((Action <int, Rectangle, SpriteBatch>)((i, dest, sb) => { int num = fields[i].IndentLevel * pixelsPerIndentLevel; dest.X += num; dest.Width -= num; if (fields[i].IsTitle) { TextItem.doFontLabelToSize(dest, fields[i].RenderedValue, GuiData.font, TitleColor, true, true); Rectangle destinationRectangle = new Rectangle(dest.X, dest.Y + dest.Height - 1, dest.Width, 1); sb.Draw(Utils.white, destinationRectangle, TitleColor); } else { string text1 = fields[i].VariableName + " :"; Vector2 vector2_1 = GuiData.smallfont.MeasureString(text1); sb.DrawString(GuiData.smallfont, text1, new Vector2((float)dest.X, (float)dest.Y), Color.Gray); string text2 = fields[i].RenderedValue; Vector2 vector2_2 = GuiData.smallfont.MeasureString(text2); if ((double)vector2_2.X > (double)(dest.Width - 20) || (double)vector2_2.Y > (double)dest.Height) { text2.Replace("\n", " "); text2 = text2.Substring(0, Math.Min(text2.Length, (int)((double)dest.Width / ((double)GuiData.ActiveFontConfig.tinyFontCharHeight + 2.0)))) + "..."; } Vector2 position = new Vector2((float)((double)dest.X + (double)vector2_1.X + 6.0), (float)dest.Y); if (ReflectiveRenderer.PreRenderForObject != null && sb.Name != "AltRTBatch") { ReflectiveRenderer.PreRenderForObject(position, fields[i].t, fields[i].RenderedValue); } sb.DrawString(GuiData.smallfont, text2, position, Color.White); } }), spriteBatch, bounds); ReflectiveRenderer.PreRenderForObject = (Action <Vector2, Type, string>)null; }
private void DrawUpgrades(Rectangle bounds, SpriteBatch sb) { var panelHeight = 28; if (scrollerPanel == null) { scrollerPanel = new ScrollableSectionedPanel(panelHeight, sb.GraphicsDevice); } scrollerPanel.NumberOfPanels = upgradeNames.Count; Button.outlineOnly = true; Button.drawingOutline = false; var drawnThisCycle = 0; var needsButtonChecks = bounds.Contains(GuiData.getMousePoint()); scrollerPanel.Draw((index, drawAreaFull, sprBatch) => { var destinationRectangle = new Rectangle(drawAreaFull.X, drawAreaFull.Y, drawAreaFull.Width - 12, drawAreaFull.Height); var myID = 115700 + index * 111; if (needsButtonChecks && Button.doButton(myID, destinationRectangle.X, destinationRectangle.Y, destinationRectangle.Width, destinationRectangle.Height, "", Color.Transparent)) { PurchaseUpgrade(index); } else if (!needsButtonChecks && GuiData.hot == myID) { GuiData.hot = -1; } var flag1 = upgradeCosts[index] <= (double)activeState.points; var flag2 = flag1 && GuiData.hot == myID; if (GuiData.hot == myID) { hoverIndex = index; } if (flag2) { var num1 = destinationRectangle.Height; var num2 = 0; var num3 = 0; if (drawAreaFull.X == 0 && drawAreaFull.Y == 0) { if (drawnThisCycle == 0) { num2 = bounds.X; num3 = bounds.Y; } else { num2 = bounds.X; num3 = bounds.Y + bounds.Height - panelHeight / 2; } } var rectangle = new Rectangle(num2 + destinationRectangle.X - num1, num3 + destinationRectangle.Y - num1, destinationRectangle.Width + 2 * num1, destinationRectangle.Height + 2 * num1); for (var index1 = 0; index1 < Stars.Count; ++index1) { DrawStar(rectangle, sb, Stars[index1]); } sb.Draw(scanlinesTextBackground, rectangle, ThemeColor * (GuiData.active == myID ? 0.6f : 0.3f)); } sprBatch.Draw(scanlinesTextBackground, destinationRectangle, new Rectangle(scanlinesTextBackground.Width / 2, scanlinesTextBackground.Height / 9 * 4, scanlinesTextBackground.Width / 2, scanlinesTextBackground.Height / 4), flag1 ? ThemeColor * 0.2f : Utils.AddativeWhite * 0.08f); if (GuiData.hot == myID) { RenderedRectangle.doRectangle(destinationRectangle.X + 1, destinationRectangle.Y + 1, destinationRectangle.Width - 2, destinationRectangle.Height - 2, flag2 ? (GuiData.active == myID ? Color.Black : ThemeColorBacking) : Color.Black); } if (index == 0) { Utils.drawLine(sprBatch, new Vector2(destinationRectangle.X + 1, destinationRectangle.Y + 1), new Vector2(destinationRectangle.X + destinationRectangle.Width - 2, destinationRectangle.Y + 1), Vector2.Zero, ThemeColor, 0.8f); } Utils.drawLine(sprBatch, new Vector2(destinationRectangle.X + 1, destinationRectangle.Y + destinationRectangle.Height - 2), new Vector2(destinationRectangle.X + destinationRectangle.Width - 2, destinationRectangle.Y + destinationRectangle.Height - 2), Vector2.Zero, ThemeColor, 0.8f); if (flag1) { sprBatch.Draw(Utils.white, new Rectangle(destinationRectangle.X, destinationRectangle.Y + 1, 8, destinationRectangle.Height - 2), ThemeColor); } var text = "[" + activeState.upgradeCounts[index].ToString("000") + "] " + upgradeNames[index]; TextItem.doFontLabel( new Vector2(destinationRectangle.X + 4 + (flag1 ? 10 : 0), destinationRectangle.Y + 4), text, GuiData.UISmallfont, flag2 ? (GuiData.active == myID ? ThemeColor : (flag1 ? Color.White : Color.Gray)) : (flag1 ? Utils.AddativeWhite : Color.Gray), destinationRectangle.Width - 6, float.MaxValue); ++drawnThisCycle; }, sb, bounds); Button.outlineOnly = false; Button.drawingOutline = true; }
public void DrawEntry(Rectangle bounds, SpriteBatch sb) { var num1 = 34; if (displayPanel == null) { displayPanel = new ScrollableSectionedPanel(26, sb.GraphicsDevice); } var drawCalls = new List <Action <int, Rectangle, SpriteBatch> >(); var rectangle1 = new Rectangle(bounds.X + 2, bounds.Y + 12, (int)(bounds.Width / 1.6) - 4, bounds.Height / 2); var allTextBounds = rectangle1; allTextBounds.Width += 2; allTextBounds.Y += num1; allTextBounds.Height = bounds.Height - num1 - 2 - 40 - 28; rectangle1.Height = logo.Height / logo.Width * rectangle1.Width; sb.Draw(logo, rectangle1, theme_deep * 0.4f); rectangle1.Height = num1; DrawMessage(currentRecord.Lastname + ", " + currentRecord.Firstname, true, sb, rectangle1, theme_light, theme_back); rectangle1.Y += num1; var num2 = 22; rectangle1.Height = num2; var lines = currentRecord.record.Split(Utils.newlineDelim); var separator = new string[5] { " :: ", ":: ", " ::", "::", "\n" }; var flag = false; for (var index1 = 0; index1 < lines.Length; ++index1) { var sections = Utils.SuperSmartTwimForWidth(lines[index1], rectangle1.Width - 12, GuiData.tinyfont) .Split(separator, StringSplitOptions.RemoveEmptyEntries); if (sections.Length > 1) { for (var index2 = 0; index2 < sections.Length; ++index2) { if (index2 == 0 && !flag) { if (sections[index2] == "Notes") { flag = true; } var secID = index2; drawCalls.Add((index, drawPos, sprBatch) => { var dest = drawPos; ++dest.Y; dest.Height -= 2; DrawMessage(sections[secID] + " :", false, sprBatch, dest, theme_deep, theme_light); }); rectangle1.Y += num2 + 2; } else if (sections[index2].Trim().Length > 0) { var subSecID = index2; drawCalls.Add((index, drawPos, sprBatch) => { var dest = drawPos; ++dest.Y; dest.Height -= 2; DrawMessage(sections[subSecID], false, sprBatch, dest); }); rectangle1.Y += num2 + 2; } } } else if (lines[index1].Trim().Length > 0) { var idx = index1; drawCalls.Add((index, drawPos, sprBatch) => { var rectangle2 = drawPos; ++rectangle2.Y; rectangle2.Height -= 2; DrawMessage(lines[idx], false, sprBatch, drawPos); }); rectangle1.Y += num2 + 2; } } drawCalls.Add((index, drawPos, sprBatch) => { var dest = drawPos; dest.Y += 2; dest.Height -= 4; DrawMessage(" ", false, sprBatch, dest); }); rectangle1.Y += num2 + 2; displayPanel.NumberOfPanels = drawCalls.Count; displayPanel.Draw((idx, rect, sprBatch) => { if ((drawCalls.Count + 1) * displayPanel.PanelHeight >= allTextBounds.Height) { rect.Width -= 10; } drawCalls[idx](idx, rect, sprBatch); }, sb, allTextBounds); rectangle1.Y += 2; if (Button.doButton(444402033, rectangle1.X, bounds.Y + bounds.Height - 26, rectangle1.Width, 24, "Back to menu", theme_strong)) { elapsedTimeThisState = 0.0f; state = MedicalDatabaseState.MainMenu; } if (Button.doButton(444402035, rectangle1.X, bounds.Y + bounds.Height - 26 - 2 - 26, rectangle1.Width, 24, "e-mail this record", theme_light)) { elapsedTimeThisState = 0.0f; state = MedicalDatabaseState.SendReport; } var dest1 = new Rectangle(rectangle1.X + rectangle1.Width + 2, bounds.Y + 34 + 12, (int)(bounds.Width / 6.5) - 2, bounds.Height - 4); var num3 = 33; var num4 = 22; dest1.Height = num3; DrawMessage("Age", true, sb, dest1); dest1.Y += dest1.Height + 2; var timeSpan = DateTime.Now - currentRecord.DOB; var num5 = (int)(timeSpan.Days / 365.0); DrawMessage(string.Concat(timeSpan.Days / 365), true, sb, dest1, Color.Transparent, theme_light); dest1.Y += dest1.Height; dest1.Height = num4; DrawMessage("Years", false, sb, dest1, Color.Transparent, theme_light); dest1.Y += dest1.Height + 2; dest1.Height = num3; DrawMessage(string.Concat(timeSpan.Days - num5 * 365), true, sb, dest1, Color.Transparent, theme_light); dest1.Y += dest1.Height; dest1.Height = num4; DrawMessage("Days", false, sb, dest1, Color.Transparent, theme_light); dest1.Y += dest1.Height + 2; dest1.Height = num3; DrawMessage(string.Concat(timeSpan.Hours), true, sb, dest1, Color.Transparent, theme_light); dest1.Y += dest1.Height; dest1.Height = num4; DrawMessage("Hours", false, sb, dest1, Color.Transparent, theme_light); dest1.Y += dest1.Height + 2; dest1.Height = num3; DrawMessage(string.Concat(timeSpan.Minutes), true, sb, dest1, Color.Transparent, theme_light); dest1.Y += dest1.Height; dest1.Height = num4; DrawMessage("Minutes", false, sb, dest1, Color.Transparent, theme_light); dest1.Y += dest1.Height + 2; dest1.Height = num3; DrawMessage(string.Concat(timeSpan.Seconds), true, sb, dest1, Color.Transparent, theme_light); dest1.Y += dest1.Height; dest1.Height = num4; DrawMessage("Seconds", false, sb, dest1, Color.Transparent, theme_light); dest1.Y += dest1.Height + 2; dest1.Height = num3; }