示例#1
0
        private void DrawRecord(Rectangle bounds, SpriteBatch sb, DeathRowEntry entry)
        {
            bounds.X     += 2;
            bounds.Width -= 2;
            var flag = TextItem.DrawShadow;

            TextItem.DrawShadow = false;
            var height = 850;

            ScrollablePanel.beginPanel(98302836, new Rectangle(bounds.X, bounds.Y, bounds.Width, height),
                                       recordScrollPosition);
            var num1      = bounds.Width - 16;
            var vector2_1 = new Vector2(5f, 5f);

            GuiData.spriteBatch.Draw(Logo, new Rectangle((int)vector2_1.X, (int)vector2_1.Y, 60, 60), Color.White);
            vector2_1.X += 70f;
            TextItem.doFontLabel(vector2_1, "DEATH ROW : EXECUTED OFFENDERS LISTING", GuiData.titlefont, themeColor,
                                 num1 - 80, 45f);
            vector2_1.Y += 22f;
            if (Button.doButton(98102855, (int)vector2_1.X, (int)vector2_1.Y, bounds.Width / 2, 25, "Return",
                                Color.Black))
            {
                SelectedIndex = -1;
            }
            vector2_1.X  = 5f;
            vector2_1.Y += 55f;
            TextItem.doFontLabel(vector2_1, "RECORD " + entry.RecordNumber, GuiData.titlefont, Color.White, num1 - 4,
                                 60f);
            vector2_1.Y += 70f;
            var seperatorHeight = 18;
            var margin          = 12;
            var drawPos         = DrawCompactLabel("Name:", entry.LName + ", " + entry.FName, vector2_1, margin, seperatorHeight,
                                                   num1);
            var pos  = DrawCompactLabel("Age:", entry.Age, drawPos, margin, seperatorHeight, num1);
            var num2 = 20;
            var num3 = 20;
            var zero = Vector2.Zero;

            TextItem.doFontLabel(pos, "Incident Report:", GuiData.smallfont, themeColor, num1, float.MaxValue);
            pos.Y += num2;
            TextItem.DrawShadow = false;
            var vector2_2 = TextItem.doMeasuredSmallLabel(pos,
                                                          Utils.SmartTwimForWidth(entry.IncidentReport, num1, GuiData.smallfont), Color.White);

            pos.Y += Math.Max(vector2_2.Y, num2);
            pos.Y += num3;
            TextItem.doFontLabel(pos, "Final Statement:", GuiData.smallfont, themeColor, num1, float.MaxValue);
            pos.Y    += num2;
            vector2_2 = TextItem.doMeasuredSmallLabel(pos,
                                                      Utils.SmartTwimForWidth(entry.Statement, num1, GuiData.smallfont), Color.White);
            pos.Y += num3;
            recordScrollPosition = ScrollablePanel.endPanel(98302836, recordScrollPosition, bounds,
                                                            height - bounds.Height, true);
            TextItem.DrawShadow = flag;
        }
