@@ -38,13 +38,12 @@ public override int GetHashCode()
3838
3939 #region Properties
4040
41- private string text = "" ;
4241 public string Text
4342 {
44- get { return text ; }
43+ get ;
4544 set
4645 {
47- text = value ;
46+ field = value ;
4847 TrimmedText = value . Trim ( ) ;
4948 hash = value . GetHashCode ( ) ;
5049
@@ -53,44 +52,46 @@ public string Text
5352 hashNoWhitespace = textNoWhitespace . GetHashCode ( ) ;
5453 IsWhitespaceLine = textNoWhitespace == "" ;
5554
56- characters = null ;
57- trimmedCharacters = null ;
55+ Characters = null ;
56+ TrimmedCharacters = null ;
5857
5958 TextSegments . Clear ( ) ;
6059 AddTextSegment ( value , Type ) ;
6160 }
62- }
61+ } = "" ;
6362
6463 public string TrimmedText { get ; private set ; }
6564
6665 public ObservableCollection < TextSegment > TextSegments { get ; private set ; } = [ ] ;
6766
6867 public bool IsWhitespaceLine { get ; private set ; }
6968
70- private List < char > characters ;
7169 public List < char > Characters
7270 {
7371 get
7472 {
75- if ( characters == null )
73+ if ( field == null )
7674 {
77- characters = [ .. text . ToCharArray ( ) ] ;
75+ field = [ .. Text . ToCharArray ( ) ] ;
7876 }
79- return characters ;
77+ return field ;
8078 }
79+
80+ private set ;
8181 }
8282
83- private List < char > trimmedCharacters ;
8483 public List < char > TrimmedCharacters
8584 {
8685 get
8786 {
88- if ( trimmedCharacters == null )
87+ if ( field == null )
8988 {
90- trimmedCharacters = [ .. TrimmedText . ToCharArray ( ) ] ;
89+ field = [ .. TrimmedText . ToCharArray ( ) ] ;
9190 }
92- return trimmedCharacters ;
91+ return field ;
9392 }
93+
94+ private set ;
9495 }
9596
9697 public int ? LineIndex { get ; set ; }
@@ -99,15 +100,14 @@ public List<char> TrimmedCharacters
99100
100101 public Dictionary < int ? , float > MatchFactions { get ; } = [ ] ;
101102
102- private TextState type ;
103103 public TextState Type
104104 {
105- get { return type ; }
105+ get ;
106106 set
107107 {
108- if ( type != value )
108+ if ( field != value )
109109 {
110- type = value ;
110+ field = value ;
111111 TextSegments . Clear ( ) ;
112112 AddTextSegment ( Text , value ) ;
113113 }
@@ -120,23 +120,23 @@ public bool IsFiller
120120 {
121121 get
122122 {
123- return type == TextState . Filler || type == TextState . MovedFiller ;
123+ return Type == TextState . Filler || Type == TextState . MovedFiller ;
124124 }
125125 }
126126
127- public SolidColorBrush BackgroundBrush
127+ public Brush BackgroundBrush
128128 {
129129 get
130130 {
131- return AppSettings . GetFileBackground ( type ) ;
131+ return AppSettings . GetFileBackground ( Type ) ;
132132 }
133133 }
134134
135- public SolidColorBrush ForegroundBrush
135+ public Brush ForegroundBrush
136136 {
137137 get
138138 {
139- return AppSettings . GetFileForeground ( type ) ;
139+ return AppSettings . GetFileForeground ( Type ) ;
140140 }
141141 }
142142
0 commit comments