void ParamWindow_ParamAreaMouseDown(object sender, ParamMouseEventArgs e)
 {
     if (!_HandleEvents)
     {
         PitchDragingStatus = PitchView.PitchDragingType.None;
         PitchStP1          = null;
         PitchTmpP0         = null;
         return;
     }
     if (_PitchToolsStatus == PitchView.PitchDragingType.None)
     {
         return;
     }
     if (PitchDragingStatus != PitchView.PitchDragingType.None)
     {
         return;
     }
     if (e.MouseEventArgs.Button != MouseButtons.Left)
     {
         return;
     }
     PitchStP1          = new PitchObject(e.Tick, e.MidPercent * 0.5 * Zoom);
     PitchDragingStatus = _PitchToolsStatus;
     if (PitchActionBegin != null)
     {
         PitchActionBegin(PitchDragingStatus);
     }
 }
 void ParamWindow_ParamAreaMouseMove(object sender, ParamMouseEventArgs e)
 {
     if (!_HandleEvents)
     {
         return;
     }
     CurValue = e.MidPercent * 0.5 * Zoom;
     if (PitchDragingStatus == PitchView.PitchDragingType.None)
     {
         return;
     }
     if (e.Tick == PitchStP1.Tick)
     {
         return;
     }
     PitchTmpP0 = new PitchObject(e.Tick, e.MidPercent * 0.5 * Zoom);
     if (_PitchToolsStatus == PitchView.PitchDragingType.None)
     {
         ParamWindow.ParentForm.Cursor = Cursors.Arrow;
     }
     else
     {
         ParamWindow.ParentForm.Cursor = Cursors.Cross;
     }
 }
 void ParamWindow_ParamAreaMouseDown(object sender, ParamMouseEventArgs e)
 {
     if (!_HandleEvents)
     {
         DynDragingStatus = PitchView.PitchDragingType.None;
         DynStP1          = null;
         DynTmpP0         = null;
         return;
     }
     if (_DynToolsStatus == PitchView.PitchDragingType.None)
     {
         return;
     }
     if (DynDragingStatus != PitchView.PitchDragingType.None)
     {
         return;
     }
     if (e.MouseEventArgs.Button != MouseButtons.Left)
     {
         return;
     }
     DynStP1          = new TickControlObject(e.Tick, e.TallPercent * 100 * Zoom - 100);
     DynDragingStatus = _DynToolsStatus;
     if (DynActionBegin != null)
     {
         DynActionBegin(DynDragingStatus);
     }
 }
 void ParamWindow_ParamAreaMouseMove(object sender, ParamMouseEventArgs e)
 {
     if (!_HandleEvents)
     {
         return;
     }
     CurValue = (e.TallPercent * 100 * Zoom);
     if (DynDragingStatus == PitchView.PitchDragingType.None)
     {
         return;
     }
     if (e.Tick == DynStP1.Tick)
     {
         return;
     }
     DynTmpP0 = new TickControlObject(e.Tick, e.TallPercent * 100 * Zoom - DynBase);
     if (_DynToolsStatus == PitchView.PitchDragingType.None)
     {
         ParamWindow.ParentForm.Cursor = Cursors.Arrow;
     }
     else
     {
         ParamWindow.ParentForm.Cursor = Cursors.Cross;
     }
 }
示例#5
0
 void paramCurveWindow1_ParamAreaMouseClick(object sender, ParamMouseEventArgs e)
 {
     if (e.MouseEventArgs.Button == MouseButtons.Right)
     {
         SetCurveActionMenu();
         CurveAction_SetupCurrentToMouse.Visible           = true;
         CurveAction_SetupCurrentToMouse_Separator.Visible = true;
         ParamCurveTollMenu.Show(PointToScreen(new Point(e.MouseEventArgs.X, e.MouseEventArgs.Y + MainPianoSplitContainer.Top + MainPianoSplitContainer.SplitterDistance + MainPianoSplitContainer.SplitterWidth)), ToolStripDropDownDirection.AboveRight);
     }
 }
 void ParamWindow_ParamBtnsMouseUp(object sender, ParamMouseEventArgs e)
 {
     if (!_HandleEvents)
     {
         return;
     }
     if (PitchDragingStatus == PitchView.PitchDragingType.None)
     {
         return;
     }
     ParamWindow_ParamAreaMouseUp(sender, e);
 }
