public virtual void doInboxHeader(Rectangle bounds, SpriteBatch sb) { Vector2 vector2_1 = new Vector2((float)(bounds.X + 2), (float)(bounds.Y + 20)); string text = string.Format(LocaleTerms.Loc("Logged in as {0}"), (object)this.user.name); sb.DrawString(GuiData.font, text, vector2_1, this.textColor); vector2_1.Y += 26f; if (Button.doButton(800007, bounds.X + bounds.Width - 95, (int)vector2_1.Y, 90, 30, LocaleTerms.Loc("Logout"), new Color?(this.themeColor))) { this.state = 0; } if (this.totalPagesDetected <= 0) { return; } int width = 100; int height = 20; vector2_1.Y = (float)(bounds.Y + 91 - (height + 4)); if (this.inboxPage < this.totalPagesDetected && Button.doButton(801008, (int)vector2_1.X, (int)vector2_1.Y, width, height, "<", new Color?())) { ++this.inboxPage; } vector2_1.X += (float)(width + 2); Vector2 vector2_2 = TextItem.doMeasuredFontLabel(vector2_1, (this.inboxPage + 1).ToString() + " / " + (object)(this.totalPagesDetected + 1), GuiData.tinyfont, new Color?(Utils.AddativeWhite), float.MaxValue, float.MaxValue); vector2_1.X += vector2_2.X + 4f; if (this.inboxPage > 0 && Button.doButton(801009, (int)vector2_1.X, (int)vector2_1.Y, width, height, ">", new Color?())) { --this.inboxPage; } }
public virtual void doInboxHeader(Rectangle bounds, SpriteBatch sb) { var vector2_1 = new Vector2(bounds.X + 2, bounds.Y + 20); sb.DrawString(GuiData.font, "Logged in as " + user.name, vector2_1, textColor); vector2_1.Y += 26f; if (Button.doButton(800007, bounds.X + bounds.Width - 85, (int)vector2_1.Y, 80, 30, "Logout", themeColor)) { state = 0; } if (totalPagesDetected <= 0) { return; } var width = 100; var height = 20; vector2_1.Y = bounds.Y + 91 - (height + 4); if (inboxPage < totalPagesDetected && Button.doButton(801008, (int)vector2_1.X, (int)vector2_1.Y, width, height, "<", new Color?())) { ++inboxPage; } vector2_1.X += width + 2; var vector2_2 = TextItem.doMeasuredFontLabel(vector2_1, (inboxPage + 1).ToString() + " / " + (totalPagesDetected + 1), GuiData.tinyfont, Utils.AddativeWhite, float.MaxValue, float.MaxValue); vector2_1.X += vector2_2.X + 4f; if (inboxPage <= 0 || !Button.doButton(801009, (int)vector2_1.X, (int)vector2_1.Y, width, height, ">", new Color?())) { return; } --inboxPage; }
public override void draw(Rectangle bounds, SpriteBatch sb) { base.draw(bounds, sb); this.drawBackground(bounds, sb); int num1 = bounds.X + 10; int num2 = bounds.Y + 10; TextItem.doFontLabel(new Vector2((float)num1, (float)num2), this.name, GuiData.font, new Color?(), (float)(bounds.Width - 20), (float)bounds.Height, false); int num3 = num2 + ((int)GuiData.font.MeasureString(this.name).Y + 2); string text = "Error: System.IO.FileNotFoundException went unhandled\n" + "File Server_Message.txt not found\n" + "at UploadDaemonCore.RenderModule.HelptextDisplay.cs\nline 107 position 95"; FileEntry fileEntry = this.root.searchForFile("Server_Message.txt"); if (fileEntry != null) { text = fileEntry.data; } Vector2 vector2 = TextItem.doMeasuredFontLabel(new Vector2((float)num1, (float)num3), text, GuiData.tinyfont, new Color?(), float.MaxValue, float.MaxValue); if (!this.hasReturnViewButton || !Button.doButton(50821549, num1 - 2, (int)((double)num3 + (double)vector2.Y + 8.0), bounds.Width / 3, 26, "Exit Upload View", new Color?(this.themeColor))) { return; } this.os.display.command = "connect"; }
private void RenderResultsDisplayMainState(Rectangle dest, SpriteBatch sb, bool isProcessing) { Color color = new Color(5, 5, 5, 230); Rectangle rectangle1 = new Rectangle(dest.X + 22, dest.Y + 30, dest.Width - 44, 40); sb.Draw(Utils.white, rectangle1, color); rectangle1.X += 10; TextItem.doFontLabelToSize(rectangle1, isProcessing ? LocaleTerms.Loc("PROCESSING") : LocaleTerms.Loc("OUTPUT"), GuiData.font, Color.White, true, true); rectangle1.X -= 10; int width = 200; int height = 30; if (Button.doButton(381023909, rectangle1.X + rectangle1.Width - (width + 6), rectangle1.Y + (rectangle1.Height / 2 - height / 2), width, height, isProcessing ? LocaleTerms.Loc("Cancel") : LocaleTerms.Loc("Return to Menu"), new Color?(Color.White))) { this.State = MemoryForensicsExe.MemForensicsState.Main; this.timeInCurrentState = 0.0f; } rectangle1.Y += rectangle1.Height; rectangle1.Height = 1; sb.Draw(Utils.white, rectangle1, Color.White); if (isProcessing) { Rectangle destinationRectangle = new Rectangle(dest.X + 2, rectangle1.Y + rectangle1.Height + 2, dest.Width - 4, 20); sb.Draw(Utils.white, destinationRectangle, Color.Black); float num = this.timeInCurrentState / this.processingTimeThisBatch; destinationRectangle.Width = (int)((double)destinationRectangle.Width * (double)num); sb.Draw(Utils.white, destinationRectangle, Utils.makeColorAddative(Color.LightBlue)); } else { Rectangle rectangle2 = new Rectangle(rectangle1.X, rectangle1.Y + rectangle1.Height + 2, rectangle1.Width, 1); rectangle2.Height = dest.Y + dest.Height - (rectangle1.Y + rectangle1.Height + 4); sb.Draw(Utils.white, rectangle2, color); if (this.OutputData.Count <= 0) { TextItem.doFontLabelToSize(rectangle2, " - " + LocaleTerms.Loc("No Valid Matches Found") + " - ", GuiData.smallfont, Color.White, true, false); } else { Rectangle drawbounds = new Rectangle(0, 0, rectangle2.Width, rectangle2.Height); float num1 = 10f; for (int index = 0; index < this.OutputData.Count; ++index) { if (this.IsDisplayingImages) { if (this.OutputTextures.Count >= index) { num1 += (float)(Math.Min(drawbounds.Width - 16, this.OutputTextures[index].Height) + 30); } else { break; } } else { num1 += 26f + GuiData.smallfont.MeasureString(Utils.SuperSmartTwimForWidth(this.OutputData[index], drawbounds.Width - 16, GuiData.smallfont)).Y; } } drawbounds.Height = (int)num1; ScrollablePanel.beginPanel(3371001, drawbounds, this.PanelScroll); Vector2 pos = new Vector2((float)(drawbounds.X + 14), (float)drawbounds.Y); TextItem.doMeasuredFontLabel(pos, this.AnnouncementData, GuiData.tinyfont, new Color?(Color.White), float.MaxValue, float.MaxValue); pos.Y += 20f; Rectangle destinationRectangle1 = new Rectangle(drawbounds.X, (int)pos.Y, drawbounds.Width, 1); GuiData.spriteBatch.Draw(Utils.white, destinationRectangle1, Color.White); pos.Y += 20f; for (int index = 0; index < this.OutputData.Count; ++index) { if (this.IsDisplayingImages) { if (this.OutputTextures.Count >= index) { Rectangle dest1 = new Rectangle((int)pos.X + 8, (int)pos.Y, drawbounds.Width - 16, drawbounds.Width - 16); dest1.Height = Math.Min(dest1.Height, this.OutputTextures[index].Height); Rectangle rectangle3 = Utils.DrawSpriteAspectCorrect(dest1, GuiData.spriteBatch, this.OutputTextures[index], Color.White, false); float num2 = (float)(rectangle3.Y - dest1.Y + rectangle3.Height); pos.Y += num2 + 12f; } else { break; } } else { string text = Utils.SuperSmartTwimForWidth(this.OutputData[index], drawbounds.Width - 16, GuiData.smallfont); Vector2 vector2 = TextItem.doMeasuredFontLabel(pos, text, GuiData.smallfont, new Color?(Color.White * 0.9f), float.MaxValue, float.MaxValue); Rectangle destinationRectangle2 = new Rectangle(drawbounds.X + 6, (int)pos.Y + (int)(((double)vector2.Y - 3.0) / 2.0), 3, 3); GuiData.spriteBatch.Draw(Utils.white, destinationRectangle2, Color.Gray); pos.Y += vector2.Y + 6f; } destinationRectangle1 = new Rectangle(drawbounds.X, (int)pos.Y, rectangle2.Width, 1); GuiData.spriteBatch.Draw(Utils.white, destinationRectangle1, Color.Gray); pos.Y += 10f; } this.PanelScroll = ScrollablePanel.endPanel(3371001, this.PanelScroll, rectangle2, 2000f, false); float num3 = num1 - (float)rectangle2.Height; if ((double)this.PanelScroll.Y > (double)num3) { this.PanelScroll.Y = num3; } } } }