private void frmInsertTableCode_FormClosing(object sender, FormClosingEventArgs e) { DesignDataXmlDocument.InsertTableData data = new DesignDataXmlDocument.InsertTableData(); data.RowNum = int.Parse(rowTextBox.Text); data.ColNum = int.Parse(colTextBox.Text); data.TableWidth = widthTextBox.Text + ((widthUintComBox.SelectedIndex == 1) ? "%" : "px"); data.BorderWidth = int.Parse(borderWidthTextBox.Text); data.CellSpacing = int.Parse(cellspacingTextBox.Text); data.Cellpadding = int.Parse(cellpaddingTextBox.Text); data.Align = Align.ToString(); Service.Sdsite.DesignDataDocument.HTMLDesignerInsertTableData = data; }
public frmInsertTableCode() { InitializeComponent(); GetCHSTextforInsertTable getCHSforIn = new GetCHSTextforInsertTable(); string[] unit = getCHSforIn.Unit; string[] calign = getCHSforIn.CaptionAlign; foreach (string u in unit) { widthUintComBox.Items.Add(u); } foreach (string a in calign) { alignComBox.Items.Add(a); } widthUintComBox.SelectedIndex = 0; DesignDataXmlDocument.InsertTableData data = Service.Sdsite.DesignDataDocument.HTMLDesignerInsertTableData; if (data != null) { rowTextBox.Text = data.RowNum.ToString(); colTextBox.Text = data.ColNum.ToString(); string width = data.TableWidth; if (width.IndexOf("%") > 0) { widthTextBox.Text = width.Substring(0, width.IndexOf("%")); widthUintComBox.SelectedIndex = 1; } else { widthTextBox.Text = width.Substring(0, width.IndexOf("px")); widthUintComBox.SelectedIndex = 0; } borderWidthTextBox.Text = data.BorderWidth.ToString(); cellspacingTextBox.Text = data.CellSpacing.ToString(); cellpaddingTextBox.Text = data.Cellpadding.ToString(); Align = data.Align; data.Align = Align.ToString(); } this.ImeMode = ImeMode.On; }