using System.Windows.Forms
public override GoContextMenu GetContextMenu(GoView view)
{
GoContextMenu cm = new GoContextMenu(view);
if (CanDelete())
cm.MenuItems.Add(new MenuItem("Cut", new EventHandler(this.Cut_Command)));
if (CanCopy())
cm.MenuItems.Add(new MenuItem("Copy", new EventHandler(this.Copy_Command)));
return cm;
}
public void Cut_Command(Object sender, EventArgs e)
{
GoView v = GoContextMenu.FindView(sender as MenuItem);
if (v != null)
v.EditCut();
}
public void Copy_Command(Object sender, EventArgs e)
{
GoView v = GoContextMenu.FindView(sender as MenuItem);
if (v != null)
v.EditCopy();
}