This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ObservableCollection<SudokuRowViewModel> Rows | |
{ | |
get | |
{ | |
return _rows; | |
} | |
set | |
{ | |
_rows = value; | |
NotifyPropertyChanged(() => Rows); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ExpressionExtensions | |
{ | |
public static string GetMemberName<T>(this Expression<Func<T>> input) | |
{ | |
if (input == null) | |
return null; | |
if (input.Body.NodeType != ExpressionType.MemberAccess) | |
return null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private RelayCommand _newGameCommand; | |
public RelayCommand NewGame | |
{ | |
get | |
{ | |
return _newGameCommand ?? (_newGameCommand = new RelayCommand(CreateNewBoardForCurrentLevel)); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RelayCommand : ICommand | |
{ | |
private readonly Action _theCommand; | |
private readonly Func<object, bool> _canExecute; | |
public RelayCommand(Action theCommand, Func<object, bool> canExecute = null) | |
{ | |
_theCommand = theCommand; | |
_canExecute = canExecute; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public RelayCommand Undo | |
{ | |
get | |
{ | |
return _undoCommand ?? (_undoCommand = new RelayCommand(UndoAction, o => _remembrall.HasActions)); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ItemsControl ItemsSource="{Binding Rows}" | |
Grid.Column="1" | |
HorizontalAlignment="Center"> | |
... | |
<Popup HorizontalAlignment="Center" | |
VerticalAlignment="Center" | |
VerticalOffset="-150" | |
HorizontalOffset="-100" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IHandle<TRequest> | |
{ | |
void Handle(TRequest request); | |
} |
OlderNewer