Beispiel #1
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     this.VerbIndex1     = this.cmbverbFrames1.SelectedIndex;
     this.VerbIndex2     = this.cmbVerbFrames2.SelectedIndex;
     this.domainRelation = (DomainRelationType)this.cmbDomainRelation.SelectedIndex;
     this.DialogResult   = DialogResult.OK;
     this.Close();
 }
Beispiel #2
0
 public void AddDomainRelation(DomainRelationType domainRelationType, VerbFrame frame)
 {
     if (_domainRelations.ContainsKey(domainRelationType))
     {
         _domainRelations[domainRelationType].Add(frame);
     }
     else
     {
         List <VerbFrame> verbframelst = new List <VerbFrame>();
         verbframelst.Add(frame);
         _domainRelations.Add(domainRelationType, verbframelst);
     }
 }
Beispiel #3
0
        public void AddDomainRelation_n(DomainRelationType domainRelationType, NounFrame frame)
        {
            if (_domainRelations_n.ContainsKey(domainRelationType))
            {
                _domainRelations_n[domainRelationType].Add(frame);
            }

            else
            {
                List <NounFrame> nounframelst = new List <NounFrame>();
                nounframelst.Add(frame);
                _domainRelations_n.Add(domainRelationType, nounframelst);
            }
        }
Beispiel #4
0
        private void btnAddDomainRelation_Click(object sender, EventArgs e)
        {
            FrmDomainRelation form = new FrmDomainRelation(tmr.VerbFrames);

            if (form.ShowDialog() == DialogResult.OK)
            {
                int v1Index          = form.VerbIndex1;
                DomainRelationType d = form.domainRelation;
                int v2Index          = form.VerbIndex2;
                if (!this.tmr.VerbFrames[v1Index].DomainRelations.ContainsKey(d) || !this.tmr.VerbFrames[v1Index].DomainRelations[d].Contains(tmr.VerbFrames[v2Index]))
                {
                    this.tmr.VerbFrames[v1Index].AddDomainRelation(d, tmr.VerbFrames[v2Index]);
                    this.viewer.UpdateRelations();
                }
            }
        }
Beispiel #5
0
 public List <VerbFrame> GetDomainRelation(DomainRelationType domainRelationType)
 {
     return(_domainRelations[domainRelationType]);
 }