this.lstPrims.UseCompatibleStateImageBehavior = false;\r
this.lstPrims.View = System.Windows.Forms.View.Details;\r
this.lstPrims.SelectedIndexChanged += new System.EventHandler(this.lstPrims_SelectedIndexChanged);\r
+ this.lstPrims.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lstPrims_MouseUp);\r
// \r
// columnHeader1\r
// \r
e.SuppressKeyPress = true;\r
}\r
}\r
+ private void lstPrims_MouseUp(object sender, MouseEventArgs e)\r
+ {\r
+ if (e.Button == MouseButtons.Right)\r
+ {\r
+ ListView box = (ListView)sender;\r
+ if (box.SelectedItems.Count > 0)\r
+ {\r
+ System.Windows.Forms.ContextMenuStrip ctxMenuStripPrimitive = new ContextMenuStrip();\r
+ instance.ContextActionManager.AddContributions(ctxMenuStripPrimitive, typeof(Primitive), box.SelectedItems[0].Tag, btnWalkTo.Parent);\r
+ ctxMenuStripPrimitive.Show(lstPrims, new System.Drawing.Point(e.X, e.Y));\r
+ }\r
+ }\r
+ }\r
}\r
\r
public class ObjectSorter : IComparer\r