Beispiel #1
0
        public AssemblyBase CreateParagraph(BlockAddress ParentID)
        {
            var asm = new ParagraphAsm();

            asm.ParentID = ParentID;
            //asm.SetValue("Name", name);
            asm.Save();
            return(asm);
        }
Beispiel #2
0
        private void btSavePara_Click(object sender, EventArgs e)
        {
            var aNode = treeView1.SelectedNode as AsmNode;

            if (aNode == null)
            {
                return;
            }

            var para = new ParagraphAsm(aNode.Assembly);

            aNode.Assembly = para;

            var sentlistRep = store.MorphMakeSyntan(memoInp.Text);

            if (sentlistRep == null || sentlistRep.Count == 0)
            {
                return;
            }

            var sent = Map2Asm.Convert(sentlistRep[0]);

            para.UpdateSentStruct(0, sent);

            para.Save();

            //			var para = new ParagraphAsm();
            //			store.UpdateParagraph(para, memoInp.Text, false);

            /*			var paramlist = store.SaveParagraphBD(para);
             *                      if (paramlist == null)
             *                      {
             *                              return;
             *                      }
             *
             *                      foreach (var par in paramlist)
             *                              if (par.Name == "ParagraphID")
             *                              {
             *                                      this.para.ParagraphID = Convert.ToInt32(par.Value, 10);
             *                                      break;
             *                              }
             *                      memoOut.Text = this.para.ParagraphID.ToString();*/
        }