private void btnSetCell_Click(object sender, EventArgs e) { frmSetTabelCell cell = new frmSetTabelCell { MapTemplateTableElement = this.mapTemplateElement_0 as MapTemplateTableElement, m_tabcell = this.sortedList_0 }; if (cell.ShowDialog() == DialogResult.OK) { MapTemplateTableElement element = this.mapTemplateElement_0 as MapTemplateTableElement; int rowNumber = element.RowNumber; int columnNumber = element.ColumnNumber; this.sortedList_0 = cell.m_tabcell; for (int i = 0; i < rowNumber; i++) { ListViewItem item = this.listView1.Items[i]; int count = item.SubItems.Count; for (int j = 0; j < columnNumber; j++) { item.SubItems[j + 1].Text = this.method_1(i, j); } } this.bool_0 = true; if (this.OnValueChange != null) { this.OnValueChange(); } } }
private void TableGeneralPage_Load(object sender, EventArgs e) { this.txtCol.Visible = !this.IsEdit; this.txtRow.Visible = !this.IsEdit; this.label1.Visible = !this.IsEdit; this.label2.Visible = !this.IsEdit; MapTemplateTableElement element = this.mapTemplateElement_0 as MapTemplateTableElement; this.txtWidth.Text = element.Width.ToString(); this.txtHeight.Text = element.Height.ToString(); this.txtRow.Text = element.RowNumber.ToString(); this.txtCol.Text = element.ColumnNumber.ToString(); this.bool_0 = true; }
private void TableCellSetPage_Load(object sender, EventArgs e) { MapTemplateTableElement element = this.mapTemplateElement_0 as MapTemplateTableElement; int rowNumber = element.RowNumber; int columnNumber = element.ColumnNumber; for (int i = 0; i < rowNumber; i++) { for (int j = 0; j < columnNumber; j++) { this.method_0(i, j, element.GetCellElement(i, j)); } } this.Init(); }
public void Apply() { if (this.bool_1) { this.bool_1 = false; MapTemplateTableElement element = this.mapTemplateElement_0 as MapTemplateTableElement; element.Width = Convert.ToDouble(this.txtWidth.Text); element.Height = Convert.ToDouble(this.txtHeight.Text); if (!this.IsEdit) { element.RowNumber = Convert.ToInt32(this.txtRow.Text); element.ColumnNumber = Convert.ToInt32(this.txtCol.Text); } } }
public override MapTemplateElement Clone(MapTemplate mapTemplate_1) { MapTemplateTableElement element = new MapTemplateTableElement(mapTemplate_1); try { element.ColumnNumber = this.ColumnNumber; element.Height = this.Height; element.Width = this.Width; element.RowNumber = this.RowNumber; } catch (Exception) { } this.CopyTo(element); return(element); }
public void Init() { int num3; MapTemplateTableElement element = this.mapTemplateElement_0 as MapTemplateTableElement; int rowNumber = element.RowNumber; int columnNumber = element.ColumnNumber; this.listView1.Clear(); ColumnHeader header = new ColumnHeader { Text = " " }; this.listView1.Columns.Add(header); for (num3 = 0; num3 < columnNumber; num3++) { ColumnHeader header2 = new ColumnHeader(); int num4 = num3 + 1; header2.Text = num4.ToString(); this.listView1.Columns.Add(header2); } string[] items = new string[columnNumber + 1]; for (num3 = 0; num3 < (columnNumber + 1); num3++) { items[num3] = ""; } for (num3 = 0; num3 < rowNumber; num3++) { items[0] = (num3 + 1).ToString(); for (int i = 1; i < (columnNumber + 1); i++) { items[i] = this.method_1(num3, i - 1); } this.listView1.Items.Add(new ListViewItem(items)); } }