private void MapUserControl_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { if (app.EditObject != null) { return; } Point p = GetPoint(e); bool samePoint = p == mouseDownPoint; switch (e.Button) { case MouseButtons.None: break; case MouseButtons.Left: if (app.DraggedType != null) { app.StartEditing(app.DraggedType); Point wp = map.GToW(p); app.EditObject.AddPoint(wp); } else { if (samePoint) { SearchClick(p); } else { UpdateMapRect(p); } } break; case MouseButtons.Right: if (samePoint) { } break; } mouseDownPoint = nullPoint; }
private void miAddObject_Click(object sender, System.EventArgs e) { TreeNode node = tvTypes.SelectedNode; if (node == null) { return; } GType type = node.Tag as GType; Map map = app.CurrentMap; if (map != null) { app.StartEditing(type); } }