using System.Text;
using Caliburn.Micro;
using Pithos.Client.WPF.Converters;
+using Pithos.Client.WPF.Utils;
using Pithos.Core;
using Pithos.Interfaces;
private string _reason;
public string Reason
{
- get { return _reason; }
+ get
+ {
+ return _reason;
+ }
set
{
_reason = value;
get { return _conflicts; }
}
+ public bool HasConflicts
+ {
+ get { return Conflicts!=null && Conflicts.Count > 0; }
+ }
+
public string[] Actions
{
get { return new[] {"Keep Local", "Keep Server", "Keep Both"}; }
select state;
var conflicts = from state in fileStates
let info=FileInfoExtensions.FromPath(state.FilePath)
- select new ConflictFile {FilePath = state.FilePath,Reason=state.ConflictReason,LocalModified = info.LastWriteTime};
+ select new ConflictFile
+ {
+ FilePath = state.FilePath,
+ Reason=state.ConflictReason??state.FileStatus.Name() ,
+ LocalModified = info.LastWriteTime
+ };
_conflicts = new ObservableCollection<ConflictFile>(conflicts.ToList());
}