internal void CalcArea(TrackerProperties pprops, TrackerConfigures rconf)
 {
     if (_me.X > rconf.Const_GridVolumeWidth && _me.X < rconf.Const_GridWidth)
     {
         //GRID
         if (_me.X < rconf.Const_GridVolumeWidth + rconf.Const_GridButtonWidth)
         {
             //Button
             double cid = (_me.Y - rconf.Const_TitleHeight) / (double)(rconf.Const_TrackHeight / 2);
             if (((int)cid) % 2 == 0)
             {
                 _area = GridesAreaType.VerticalBtnsDec;
             }
             else
             {
                 _area = GridesAreaType.VerticalBtnsAdd;
             }
         }
         else
         {
             _area = GridesAreaType.NameArea;
         }
     }
     else if (_me.X < rconf.Const_GridVolumeWidth && _me.X >= 0)
     {
         _area = GridesAreaType.VolumeArea;
     }
     else
     {
         _area = GridesAreaType.None;
         //NAN
     }
 }
 internal TrackerGridesDrawUtils(BalthasarLib.D2DPainter.D2DPaintEventArgs e, TrackerConfigures rconf, TrackerProperties pprops)
     : base(e, rconf)
 {
     baseEvent   = e;
     this.rconf  = rconf;
     this.pprops = pprops;
 }
Beispiel #3
0
 internal void CalcAxis(TrackerProperties pprops, TrackerConfigures rconf)
 {
     if (_me.Y <= rconf.Const_TitleHeight && _me.Y >= 0)
     {
         _area = AreaType.Title;
     }
     else if (_me.X <= rconf.Const_GridWidth && _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_TrackHeight;
         _trackID = (int)Math.Floor(drawed_noteSpt) + (int)pprops.TopTrackId;
     }
     if (_area != AreaType.Roll)
     {
         long drawed_pixel = _me.X - rconf.Const_GridWidth;
         _tick = (long)Math.Round((pprops.PianoStartTick + pprops.dertPixel2dertTick(drawed_pixel)), 0);
     }
 }
 internal void CalcArea(TrackerProperties pprops, TrackerConfigures rconf, GridesMouseEventArgs cache)
 {
     if (cache != null && cache.MouseEventArgs.X == _me.X && cache.MouseEventArgs.Y == _me.Y)
     {
         _area = cache.Area;
     }
     else
     {
         CalcArea(pprops, rconf);
     }
 }
Beispiel #5
0
 internal void CalcAxis(TrackerProperties pprops, TrackerConfigures rconf, TrackerMouseEventArgs cache)
 {
     if (cache != null && cache.MouseEventArgs.X == _me.X && cache.MouseEventArgs.Y == _me.Y)
     {
         _tick    = cache.Tick;
         _trackID = cache._trackID;
         _area    = cache.Area;
     }
     else
     {
         CalcAxis(pprops, rconf);
     }
 }
Beispiel #6
0
 internal TrackerDrawUtils(BalthasarLib.D2DPainter.D2DPaintEventArgs e, TrackerConfigures rconf)
 {
     baseEvent  = e;
     this.rconf = rconf;
 }