private void button_viewXmlRecord_Click(object sender, EventArgs e) { XmlViewerForm dlg = new XmlViewerForm(); GuiUtil.SetControlFont(dlg, this.Font); dlg.Text = "当前XML数据"; dlg.MainForm = this.MainForm; dlg.XmlString = this.XmlRecord; dlg.StartPosition = FormStartPosition.CenterScreen; dlg.ShowDialog(); return; }
/* int SetOriginText(byte[] baOrigin, Encoding encoding, out string strError) { strError = ""; if (encoding == null) { int nRet = this.MainForm.GetEncoding(this.comboBox_originDataEncoding.Text, out encoding, out strError); if (nRet == -1) return -1; } else { this.comboBox_originDataEncoding.Text = GetEncodingForm.GetEncodingName(this.CurrentEncoding); } this.textBox_originData.Text = encoding.GetString(baOrigin); return 0; }*/ private void toolStripButton_dispXmlText_Click(object sender, EventArgs e) { string strXmlBody = ""; try { strXmlBody = this.DcEditor.Xml; } catch (Exception ex) { MessageBox.Show(this, ExceptionUtil.GetAutoText(ex)); return; } XmlViewerForm dlg = new XmlViewerForm(); GuiUtil.SetControlFont(dlg, this.Font); dlg.Text = "XML编码的当前DC记录"; dlg.MainForm = this.MainForm; dlg.XmlString = strXmlBody; // dlg.StartPosition = FormStartPosition.CenterScreen; this.MainForm.AppInfo.LinkFormState(dlg, "dc_xml_dialog_state"); dlg.ShowDialog(this); this.MainForm.AppInfo.UnlinkFormState(dlg); // dlg.ShowDialog(); }