private void button1_Click(object sender, EventArgs e) { List <TableRowObject> tableRowObjects = this.elementLayoutDesigner1.TableRows; ElementLayoutObject layout = new ElementLayoutObject(); layout.TableRows = tableRowObjects; string s = Newtonsoft.Json.JsonConvert.SerializeObject(layout); FormText frm = new FormText(); frm.ShowDialog(s); }
private void button2_Click_2(object sender, EventArgs e) { FormText frm = new FormText(); frm.ShowDialog(""); string s = frm.GetText(); ElementLayoutObject layout = Newtonsoft.Json.JsonConvert.DeserializeObject <ElementLayoutObject>(s); ElementLayoutDesigner layoutDesigner = new ElementLayoutDesigner(); layoutDesigner.TableRows = layout.TableRows; this.elementLayoutDesigner1.TableRows = layout.TableRows; string tmp = ""; }