Beispiel #1
0
        protected override void Compile()
        {
            base.Compile();

            if (Selected == null)
            {
                return;
            }

            Html = String.Format("<basefont color=#{0:X6}>", HtmlColor.ToArgb());

            if (HistoryDate != null && HistoryDate.Value <= DateTime.UtcNow)
            {
                Html += String.Format(
                    "Viewing History for {0} on {1}\n\n",
                    Selected.Owner.RawName,
                    HistoryDate.Value.ToSimpleString(Voting.CMOptions.DateFormat));

                Html += String.Format("<big>Showing up to 500 entries...</big>\n\n");

                Html += String.Join("\n", Selected.GetHistory(HistoryDate.Value, 500).Select(e => e.ToHtmlString(TechnicalView)));
            }
            else
            {
                Html += String.Format("Viewing Recent History for {0}\n\n", Selected.Owner.RawName);

                Html += String.Format("<big>Showing up to 500 entries...</big>\n\n");

                Html += String.Join("\n", Selected.GetHistory(500).Select(e => e.ToHtmlString(TechnicalView)));
            }
        }
Beispiel #2
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            Width  = Math.Max(300, Math.Min(1024, Width));
            Height = Math.Max(200, Math.Min(786, Height));

            layout.Add(
                "background/header/base",
                () =>
            {
                AddBackground(0, 0, Width, 50, 9270);
                AddImageTiled(10, 10, Width - 20, 30, 2624);
                //AddAlphaRegion(10, 10, Width - 20, 30);
            });

            layout.Add("label/header/title", () => AddLabelCropped(20, 15, Width - 40, 20, TextHue, Title));

            layout.Add(
                "background/body/base",
                () =>
            {
                AddBackground(0, 50, Width, Height - 50, 9270);
                AddImageTiled(10, 60, Width - 20, Height - 70, 2624);
                //AddAlphaRegion(10, 60, Width - 20, Height - 70);
            });

            layout.Add("image/body/icon", () => AddImage(20, 70, Icon));

            layout.Add(
                "html/body/info",
                () =>
                AddHtml(
                    100,
                    70,
                    Width - 120,
                    Height - 130,
                    String.Format("<BIG><BASEFONT COLOR=#{0:X6}>{1}</BIG>", HtmlColor.ToArgb(), Html),
                    HtmlBackground,
                    true));

            layout.Add(
                "button/body/cancel",
                () =>
            {
                AddButton(Width - 90, Height - 45, 4018, 4019, OnCancel);
                AddTooltip(1006045);
            });

            layout.Add(
                "button/body/accept",
                () =>
            {
                AddButton(Width - 50, Height - 45, 4015, 4016, OnAccept);
                AddTooltip(1006044);
            });
        }
Beispiel #3
0
        protected override void Compile()
        {
            base.Compile();

            if (Selected == null || Selected.Deleted)
            {
                Selected = TrashCollection.EnsureProfile(User, true);
            }

            Html  = String.Format("<basefont color=#{0:X6}>", HtmlColor.ToArgb());
            Html += Selected.ToHtmlString(User);
        }
Beispiel #4
0
        protected override void Compile()
        {
            base.Compile();

            if (Selected == null || Selected.Deleted)
            {
                Selected = Voting.EnsureProfile(User as PlayerMobile, true);
            }

            Html = String.Format("<basefont color=#{0:X6}>", HtmlColor.ToArgb());

            if (Selected != null)
            {
                Html += Selected.ToHtmlString(User);
            }
        }