private void btnOk_Click(object sender, EventArgs e) { this.VerbIndex1 = this.cmbverbFrames1.SelectedIndex; this.VerbIndex2 = this.cmbVerbFrames2.SelectedIndex; this.temporalRelation = (TemporalRelationType)this.cmbTemporalRelation.SelectedIndex; this.DialogResult = DialogResult.OK; this.Close(); }
public void AddTemporalRelation_n(TemporalRelationType temporalRelationType, NounFrame frame) { if (_temporalRelations_n.ContainsKey(temporalRelationType)) { _temporalRelations_n[temporalRelationType].Add(frame); } else { List <NounFrame> nounframelst = new List <NounFrame>(); nounframelst.Add(frame); _temporalRelations_n.Add(temporalRelationType, nounframelst); } }
public void AddTemporalRelation(TemporalRelationType temporalRelationType, VerbFrame frame) { if (_temporalRelations.ContainsKey(temporalRelationType)) { _temporalRelations[temporalRelationType].Add(frame); } else { List <VerbFrame> verbframelst = new List <VerbFrame>(); verbframelst.Add(frame); _temporalRelations.Add(temporalRelationType, verbframelst); } }
private void button_addTemporalRelation_Click(object sender, EventArgs e) { FrmAddTemporalRelation form = new FrmAddTemporalRelation(tmr.VerbFrames); if (form.ShowDialog() == DialogResult.OK) { int v1Index = form.VerbIndex1; TemporalRelationType d = form.temporalRelation; int v2Index = form.VerbIndex2; if (!this.tmr.VerbFrames[v1Index].TemporalRelations.ContainsKey(d) || !this.tmr.VerbFrames[v1Index].TemporalRelations[d].Contains(tmr.VerbFrames[v2Index])) { this.tmr.VerbFrames[v1Index].AddTemporalRelation(d, tmr.VerbFrames[v2Index]); this.viewer.UpdateRelations(); } } }
public List <VerbFrame> GetTemporalRelation(TemporalRelationType temporalRelationType) { return(_temporalRelations[temporalRelationType]); }