public TableGump(TableDescriptor2D desc) : base(0, 0, 380, 0x16 + (desc.Rows.Length * 0x15)) { this.m_ColWidth = desc.Columns.Length; this.m_RowHeight = desc.Rows.Length; base.ShouldHitTest = false; base.FillAlpha = 1f; base.FillColor = GumpColors.Window; IHue windowText = GumpHues.WindowText; for (int i = 0; i <= desc.Rows.Length; i++) { for (int j = 0; j <= desc.Columns.Length; j++) { if ((i != 0) || (j != 0)) { string str; if (i == 0) { str = desc.Columns[j - 1]; } else if (j == 0) { str = desc.Rows[i - 1]; } else { object obj2 = desc.Function(i - 1, j - 1); if (obj2 is double) { str = ((double) obj2).ToString("F2"); } else if (obj2 != null) { str = obj2.ToString(); } else { str = "(null)"; } } this.Place(j, i, str, windowText); } } } }
public TableGump(TableDescriptor2D desc) : base(0, 0, 380, 0x16 + (desc.Rows.Length * 0x15)) { this.m_ColWidth = desc.Columns.Length; this.m_RowHeight = desc.Rows.Length; base.ShouldHitTest = false; base.FillAlpha = 1f; base.FillColor = GumpColors.Window; IHue windowText = GumpHues.WindowText; for (int i = 0; i <= desc.Rows.Length; i++) { for (int j = 0; j <= desc.Columns.Length; j++) { if ((i != 0) || (j != 0)) { string str; if (i == 0) { str = desc.Columns[j - 1]; } else if (j == 0) { str = desc.Rows[i - 1]; } else { object obj2 = desc.Function(i - 1, j - 1); if (obj2 is double) { str = ((double)obj2).ToString("F2"); } else if (obj2 != null) { str = obj2.ToString(); } else { str = "(null)"; } } this.Place(j, i, str, windowText); } } } }
public Table2DInfoNode(string name, TableDescriptor2D[] desc) : base(name, new InfoNode[0]) { this.m_Descriptors = desc; }