private void AWBEditor_DoubleClick(object sender, MouseEventArgs e)
{
Guid result;
String attributeValue = "";
//MessageBox.Show(result.ToString());
attributeValue = GetAttributeValueFromPosition(Selection.Text);
if (ModifierKeys == Keys.Control )//e.Control && e.KeyCode == Keys.O)
{
if (Guid.TryParse(Selection.Text, out result))
{
var form = new DocumentForm();
Document document = DocumentManager.GetDocument(attributeValue);
if (document == null)
{
MessageBox.Show(string.Format("The document with id \"{0}\" does not exist in the database.",
attributeValue));
}
else
{
form.Document = document;
form.StartPosition = FormStartPosition.WindowsDefaultLocation;
form.ShowDialog();
}
}
//from current position go back upto 32 chars to see if there is a quote
}
}