diff --git a/Terminal.Gui/Views/SpinnerView.cs b/Terminal.Gui/Views/SpinnerView.cs
index 06984462c..dccf19eec 100644
--- a/Terminal.Gui/Views/SpinnerView.cs
+++ b/Terminal.Gui/Views/SpinnerView.cs
@@ -11,9 +11,9 @@ namespace Terminal.Gui {
/// Use to make the automate calls to .
///
public class SpinnerView : Label {
- private Rune [] runes = new Rune [] { '|', '/', '\u2500', '\\' };
- private int currentIdx = 0;
- private DateTime lastRender = DateTime.MinValue;
+ private Rune [] _runes = new Rune [] { '|', '/', '\u2500', '\\' };
+ private int _currentIdx = 0;
+ private DateTime _lastRender = DateTime.MinValue;
private object _timeout;
///
@@ -36,10 +36,10 @@ namespace Terminal.Gui {
///
public override void Redraw (Rect bounds)
{
- if (DateTime.Now - lastRender > TimeSpan.FromMilliseconds (SpinDelayInMilliseconds)) {
- currentIdx = (currentIdx + 1) % runes.Length;
- Text = "" + runes [currentIdx];
- lastRender = DateTime.Now;
+ if (DateTime.Now - _lastRender > TimeSpan.FromMilliseconds (SpinDelayInMilliseconds)) {
+ _currentIdx = (_currentIdx + 1) % _runes.Length;
+ Text = "" + _runes [_currentIdx];
+ _lastRender = DateTime.Now;
}
base.Redraw (bounds);
@@ -48,9 +48,9 @@ namespace Terminal.Gui {
///
/// Automates spinning
///
- public void AutoSpin()
+ public void AutoSpin ()
{
- if(_timeout != null) {
+ if (_timeout != null) {
return;
}
diff --git a/UnitTests/Views/SpinnerViewTests.cs b/UnitTests/Views/SpinnerViewTests.cs
index 3a6d6c482..67f45c283 100644
--- a/UnitTests/Views/SpinnerViewTests.cs
+++ b/UnitTests/Views/SpinnerViewTests.cs
@@ -13,13 +13,13 @@ namespace UnitTests.Views {
}
- [Fact,AutoInitShutdown]
- public void TestSpinnerView_ThrottlesAnimation()
+ [Fact, AutoInitShutdown]
+ public void TestSpinnerView_ThrottlesAnimation ()
{
var view = GetSpinnerView ();
view.Redraw (view.Bounds);
-
+
var expected = "/";
TestHelpers.AssertDriverContentsWithFrameAre (expected, output);
@@ -36,7 +36,7 @@ namespace UnitTests.Views {
TestHelpers.AssertDriverContentsWithFrameAre (expected, output);
}
[Fact, AutoInitShutdown]
- public void TestSpinnerView_NoThrottle()
+ public void TestSpinnerView_NoThrottle ()
{
var view = GetSpinnerView ();
view.SpinDelayInMilliseconds = 0;
@@ -57,8 +57,8 @@ namespace UnitTests.Views {
private SpinnerView GetSpinnerView ()
{
- var view = new SpinnerView ();
-
+ var view = new SpinnerView ();
+
Application.Top.Add (view);
Application.Begin (Application.Top);