Example #1
0
        private void BuildDetailsLayout()
        {
            Account a = Selected;

            int y = 100;

            AddHtml(270, y, 200, 16, Color("#FFD700", "Account:"), false, false);
            AddHtml(420, y, 200, 16, Color("#FFFFFF", a.Username + String.Format("{0}", a.Banned ? "<basefont color=red> [Banned]" : a.Inactive ? "<basefond color=red> [Inactive]" : "<basefont color=green> [Active]")), false, false);
            y += 20;
            AddHtml(270, y, 200, 16, Color("#FFD700", "Created:"), false, false);
            AddHtml(420, y, 200, 16, Color("#FFFFFF", a.Created.ToShortDateString()), false, false);
            y += 20;
            AddHtml(270, y, 200, 16, Color("#FFD700", "Total Game Time:"), false, false);
            AddHtml(420, y, 200, 16, Color("#FFFFFF", AdminGump.FormatTimeSpan(a.TotalGameTime)), false, false);
            y += 20;
            AddHtml(270, y, 200, 16, Color("#FFD700", "Characters:"), false, false);

            y += 20;
            bool accountGold = AccountGold.Enabled;

            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] == null)
                {
                    continue;
                }

                string hue = SearchBy == SearchCriteria.CharacterName && CompareStrings(TextInput, a[i].Name) ? "#FFD700" : "#FFFFFF";

                if (accountGold)
                {
                    AddButton(i % 2 == 0 ? 272 : 427, y + 2, 2086, 2086, 100 + i, GumpButtonType.Reply, 0);
                }

                if (i % 2 == 0)
                {
                    AddLabelCropped(290, y, 150, 20, 986, a[i].Name);
                }
                else
                {
                    AddLabelCropped(445, y, 150, 20, 986, a[i].Name);
                    y += 20;
                }
            }

            y += 30;

            if (accountGold)
            {
                AddHtml(270, y, 200, 16, Color("#FFD700", "Account Gold:"), false, false);
                AddHtml(450, y, 200, 16, Color("#FFFFFF", String.Format("{0:#,0}", a.TotalGold.ToString("N0", CultureInfo.GetCultureInfo("en-US")))), false, false);
                y += 22;
                AddButton(270, y, 4014, 4015, 6, GumpButtonType.Reply, 0);
                AddImageTiled(305, y, 100, 20, 9254);
                AddTextEntry(307, y, 98, 20, 0, 2, "Set Gold");
                y += 22;
                AddHtml(270, y, 200, 16, Color("#FFD700", "Account Platinum:"), false, false);
                AddHtml(450, y, 200, 16, Color("#FFFFFF", String.Format("{0:#,0}", a.TotalPlat.ToString("N0", CultureInfo.GetCultureInfo("en-US")))), false, false);
                y += 22;
                AddButton(270, y, 4014, 4015, 7, GumpButtonType.Reply, 0);
                AddImageTiled(305, y, 100, 20, 9254);
                AddTextEntry(307, y, 98, 20, 0, 3, "Set Plat");

                if (Player != null && Player.Account == Selected)
                {
                    y += 22;
                    AddHtml(270, y, 180, 16, Color("#FFD700", String.Format("{0}'s Secure Account:", Player.Name)), false, false);
                    AddHtml(450, y, 200, 16, Color("#FFFFFF", String.Format("{0:#,0}", a.GetSecureAccountAmount(Player).ToString("N0", CultureInfo.GetCultureInfo("en-US")))), false, false);
                    y += 22;
                    AddButton(270, y, 4014, 4015, 8, GumpButtonType.Reply, 0);
                    AddImageTiled(305, y, 100, 20, 9254);
                    AddTextEntry(307, y, 98, 20, 0, 4, "Set Secure");
                }
            }

            if (User.AccessLevel >= AccessLevel.Administrator)
            {
                AddHtml(303, 411, 150, 16, Color("#FFD700", "Admin Page"), false, false);
                AddButton(270, 411, 4005, 4006, 5, GumpButtonType.Reply, 0);
            }
        }
Example #2
0
        public static void Processar()
        {
            string tempoOnline = AdminGump.FormatTimeSpan(DateTime.Now - Clock.ServerStart);

            ControladorODBC.ODBCProcessarStatusServidor(tempoOnline);
        }