svnno****@sourc*****
svnno****@sourc*****
2010年 11月 14日 (日) 15:02:39 JST
Revision: 1066 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1066 Author: syo68k Date: 2010-11-14 15:02:39 +0900 (Sun, 14 Nov 2010) Log Message: ----------- APIゲージの描画が正常に行われない場合があったのを修正 Modified Paths: -------------- trunk/Tween/ToolStripAPIGauge.vb -------------- next part -------------- Modified: trunk/Tween/ToolStripAPIGauge.vb =================================================================== --- trunk/Tween/ToolStripAPIGauge.vb 2010-11-13 02:24:32 UTC (rev 1065) +++ trunk/Tween/ToolStripAPIGauge.vb 2010-11-14 06:02:39 UTC (rev 1066) @@ -72,13 +72,12 @@ Dim minute As Double = (Me.ResetTime - DateTime.Now).TotalMinutes Dim apiGaugeBounds As New Rectangle(0, _ CType((Me.Control.Height - (Me._gaugeHeight * 2)) / 2, Integer), _ - CType(e.ClipRectangle.Width * (Me.RemainCount / Me._maxCount), Integer), _ + CType(Me.Control.Width * (Me.RemainCount / Me._maxCount), Integer), _ Me._gaugeHeight) Dim timeGaugeBounds As New Rectangle(0, _ apiGaugeBounds.Top + Me._gaugeHeight, _ - CType(e.ClipRectangle.Width * (minute / 60), Integer), _ + CType(Me.Control.Width * (minute / 60), Integer), _ Me._gaugeHeight) - e.Graphics.FillRectangle(Brushes.LightBlue, apiGaugeBounds) e.Graphics.FillRectangle(Brushes.LightPink, timeGaugeBounds) e.Graphics.DrawString(Me.Control.Text, Me.Control.Font, SystemBrushes.ControlText, 0, CType(timeGaugeBounds.Top - (Me.Control.Font.Height / 2), Single)) @@ -97,6 +96,10 @@ Me.originalSize = Me.Control.Size End Sub + Private Sub Control_Invalidated(ByVal sender As Object, ByVal e As EventArgs) + Me.Control.Refresh() + End Sub + Private Sub SetText(ByVal remain As Integer, ByVal max As Integer) Dim textFormat As String = "API {0}/{1}" Dim toolTipTextFormat As String = _