public void handleCommonMouseDown(Object sender, MouseEventArgs e) { if (AppManager.getEditMode() != EditMode.NONE) { return; } DraggableBButton btn = (DraggableBButton)sender; if (mMainWindow != null) { mMainWindow.BringToFront(); } IconDynamicsHandle handle = btn.getHandle(); VsqEvent item = new VsqEvent(); item.Clock = 0; item.ID.Note = 60; item.ID.type = VsqIDType.Aicon; item.ID.IconDynamicsHandle = (IconDynamicsHandle)handle.clone(); int length = handle.getLength(); if (length <= 0) { length = 1; } item.ID.setLength(length); AppManager.mAddingEvent = item; btn.DoDragDrop(handle, System.Windows.Forms.DragDropEffects.All); }