Exemple #1
0
 public GServerButton(GServerGump owner, LayoutEntry le) : base(le[2], le[2], le[3], le[0], le[1])
 {
     this.m_Owner   = owner;
     this.m_Type    = le[4];
     this.m_Param   = le[5];
     this.m_RelayID = le[6];
 }
Exemple #2
0
 public GServerButton(GServerGump owner, LayoutEntry le)
     : base(le[2], le[2], le[3], le[0], le[1])
 {
     this.m_Owner = owner;
     this.m_Type = le[4];
     this.m_Param = le[5];
     this.m_RelayID = le[6];
 }
Exemple #3
0
        private void ProcessLayout(LayoutEntry[] list, string[] text)
        {
            int  page = 0;
            int  num2 = 0;
            bool flag = false;

            for (int i = 0; i < list.Length; i++)
            {
                string      str;
                IHue        hue;
                int         num5;
                string      str3;
                int         num6;
                IFont       uniFont;
                GLabel      label;
                object      obj2;
                LayoutEntry le = list[i];
                if (((obj2 = le.Name) != null) && ((obj2 = < PrivateImplementationDetails >.$$method0x60000f4 - 1[obj2]) != null))
                {
                    switch (((int)obj2))
                    {
                    case 0:
                    case 1:
                    {
                        continue;
                    }

                    case 2:
                        goto Label_020B;

                    case 3:
                        goto Label_0243;

                    case 4:
                    {
                        this.m_CanClose = false;
                        continue;
                    }

                    case 5:
                    {
                        this.m_CanMove = false;
                        continue;
                    }

                    case 6:
                    {
                        this.Pages(page).Add(new GServerBackground(this, le[0], le[1], le[3], le[4], le[2] + 4, true));
                        continue;
                    }

                    case 7:
                    {
                        this.Pages(page).Add(new GServerBackground(this, le[0], le[1], le[2], le[3], le[4], false));
                        continue;
                    }

                    case 8:
                        goto Label_0301;

                    case 9:
                    {
                        this.Pages(page).Add(new GServerTextBox(text[le[6]], le));
                        continue;
                    }

                    case 10:
                    {
                        this.Pages(page).Add(new GItemArt(le[0], le[1], le[2]));
                        continue;
                    }

                    case 11:
                    {
                        this.Pages(page).Add(new GServerButton(this, le));
                        continue;
                    }

                    case 12:
                    {
                        this.Pages(page).Add(new GServerRadio(this, le));
                        continue;
                    }

                    case 13:
                    {
                        this.Pages(page).Add(new GServerCheckBox(this, le));
                        continue;
                    }

                    case 14:
                    {
                        int num4 = le[2];
                        this.Pages(page).Add(new GLabel(text[le[3]], Engine.GetUniFont(1), Hues.Load(num4 + 1), le[0] - 1, le[1]));
                        continue;
                    }

                    case 15:
                        num5    = le[4];
                        str3    = text[le[5]];
                        num6    = le[2];
                        uniFont = Engine.GetUniFont(1);
                        if (uniFont.GetStringWidth(str3) <= num6)
                        {
                            goto Label_051A;
                        }
                        goto Label_04EB;

                    case 0x10:
                    {
                        this.ProcessHtmlGump(page, le[0], le[1], le[2], le[3], Localization.GetString(le[4]), le[5] != 0, le[6] != 0, ((le[5] == 0) && (le[6] != 0)) ? 0xffffff : 0);
                        continue;
                    }

                    case 0x11:
                    {
                        this.ProcessHtmlGump(page, le[0], le[1], le[2], le[3], Localization.GetString(le[4]), le[5] != 0, le[6] != 0, Engine.C16232(le[7]));
                        continue;
                    }

                    case 0x12:
                    {
                        this.ProcessHtmlGump(page, le[0], le[1], le[2], le[3], text[le[4]], le[5] != 0, le[6] != 0, ((le[5] == 0) && (le[6] != 0)) ? 0xffffff : 0);
                        continue;
                    }
                    }
                }
                goto Label_06A2;
Label_020B:
                this.Pages(page).Add(new GTransparentRegion(this, le[0], le[1], le[2], le[3]));
                continue;
Label_0243:
                page = le[0];
                if (page == 0)
                {
                    flag = false;
                    num2 = 0;
                }
                else if (!flag || (page < num2))
                {
                    num2 = page;
                    flag = true;
                }
                continue;
Label_0301:
                str = le.GetAttribute("hue");
                if (str != null)
                {
                    try
                    {
                        hue = Hues.Load(Convert.ToInt32(str) + 1);
                    }
                    catch
                    {
                        hue = Hues.Default;
                    }
                }
                else
                {
                    hue = Hues.Default;
                }
                if (le.GetAttribute("class") == "VirtueGumpItem")
                {
                    this.Pages(page).Add(new GVirtueItem(this, le[0], le[1], le[2], hue));
                }
                else
                {
                    this.Pages(page).Add(new GServerImage(this, le[0], le[1], le[2], hue));
                }
                continue;
Label_04D8:
                str3 = str3.Substring(0, str3.Length - 1);
Label_04EB:
                if ((str3.Length > 0) && (uniFont.GetStringWidth(str3 + "...") > num6))
                {
                    goto Label_04D8;
                }
                str3 = str3 + "...";
Label_051A:
                label = new GLabel(str3, uniFont, Hues.Load(num5 + 1), le[0] - 1, le[1]);
                label.Scissor(0, 0, num6, le[3]);
                this.Pages(page).Add(label);
                continue;
Label_06A2:
                Engine.AddTextMessage(le.Name);
            }
            this.Page = (num2 == 0) ? 1 : num2;
        }
