Skip to content

Commit 2bfb90c

Browse files
committed
Swapped private property to variable
1 parent 5300e78 commit 2bfb90c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

GradientTheme/Controls/TyperLabel.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class TyperLabel : Label
1010
private const int TypeSpeed = 150;
1111
private const int TimerSpeed = 3;
1212
private bool m_typing;
13-
private string WindowTitle { get; set; }
13+
private string m_windowTitle;
1414
private string m_lastTitle;
1515

1616
private string[] m_titles;
@@ -20,13 +20,13 @@ public string[] Titles
2020
set
2121
{
2222
m_titles = value;
23-
Content = WindowTitle = GetRandomTitle();
23+
Content = m_windowTitle = GetRandomTitle();
2424
}
2525
}
2626

2727
public TyperLabel()
2828
{
29-
var binding = new Binding("WindowTitle");
29+
var binding = new Binding("m_windowTitle");
3030
BindingOperations.SetBinding(this, TyperLabel.ContentProperty, binding);
3131

3232
var timer = new Timer();
@@ -43,23 +43,23 @@ private void TimerOnElapsed(object? sender, ElapsedEventArgs e)
4343
{
4444
m_typing = true;
4545

46-
m_lastTitle = WindowTitle;
46+
m_lastTitle = m_windowTitle;
4747

48-
for (var i = WindowTitle.Length - 1; i < WindowTitle.Length; i--)
48+
for (var i = m_windowTitle.Length - 1; i < m_windowTitle.Length; i--)
4949
{
5050
if (i < 0)
5151
break;
5252

53-
WindowTitle = WindowTitle.Remove(i);
54-
SafeThreadInvoker(() => Content = WindowTitle);
53+
m_windowTitle = m_windowTitle.Remove(i);
54+
SafeThreadInvoker(() => Content = m_windowTitle);
5555
Thread.Sleep(TypeSpeed);
5656
}
5757

58-
WindowTitle = GetRandomTitle();
58+
m_windowTitle = GetRandomTitle();
5959

60-
for (var i = 0; i <= WindowTitle.Length; i++)
60+
for (var i = 0; i <= m_windowTitle.Length; i++)
6161
{
62-
var tmp = WindowTitle.Substring(0, i);
62+
var tmp = m_windowTitle.Substring(0, i);
6363
SafeThreadInvoker(() => Content = tmp);
6464
Thread.Sleep(TypeSpeed);
6565
}

0 commit comments

Comments
 (0)