void txtTreeText_DoubleClick(object sender, EventArgs e) { FormCodeManager form = new FormCodeManager(m_dbName, true); form.ShowDialog(); this.TreeId = form.SelectedFolder.Id; this.txtTreeText.Text = form.SelectedFolder.Text; }
private void codeManagerToolStripMenuItem_Click(object sender, EventArgs e) { if (m_FormCodeManager == null) { m_FormCodeManager = new FormCodeManager(); } if (m_FormCodeManager.IsDisposed) { m_FormCodeManager = new FormCodeManager(); } m_FormCodeManager.Show(dockPanel1, DockState.DockLeft); }
void m_FormCodeManager_EventCodeManagerChange(object sender, EventArgs e) { if (sender == null) { return; } m_FormCodeManager = sender as FormCodeManager; if (m_FormCodeManager.TempFolder != null) { this.toolStripStatusLabel1.Text = "临时文件夹:" + m_FormCodeManager.TempFolder.Text; } if (m_FormCodeManager.TemplateCode != null) { this.toolStripStatusLabel2.Text = "代码模板:" + m_FormCodeManager.TemplateCode.Title; } if (m_FormCodeManager.TempAbapRunCode != null) { this.toolStripStatusLabel3.Text = "临时ABAP代码:" + m_FormCodeManager.TempAbapRunCode.Title; } }
// private Code _Code = null; public FormCodeGernerator() { InitializeComponent(); this.Text = "代码生成器"; dockPanel1.DocumentStyle = DocumentStyle.DockingWindow; m_FormTableField = new FormTableField(); m_FormTableField.Show(dockPanel1, DockState.DockLeft); m_FormTableField.EventReadTableField += m_FormTableField_EventReadTableField; m_FormCodeManager = new FormCodeManager(); m_FormCodeManager.Show(dockPanel1, DockState.DockLeft); m_FormCodeManager.EventCodeManagerChange += m_FormCodeManager_EventCodeManagerChange; this.toolStripStatusLabel1.Text = "临时文件夹:"; this.toolStripStatusLabel2.Text = "代码模板:"; this.toolStripStatusLabel3.Text = "临时ABAP代码:"; if (m_FormCodeManager.TempFolder != null) { this.toolStripStatusLabel1.Text = "临时文件夹:" + m_FormCodeManager.TempFolder.Text; } }
public void setFormCodeManager(FormCodeManager p_FormCodeManager) { m_FormCodeManager = p_FormCodeManager; }
private void btnCodeManager_Click(object sender, EventArgs e) { CodeManager.FormCodeManager frm = new CodeManager.FormCodeManager(); frm.Show(); }
private void codeManagerToolStripMenuItem_Click(object sender, EventArgs e) { if (m_FormCodeManager == null) { m_FormCodeManager = new FormCodeManager(); } if (m_FormCodeManager.IsDisposed) { m_FormCodeManager = new FormCodeManager(); } m_FormCodeManager.Show(dockPanel, DockState.DockLeft); }
private void 保存运行结果ToolStripMenuItem_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(textResult.Document.Text)) { MessageBox.Show("结果为空"); return; } var result = new Code(); result.Title = "_result" + DateTime.Now.ToString(); var frm = new FormCodeManager(); frm.Text = "请选择文件夹"; frm.ShowDialog(); result.TreeId = frm.SelectedFolder.Id; result.Content = textResult.Document.Text; db.SaveCode(result); MessageBox.Show("结果保存成功: " + result.Title); }
private void SaveCode() { if (_abapCode == null) { _abapCode = new Code(); } if (string.IsNullOrEmpty(_abapCode.TreeId)) { var formManager = new FormCodeManager(); formManager.ShowDialog(); if (formManager.SelectedFolder != null) { _abapCode.TreeId = formManager.SelectedFolder.Id; } else { return; } } _abapCode.Content = this.textResultCode.Document.Text; _abapCode.Title = this.textAbapCodeTitle.Text; db.SaveCode(_abapCode); MessageBox.Show("保存成功"); //FormCodeEditor form = new FormCodeEditor(); //form.code = _abapCode; //form.Show(); }
private void CreateNewAbapCode() { _abapCode = new Code(); _abapCode.Category = "ABAP"; var formManager = new FormCodeManager(); formManager.ShowDialog(); _abapCode.TreeId = formManager.SelectedFolder.Id; textResultCode.Document.Text = ""; }