private void AddConvertRelationshipContextMenu(RadContextMenu contextMenu, RelationshipDTO relationship) { if (relationship == null) { return; } //RadMenuSeparatorItem separator = new RadMenuSeparatorItem(); //contextMenu.Items.Add(separator); var targetTypes = bizRelationshipConverter.GetRelationshipConvertOptions(relationship); if (targetTypes.Any()) { var relationshipConvertMenu = AddMenu(contextMenu.Items, "تبدیل رابطه", "", "../Images/relationship1.png"); foreach (var item in targetTypes) { var title = "تبدیل به رابطه " + bizRelationship.GetRelationshipTypeTitle(item); var convertMenu = AddMenu(relationshipConvertMenu.Items, title, "", "../Images/convert.png", item); convertMenu.Click += (sender, EventArgs) => customMenuItem_Click(sender, relationship); } } }