internal void CalcAxis(PianoProperties pprops, RollConfigures rconf)
 {
     if (_me.Y <= rconf.Const_TitleHeight && _me.Y >= 0)
     {
         _area = AreaType.Title;
     }
     else if (_me.X <= rconf.Const_RollWidth && _me.X >= 0)
     {
         _area = AreaType.Roll;
     }
     else
     {
         _area = AreaType.Track;
     }
     if (_area != AreaType.Title)
     {
         double drawed_noteSpt  = (double)(_me.Y - rconf.Const_TitleHeight) / rconf.Const_RollNoteHeight;
         uint   _noteNumber     = pprops.PianoTopNote - (uint)drawed_noteSpt;
         double cent            = 0.5 - drawed_noteSpt + (uint)drawed_noteSpt;
         int    _notePitchWheel = (int)Math.Round(cent * 0x2000, 0);
         _pitchvp            = new PitchAtomObject(_noteNumber, _notePitchWheel);
         _pitchvp.OctaveType = pprops.OctaveType;
     }
     if (_area != AreaType.Roll)
     {
         long drawed_pixel = _me.X - rconf.Const_RollWidth;
         _tick = (long)Math.Round((pprops.PianoStartTick + pprops.dertPixel2dertTick(drawed_pixel)), 0);
     }
 }
 internal void CalcAxis(PianoProperties pprops, RollConfigures rconf, long windowheight)
 {
     if (_me.X <= rconf.Const_RollWidth && _me.X >= 0)
     {
         _area = AreaType.Btns;
     }
     else
     {
         _area = AreaType.Area;
     }
     if (_area != AreaType.Btns)
     {
         long drawed_pixel = _me.X - rconf.Const_RollWidth;
         _tick = (long)Math.Round((pprops.PianoStartTick + pprops.dertPixel2dertTick(drawed_pixel)), 0);
     }
     _tallPercent = CalcPercent(_me.Y, windowheight);
 }
 /// <summary>
 /// 基础逻辑-私有
 /// </summary>
 #region
 void genShownArea()
 {
     ShownNoteCount = (double)(d2DPainterBox1.ClientRectangle.Height - rconf.Const_TitleHeight) / rconf.Const_RollNoteHeight;
     ShownTickCount = pprops.dertPixel2dertTick(d2DPainterBox1.ClientRectangle.Width - rconf.Const_RollWidth);
 }
Esempio n. 4
0
 /// <summary>
 /// 基础逻辑-私有
 /// </summary>
 #region
 void genShownArea()
 {
     ShownTickCount = pprops.dertPixel2dertTick(d2DPainterBox1.ClientRectangle.Width - rconf.Const_RollWidth);
 }