Implement highlighting for item comments.
This commit is contained in:
@ -45,7 +45,7 @@ namespace zaaReloaded2.ViewModels
|
||||
}
|
||||
set
|
||||
{
|
||||
_itemComment.Value = value;
|
||||
_value = value;
|
||||
OnPropertyChanged("Value");
|
||||
}
|
||||
}
|
||||
@ -56,42 +56,28 @@ namespace zaaReloaded2.ViewModels
|
||||
|
||||
#region Commands
|
||||
|
||||
DelegatingCommand CancelCommand
|
||||
DelegatingCommand SaveCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_cancelCommand == null)
|
||||
if (_saveCommand == null)
|
||||
{
|
||||
_cancelCommand = new DelegatingCommand(
|
||||
param => DoCancel());
|
||||
_saveCommand = new DelegatingCommand(
|
||||
param => DoSave());
|
||||
}
|
||||
return _cancelCommand;
|
||||
return _saveCommand;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Message
|
||||
|
||||
public Message<ViewModelMessageContent> CancelMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_cancelMessage == null)
|
||||
{
|
||||
_cancelMessage = new Message<ViewModelMessageContent>();
|
||||
}
|
||||
return _cancelMessage;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
public ItemCommentViewModel(ItemComment itemComment)
|
||||
{
|
||||
_itemComment = itemComment;
|
||||
_value = _itemComment.Value;
|
||||
_itemComment.IsCancelled = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -107,9 +93,10 @@ namespace zaaReloaded2.ViewModels
|
||||
|
||||
#region Private methods
|
||||
|
||||
void DoCancel()
|
||||
void DoSave()
|
||||
{
|
||||
CancelMessage.Send(new ViewModelMessageContent(this));
|
||||
_itemComment.Value = Value;
|
||||
_itemComment.IsCancelled = false;
|
||||
DoCloseView();
|
||||
}
|
||||
|
||||
@ -117,8 +104,8 @@ namespace zaaReloaded2.ViewModels
|
||||
|
||||
#region Fields
|
||||
|
||||
DelegatingCommand _cancelCommand;
|
||||
Message<ViewModelMessageContent> _cancelMessage;
|
||||
string _value;
|
||||
DelegatingCommand _saveCommand;
|
||||
ItemComment _itemComment;
|
||||
|
||||
#endregion
|
||||
|
@ -319,7 +319,7 @@ namespace zaaReloaded2.ViewModels
|
||||
|
||||
bool CanUseSettings()
|
||||
{
|
||||
Commands.CanFormat();
|
||||
return Commands.CanFormat();
|
||||
}
|
||||
|
||||
void DoAddSettings()
|
||||
|
Reference in New Issue
Block a user