{
lock( this._スレッド間同期 )
{
- this._カウンタを進行する();
+ this.進行する();
return this._現在値;
}
}
{
if( this._開始値 != this._終了値 )
{
- this._カウンタを進行する();
+ this.進行する();
return ( float ) ( this._現在値 - this._開始値 ) / ( float ) ( this._終了値 - this._開始値 );
}
else
{
lock( this._スレッド間同期 )
{
- this._カウンタを進行する(); // 終了してるかどうか判定する前に、溜まってる進行を全部消化する。
+ this.進行する(); // 終了してるかどうか判定する前に、溜まってる進行を全部消化する。
return this._動作中;
}
}
{
lock( this._スレッド間同期 )
{
- this._カウンタを進行する();
+ this.進行する();
return ( this._現在値 >= this._終了値 );
}
}
}
}
-
- private int _開始値 = 0;
-
- private int _終了値 = 0;
-
- private int _現在値 = 0;
-
- private bool _動作中 = false;
-
- private long _間隔ms = QPCTimer.未使用;
-
- private 定間隔進行 _定間隔進行 = null;
-
- private readonly object _スレッド間同期 = new object();
-
-
/// <summary>
/// 前回のこのメソッドの呼び出しからの経過時間をもとに、必要なだけ現在値を増加させる。
/// カウント値が終了値に達している場合は、それ以上増加しない(終了値を維持する)。
/// </summary>
- private void _カウンタを進行する()
+ public void 進行する()
{
if( this._間隔ms == QPCTimer.未使用 )
return; // 開始されていないなら無視。
} );
}
}
+
+ private int _開始値 = 0;
+
+ private int _終了値 = 0;
+
+ private int _現在値 = 0;
+
+ private bool _動作中 = false;
+
+ private long _間隔ms = QPCTimer.未使用;
+
+ private 定間隔進行 _定間隔進行 = null;
+
+ private readonly object _スレッド間同期 = new object();
}
}