예제 #1
0
파일: Display.cs 프로젝트: stuart2w/SAW
 public override void RefreshAsNeeded(Diagram.ScaledInvalidate fnInvalidate)
 {
     base.RefreshAsNeeded(fnInvalidate);
     if (m_LastFractionDrawn != m_Engine.ElapsedTimerFraction)
     {
         fnInvalidate.Invoke(TimerRectangle());
     }
     if (EventText != m_DrawnEventText || m_DrawnEventAlpha != EventAlpha())
     {
         fnInvalidate.Invoke(EventRectangle());
     }
 }
예제 #2
0
파일: Display.cs 프로젝트: stuart2w/SAW
 public override void RefreshAsNeeded(Diagram.ScaledInvalidate fnInvalidate)
 {
     base.RefreshAsNeeded(fnInvalidate);
     if (m_LastStateDrawn != m_Switch.State)
     {
         fnInvalidate.Invoke(StateArrowRectangle());
     }
 }
예제 #3
0
파일: Display.cs 프로젝트: stuart2w/SAW
 public override void RefreshAsNeeded(Diagram.ScaledInvalidate fnInvalidate)
 {
     base.RefreshAsNeeded(fnInvalidate);
     if (m_LastFractionDrawn != m_Switch.ElapsedTimerFraction)
     {
         fnInvalidate.Invoke(TimerRectangle());
     }
 }
예제 #4
0
파일: Display.cs 프로젝트: stuart2w/SAW
 public void RefreshAsNeeded(Diagram.ScaledInvalidate fnInvalidate)
 {
     if (LastDrawnState != EventState && LastDrawnAlpha > 0 || LastDrawnAlpha != EventAlpha())
     {
         Point     pt1  = new Point(From.Bounds.Right, From.Bounds.Y + From.Bounds.Height / 2);
         Point     pt2  = new Point(To.Bounds.X, To.Bounds.Y + To.Bounds.Height / 2);
         int       half = FLASHWIDTH / 2;
         Rectangle rct  = new Rectangle(pt1.X - half, pt1.Y - half, FLASHWIDTH, FLASHWIDTH);                    // slightly clunky way of doing this, but don't think efficieny matters
         rct = Rectangle.Union(rct, new Rectangle(pt2.X - half, pt2.Y - half, FLASHWIDTH, FLASHWIDTH));
         fnInvalidate.Invoke(rct);
     }
 }