示例#2
0
 private void docatDisplay()
 {
     if (os.hasConnectionPermission(false))
     {
         if (Button.doButton(299999, bounds.X + (bounds.Width - 41), bounds.Y + 12, 27, 29, "<-", new Color?()))
         {
             os.runCommand("ls");
         }
         var rectangle = GuiData.tmpRect;
         rectangle.Width   = bounds.Width;
         rectangle.X       = bounds.X;
         rectangle.Y       = bounds.Y + 1;
         rectangle.Height  = bounds.Height - 2;
         rectangle.Height += bounds.Height;
         ScrollablePanel.beginPanel(484732, rectangle, catScroll);
         var text1 = "";
         for (var index = 1; index < commandArgs.Length; ++index)
         {
             text1 = text1 + commandArgs[index] + " ";
         }
         x = 10;
         y = 5;
         try
         {
             TextItem.doFontLabel(new Vector2(x - 5, y - 1), text1, GuiData.font, Color.White, bounds.Width - 70,
                                  float.MaxValue);
             var data = os.displayCache;
             if (data.Length > 6000)
             {
                 data = data.Substring(0, 6000) + "\n -- FILE TOO LONG TO DISPLAY -- ";
             }
             y += 70;
             var text2 = Utils.SuperSmartTwimForWidth(data, bounds.Width - 40, GuiData.tinyfont);
             GuiData.spriteBatch.DrawString(GuiData.tinyfont, text2, new Vector2(x, y), Color.White);
         }
         catch (Exception ex)
         {
             commandArgs    = new string[3];
             commandArgs[0] = "cat";
             commandArgs[1] = "Error";
             commandArgs[2] = "Error reading file";
             command        = "cat error error reading file";
         }
         rectangle.Height -= bounds.Height;
         catScroll         = ScrollablePanel.endPanel(484732, catScroll, rectangle, 1000f, false);
     }
     else
     {
         command = "connect";
     }
 }
        private void DrawRecord(Rectangle bounds, SpriteBatch sb, DeathRowDatabaseDaemon.DeathRowEntry entry)
        {
            bounds.X     += 2;
            bounds.Width -= 2;
            bool drawShadow = TextItem.DrawShadow;

            TextItem.DrawShadow = false;
            int height = 850;

            ScrollablePanel.beginPanel(98302836, new Rectangle(bounds.X, bounds.Y, bounds.Width, height), this.recordScrollPosition);
            int     num1      = bounds.Width - 16;
            Vector2 vector2_1 = new Vector2(5f, 5f);

            GuiData.spriteBatch.Draw(DeathRowDatabaseDaemon.Logo, new Rectangle((int)vector2_1.X, (int)vector2_1.Y, 60, 60), Color.White);
            vector2_1.X += 70f;
            TextItem.doFontLabel(vector2_1, "DEATH ROW : EXECUTED OFFENDERS LISTING", GuiData.titlefont, new Color?(this.themeColor), (float)(num1 - 80), 45f, false);
            vector2_1.Y += 22f;
            if (Button.doButton(98102855, (int)vector2_1.X, (int)vector2_1.Y, bounds.Width / 2, 25, "Return", new Color?(Color.Black)))
            {
                this.SelectedIndex = -1;
            }
            vector2_1.X  = 5f;
            vector2_1.Y += 55f;
            TextItem.doFontLabel(vector2_1, "RECORD " + entry.RecordNumber, GuiData.titlefont, new Color?(Color.White), (float)(num1 - 4), 60f, false);
            vector2_1.Y += 70f;
            int seperatorHeight = 18;
            int margin          = 12;

            vector2_1 = this.DrawCompactLabel(LocaleTerms.Loc("Name") + ":", entry.LName + ", " + entry.FName, vector2_1, margin, seperatorHeight, num1);
            vector2_1 = this.DrawCompactLabel(LocaleTerms.Loc("Age") + ":", entry.Age, vector2_1, margin, seperatorHeight, num1);
            int     num2      = 20;
            int     num3      = 20;
            Vector2 vector2_2 = Vector2.Zero;

            TextItem.doFontLabel(vector2_1, LocaleTerms.Loc("Incident Report") + ":", GuiData.smallfont, new Color?(this.themeColor), (float)num1, float.MaxValue, false);
            vector2_1.Y        += (float)num2;
            TextItem.DrawShadow = false;
            Vector2 vector2_3 = TextItem.doMeasuredSmallLabel(vector2_1, Utils.SmartTwimForWidth(entry.IncidentReport, num1, GuiData.smallfont), new Color?(Color.White));

            vector2_1.Y += Math.Max(vector2_3.Y, (float)num2);
            vector2_1.Y += (float)num3;
            TextItem.doFontLabel(vector2_1, LocaleTerms.Loc("Final Statement") + ":", GuiData.smallfont, new Color?(this.themeColor), (float)num1, float.MaxValue, false);
            vector2_1.Y += (float)num2;
            vector2_2    = TextItem.doMeasuredSmallLabel(vector2_1, Utils.SmartTwimForWidth(entry.Statement, num1, GuiData.smallfont), new Color?(Color.White));
            vector2_1.Y += (float)num3;
            this.recordScrollPosition = ScrollablePanel.endPanel(98302836, this.recordScrollPosition, bounds, (float)(height - bounds.Height), true);
            TextItem.DrawShadow       = drawShadow;
        }
示例#4
0
        private void DrawFullThreadView(SpriteBatch sb, MessageBoardThread thread, Rectangle dest)
        {
            var rectangle = dest;

            rectangle.Height = CurrentThreadHeight + 50;
            var flag = CurrentThreadHeight > dest.Height;

            if (flag)
            {
                ScrollablePanel.beginPanel(1931655001, rectangle, ThreadScrollPosition);
                rectangle.X = rectangle.Y = 0;
            }
            DrawThread(thread, GuiData.spriteBatch, rectangle, false);
            if (!flag)
            {
                return;
            }
            float maxScroll = Math.Max(dest.Height, CurrentThreadHeight - dest.Height);

            ThreadScrollPosition = ScrollablePanel.endPanel(1931655001, ThreadScrollPosition, dest, maxScroll, false);
        }
示例#5
0
        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;
                    }
                }
            }
        }