private void docBlock_Selected(object source, BlockEventArgs e)
 {
     if (e.ID > 0)
     {
         var linkTypeDialog =
             new LinkTypeDialog(Environment.StringResources.GetString("CreatedDocument"), e.ID, DocDate);
         linkTypeDialog.DialogEvent += linkTypeDialog_DialogEvent;
         linkTypeDialog.Owner        = FindForm();
         linkTypeDialog.Show();
     }
 }
        private void item_Click(object sender, EventArgs e)
        {
            var   item = (MenuItem)sender;
            Match m    = Regex.Match(item.Text, @"^\[(?<id>\d+)\]");

            if (m.Success)
            {
                var linkTypeDialog =
                    new LinkTypeDialog(Environment.StringResources.GetString("CreatedDocument"),
                                       Int32.Parse(m.Groups["id"].Value), DocDate);
                linkTypeDialog.DialogEvent += linkTypeDialog_DialogEvent;
                linkTypeDialog.Owner        = FindForm();
                linkTypeDialog.Show();
            }
        }