@@ -179,11 +179,11 @@ private void LabelClick(object sender, MouseButtonEventArgs e)
179
179
// DefLabels.Add(lbl);
180
180
//}
181
181
182
- // Set as number no matter what
183
- lbl . Content = Const ;
184
- lbl . FontWeight = FontWeights . Bold ;
185
- lbl . Foreground = DimGray ;
186
- DefLabels . Add ( lbl ) ;
182
+ // Set as number no matter what // CANCELED
183
+ // lbl.Content = Const;
184
+ // lbl.FontWeight = FontWeights.Bold;
185
+ // lbl.Foreground = DimGray;
186
+ // DefLabels.Add(lbl);
187
187
188
188
// If X selected delete the number
189
189
if ( Const is "X" )
@@ -194,7 +194,28 @@ private void LabelClick(object sender, MouseButtonEventArgs e)
194
194
DefLabels . Remove ( lbl ) ;
195
195
}
196
196
197
+
198
+ else if ( Const == lbl . Content )
199
+ {
200
+ lbl . Content = "" ;
201
+ lbl . FontWeight = FontWeights . Regular ;
202
+ lbl . Foreground = Black ;
203
+ DefLabels . Remove ( lbl ) ;
204
+ }
205
+
206
+ else
207
+ {
208
+ lbl . Content = Const ;
209
+ lbl . FontWeight = FontWeights . Bold ;
210
+ lbl . Foreground = DimGray ;
211
+ DefLabels . Add ( lbl ) ;
212
+ }
213
+
197
214
// Error Finding Code
215
+ foreach ( Label clrlbl in DefLabels )
216
+ {
217
+ clrlbl . Foreground = DimGray ;
218
+ }
198
219
if ( CheckPuzzle ( ) . Item1 == false )
199
220
{
200
221
Console . WriteLine ( "Error in Puzzle" ) ;
@@ -203,10 +224,11 @@ private void LabelClick(object sender, MouseButtonEventArgs e)
203
224
}
204
225
else if ( CheckPuzzle ( ) . Item1 == true )
205
226
{
206
- foreach ( Label clrlbl in DefLabels )
207
- {
208
- clrlbl . Foreground = DimGray ;
209
- }
227
+ // Vanity code
228
+ //foreach (Label clrlbl in DefLabels)
229
+ //{
230
+ // clrlbl.Foreground = DimGray;
231
+ //}
210
232
}
211
233
}
212
234
0 commit comments