Exemple #4
0
 public GServerCheckBox(GServerGump owner, LayoutEntry le) : base(le[2], le[3], le[4] != 0, le[0], le[1])
 {
     this.m_Owner   = owner;
     this.m_RelayID = le[5];
 }
Exemple #5
0
 public GServerTextBox(string initialText, LayoutEntry le) : base(0, false, le[0], le[1], le[2], le[3], initialText, Engine.GetUniFont(1), Hues.Load(le[4] + 1), Hues.Load(le[4] + 1), Hues.Load(le[4] + 1))
 {
     this.m_RelayID = le[5];
     base.MaxChars  = 0xef;
 }
Exemple #6
0
 public GServerTextBox(string initialText, LayoutEntry le)
     : base(0, false, le[0], le[1], le[2], le[3], initialText, Engine.GetUniFont(1), Hues.Load(le[4] + 1), Hues.Load(le[4] + 1), Hues.Load(le[4] + 1))
 {
     this.m_RelayID = le[5];
     base.MaxChars = 0xef;
 }
Exemple #7
0
        private void ProcessLayout(LayoutEntry[] list, string[] text)
        {
            int page = 0;
            int num2 = 0;
            bool flag = false;
            for (int i = 0; i < list.Length; i++)
            {
                string str;
                IHue hue;
                int num5;
                string str3;
                int num6;
                IFont uniFont;
                GLabel label;
                object obj2;
                LayoutEntry le = list[i];
                if (((obj2 = le.Name) != null) && ((obj2 = <PrivateImplementationDetails>.$$method0x60000f4-1[obj2]) != null))
                {
                    switch (((int) obj2))
                    {
                        case 0:
                        case 1:
                        {
                            continue;
                        }
                        case 2:
                            goto Label_020B;

                        case 3:
                            goto Label_0243;

                        case 4:
                        {
                            this.m_CanClose = false;
                            continue;
                        }
                        case 5:
                        {
                            this.m_CanMove = false;
                            continue;
                        }
                        case 6:
                        {
                            this.Pages(page).Add(new GServerBackground(this, le[0], le[1], le[3], le[4], le[2] + 4, true));
                            continue;
                        }
                        case 7:
                        {
                            this.Pages(page).Add(new GServerBackground(this, le[0], le[1], le[2], le[3], le[4], false));
                            continue;
                        }
                        case 8:
                            goto Label_0301;

                        case 9:
                        {
                            this.Pages(page).Add(new GServerTextBox(text[le[6]], le));
                            continue;
                        }
                        case 10:
                        {
                            this.Pages(page).Add(new GItemArt(le[0], le[1], le[2]));
                            continue;
                        }
                        case 11:
                        {
                            this.Pages(page).Add(new GServerButton(this, le));
                            continue;
                        }
                        case 12:
                        {
                            this.Pages(page).Add(new GServerRadio(this, le));
                            continue;
                        }
                        case 13:
                        {
                            this.Pages(page).Add(new GServerCheckBox(this, le));
                            continue;
                        }
                        case 14:
                        {
                            int num4 = le[2];
                            this.Pages(page).Add(new GLabel(text[le[3]], Engine.GetUniFont(1), Hues.Load(num4 + 1), le[0] - 1, le[1]));
                            continue;
                        }
                        case 15:
                            num5 = le[4];
                            str3 = text[le[5]];
                            num6 = le[2];
                            uniFont = Engine.GetUniFont(1);
                            if (uniFont.GetStringWidth(str3) <= num6)
                            {
                                goto Label_051A;
                            }
                            goto Label_04EB;

                        case 0x10:
                        {
                            this.ProcessHtmlGump(page, le[0], le[1], le[2], le[3], Localization.GetString(le[4]), le[5] != 0, le[6] != 0, ((le[5] == 0) && (le[6] != 0)) ? 0xffffff : 0);
                            continue;
                        }
                        case 0x11:
                        {
                            this.ProcessHtmlGump(page, le[0], le[1], le[2], le[3], Localization.GetString(le[4]), le[5] != 0, le[6] != 0, Engine.C16232(le[7]));
                            continue;
                        }
                        case 0x12:
                        {
                            this.ProcessHtmlGump(page, le[0], le[1], le[2], le[3], text[le[4]], le[5] != 0, le[6] != 0, ((le[5] == 0) && (le[6] != 0)) ? 0xffffff : 0);
                            continue;
                        }
                    }
                }
                goto Label_06A2;
            Label_020B:
                this.Pages(page).Add(new GTransparentRegion(this, le[0], le[1], le[2], le[3]));
                continue;
            Label_0243:
                page = le[0];
                if (page == 0)
                {
                    flag = false;
                    num2 = 0;
                }
                else if (!flag || (page < num2))
                {
                    num2 = page;
                    flag = true;
                }
                continue;
            Label_0301:
                str = le.GetAttribute("hue");
                if (str != null)
                {
                    try
                    {
                        hue = Hues.Load(Convert.ToInt32(str) + 1);
                    }
                    catch
                    {
                        hue = Hues.Default;
                    }
                }
                else
                {
                    hue = Hues.Default;
                }
                if (le.GetAttribute("class") == "VirtueGumpItem")
                {
                    this.Pages(page).Add(new GVirtueItem(this, le[0], le[1], le[2], hue));
                }
                else
                {
                    this.Pages(page).Add(new GServerImage(this, le[0], le[1], le[2], hue));
                }
                continue;
            Label_04D8:
                str3 = str3.Substring(0, str3.Length - 1);
            Label_04EB:
                if ((str3.Length > 0) && (uniFont.GetStringWidth(str3 + "...") > num6))
                {
                    goto Label_04D8;
                }
                str3 = str3 + "...";
            Label_051A:
                label = new GLabel(str3, uniFont, Hues.Load(num5 + 1), le[0] - 1, le[1]);
                label.Scissor(0, 0, num6, le[3]);
                this.Pages(page).Add(label);
                continue;
            Label_06A2:
                Engine.AddTextMessage(le.Name);
            }
            this.Page = (num2 == 0) ? 1 : num2;
        }
Exemple #8
0
 public GServerRadio(GServerGump owner, LayoutEntry le)
     : base(le[2], le[3], le[4] != 0, le[0], le[1])
 {
     this.m_Owner = owner;
     this.m_RelayID = le[5];
 }