Beispiel #1
0
        private Packet Compile()
        {
            if (m_Packet == null)
            {
                DisplayGumpFast disp = new DisplayGumpFast(this);

                if (!m_Dragable)
                {
                    disp.AppendLayout(m_NoMove);
                }

                if (!m_Closable)
                {
                    disp.AppendLayout(m_NoClose);
                }

                if (!m_Disposable)
                {
                    disp.AppendLayout(m_NoDispose);
                }

                if (!m_Resizable)
                {
                    disp.AppendLayout(m_NoResize);
                }

                int       count = m_Entries.Count;
                GumpEntry e;

                for (int i = 0; i < count; ++i)
                {
                    e = (GumpEntry)m_Entries[i];

                    disp.AppendLayout(m_BeginLayout);
                    e.AppendTo(disp);
                    disp.AppendLayout(m_EndLayout);
                }

                disp.WriteText(m_Strings);

                m_TextEntries = disp.TextEntries;
                m_Switches    = disp.Switches;

                m_Packet = disp;
            }

            return(m_Packet);
        }
Beispiel #2
0
        private Packet Compile()
        {
            DisplayGumpFast fast1;
            int             num1;
            GumpEntry       entry1;
            int             num2;

            if (this.m_Packet == null)
            {
                fast1 = new DisplayGumpFast(this);
                if (!this.m_Dragable)
                {
                    fast1.AppendLayout(Gump.m_NoMove);
                }
                if (!this.m_Closable)
                {
                    fast1.AppendLayout(Gump.m_NoClose);
                }
                if (!this.m_Disposable)
                {
                    fast1.AppendLayout(Gump.m_NoDispose);
                }
                if (!this.m_Resizable)
                {
                    fast1.AppendLayout(Gump.m_NoResize);
                }
                num1 = this.m_Entries.Count;
                for (num2 = 0; (num2 < num1); ++num2)
                {
                    entry1 = ((GumpEntry)this.m_Entries[num2]);
                    fast1.AppendLayout(Gump.m_BeginLayout);
                    entry1.AppendTo(fast1);
                    fast1.AppendLayout(Gump.m_EndLayout);
                }
                fast1.WriteText(this.m_Strings);
                this.m_Packet = fast1;
            }
            return(this.m_Packet);
        }