// choose an existing concept from the list and
 private void ButtonManuallyAddRelatedConcepts_Click(object sender, EventArgs e)
 {
     SelectExistingConcept dialog = new SelectExistingConcept(_ao, true);
     if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         foreach (string uri in dialog.SelectedConceptUris)
         {
             string label = _ao.GetConceptLabel(uri);
             AddRelatedConcept(label, uri, _conceptRelations[0]);
         }
     }
 }
 private void ButtonEditExisting_Click(object sender, EventArgs e)
 {
     if (!_ao.StoreIsValid)
     {
         MessageBox.Show("The annotation ontology is not loaded yet. Please wait.");
         return;
     }
     SelectExistingConcept dialog = new SelectExistingConcept(_ao, false);
     if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK && dialog.SelectedConceptUris.Count == 1)
     {
         string conceptUri = dialog.SelectedConceptUris[0];
         TextBoxDescription.Text = _ao.GetConceptDescription(conceptUri);
         TextBoxConceptUri.Text = conceptUri;
         TextBoxLabels.Text = string.Join(", ", _ao.GetConceptLabels(conceptUri));
         foreach (string key in _relationToUri.Keys)
         {
             string relationUri = _relationToUri[key];
             foreach (Statement s in _ao.Select(new Statement(new Entity(conceptUri), (Entity)relationUri, null)))
             {
                 string objectUri = s.Object.Uri;
                 if (string.IsNullOrEmpty(objectUri))
                     objectUri = ((Literal)s.Object).Value;
                 string objectLabel = _ao.GetConceptLabel(objectUri);
                 if (!string.IsNullOrEmpty(objectLabel))
                     AddRelatedConcept(objectLabel, objectUri, key);
             }
         }
         _editingExistingConcept = true;
     }
 }