示例#7
0
 void ParamWindow_ParamAreaMouseMove(object sender, ParamMouseEventArgs e)
 {
     //   this.ParamWindow.ParentForm.Activate();
     // this.ParamWindow.Focus();
     HookPiano = false;
     if (e.Tick < PianoWindow.MinShownTick || e.Tick > PianoWindow.MaxShownTick)
     {
         HookParam = false;
         DisableMousePost();
     }
     else
     {
         HookParam = true;
     }
     MouseTick = e.Tick;
 }
        void ParamWindow_ParamAreaMouseUp(object sender, ParamMouseEventArgs e)
        {
            if (!_HandleEvents)
            {
                return;
            }
            if (PitchDragingStatus == PitchView.PitchDragingType.None)
            {
                return;
            }
            PitchObject PitchEdP2 = new PitchObject(e.Tick, e.MidPercent * 0.5 * Zoom);

            switch (PitchDragingStatus)
            {
            case PitchView.PitchDragingType.DrawLine: replacePitchLine(PitchMathUtils.CalcLineSilk(PitchStP1, PitchEdP2)); break;

            case PitchView.PitchDragingType.DrawGraphJ: replacePitchLine(PitchMathUtils.CalcGraphJ(PitchStP1, PitchEdP2)); break;

            case PitchView.PitchDragingType.DrawGraphR: replacePitchLine(PitchMathUtils.CalcGraphR(PitchStP1, PitchEdP2)); break;

            case PitchView.PitchDragingType.DrawGraphS: replacePitchLine(PitchMathUtils.CalcGraphS(PitchStP1, PitchEdP2)); break;

            case PitchView.PitchDragingType.EarseArea: earsePitchLine(PitchStP1, PitchEdP2, _EarseModeV2); break;
            }
            PitchView.PitchDragingType EDStatus = PitchDragingStatus;
            PitchDragingStatus = PitchView.PitchDragingType.None;
            PitchStP1          = null;
            PitchTmpP0         = null;
            if (PitchActionEnd != null)
            {
                PitchActionEnd(EDStatus);
            }
            if (_PitchToolsStatus == PitchView.PitchDragingType.None)
            {
                ParamWindow.ParentForm.Cursor = Cursors.Arrow;
            }
            else
            {
                ParamWindow.ParentForm.Cursor = Cursors.Cross;
            }
        }
        void ParamWindow_ParamAreaMouseUp(object sender, ParamMouseEventArgs e)
        {
            if (!_HandleEvents)
            {
                return;
            }
            if (DynDragingStatus == PitchView.PitchDragingType.None)
            {
                return;
            }
            TickControlObject DynEdP2 = new TickControlObject(e.Tick, e.TallPercent * 100 * Zoom - DynBase);

            switch (DynDragingStatus)
            {
            case PitchView.PitchDragingType.DrawLine: replaceControlLine(ControlMathUtils.CalcLineSilk(DynStP1, DynEdP2)); break;

            case PitchView.PitchDragingType.DrawGraphJ: replaceControlLine(ControlMathUtils.CalcGraphJ(DynStP1, DynEdP2)); break;

            case PitchView.PitchDragingType.DrawGraphR: replaceControlLine(ControlMathUtils.CalcGraphR(DynStP1, DynEdP2)); break;

            case PitchView.PitchDragingType.DrawGraphS: replaceControlLine(ControlMathUtils.CalcGraphS(DynStP1, DynEdP2)); break;

            case PitchView.PitchDragingType.EarseArea: earseControlLine(DynStP1, DynEdP2); break;
            }
            PitchView.PitchDragingType EDStatus = DynDragingStatus;
            DynDragingStatus = PitchView.PitchDragingType.None;
            DynStP1          = null;
            DynTmpP0         = null;
            if (DynActionEnd != null)
            {
                DynActionEnd(EDStatus);
            }
            if (_DynToolsStatus == PitchView.PitchDragingType.None)
            {
                ParamWindow.ParentForm.Cursor = Cursors.Arrow;
            }
            else
            {
                ParamWindow.ParentForm.Cursor = Cursors.Cross;
            }
        }