コード例 #1
0
 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();
 }
コード例 #2
0
        private void CreateNewAbapCode()
        {
            _abapCode          = new Code();
            _abapCode.Category = "ABAP";
            var formManager = new FormCodeManager();

            formManager.ShowDialog();
            _abapCode.TreeId             = formManager.SelectedFolder.Id;
            textResultCode.Document.Text = "";
        }
コード例 #3
0
        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);
        }