Пример #1
0
 public static void Open()
 {
     if (Gumps.FindGumpByGUID("Info Browser") == null)
     {
         Gumps.Desktop.Children.Add(new GInfoForm());
     }
 }
Пример #2
0
        public GCharacterProfile(Mobile owner, string header, string body, string footer)
            : base(5058, 100, 100, 25, 25, true)
        {
            string GUID       = string.Format("Profile-{0}", (object)owner.Serial);
            Gump   gumpByGuid = Gumps.FindGumpByGUID(GUID);

            if (gumpByGuid != null)
            {
                this.m_IsDragging = gumpByGuid.m_IsDragging;
                this.m_OffsetX    = gumpByGuid.m_OffsetX;
                this.m_OffsetY    = gumpByGuid.m_OffsetY;
                if (Gumps.Drag == gumpByGuid)
                {
                    Gumps.Drag = (Gump)this;
                }
                if (Gumps.LastOver == gumpByGuid)
                {
                    Gumps.LastOver = (Gump)this;
                }
                if (Gumps.Focus == gumpByGuid)
                {
                    Gumps.Focus = (Gump)this;
                }
                this.m_X = gumpByGuid.X;
                this.m_Y = gumpByGuid.Y;
                Gumps.Destroy(gumpByGuid);
            }
            this.m_GUID      = GUID;
            this.m_CanDrag   = true;
            this.m_QuickDrag = true;
            this.CanClose    = true;
            Gump label1 = this.CreateLabel(header, false);
            Gump label2 = this.CreateLabel(body, true);
            Gump label3 = this.CreateLabel(footer, false);

            label1.X    = this.OffsetX;
            label1.Y    = this.OffsetY;
            label2.X    = label1.X;
            label2.Y    = label1.Y + label1.Height;
            label3.X    = label2.X;
            label3.Y    = label2.Y + label2.Height;
            this.Height = this.Height - this.UseHeight + label1.Height + label2.Height + label3.Height;
            this.Width  = label1.Width;
            if (label2.Width > this.Width)
            {
                this.Width = label2.Width;
            }
            if (label3.Width > this.Width)
            {
                this.Width = label3.Width;
            }
            this.Width += this.Width - this.UseWidth;
            this.m_Children.Add(label1);
            this.m_Children.Add(label2);
            this.m_Children.Add(label3);
        }
Пример #3
0
        public GCharacterProfile(Mobile owner, string header, string body, string footer) : base(0x13c2, 100, 100, 0x19, 0x19, true)
        {
            string gUID = string.Format("Profile-{0}", owner.Serial);
            Gump   g    = Gumps.FindGumpByGUID(gUID);

            if (g != null)
            {
                base.m_IsDragging = g.m_IsDragging;
                base.m_OffsetX    = g.m_OffsetX;
                base.m_OffsetY    = g.m_OffsetY;
                if (Gumps.Drag == g)
                {
                    Gumps.Drag = this;
                }
                if (Gumps.LastOver == g)
                {
                    Gumps.LastOver = this;
                }
                if (Gumps.Focus == g)
                {
                    Gumps.Focus = this;
                }
                base.m_X = g.X;
                base.m_Y = g.Y;
                Gumps.Destroy(g);
            }
            base.m_GUID      = gUID;
            base.m_CanDrag   = true;
            base.m_QuickDrag = true;
            base.CanClose    = true;
            Gump toAdd = this.CreateLabel(header, false);
            Gump gump3 = this.CreateLabel(body, true);
            Gump gump4 = this.CreateLabel(footer, false);

            toAdd.X     = base.OffsetX;
            toAdd.Y     = base.OffsetY;
            gump3.X     = toAdd.X;
            gump3.Y     = toAdd.Y + toAdd.Height;
            gump4.X     = gump3.X;
            gump4.Y     = gump3.Y + gump3.Height;
            this.Height = (((this.Height - base.UseHeight) + toAdd.Height) + gump3.Height) + gump4.Height;
            this.Width  = toAdd.Width;
            if (gump3.Width > this.Width)
            {
                this.Width = gump3.Width;
            }
            if (gump4.Width > this.Width)
            {
                this.Width = gump4.Width;
            }
            this.Width += this.Width - base.UseWidth;
            base.m_Children.Add(toAdd);
            base.m_Children.Add(gump3);
            base.m_Children.Add(gump4);
        }