Revision 69588a95 trunk/Pithos.Client.WPF/FileProperties/ConflictsViewModel.cs
b/trunk/Pithos.Client.WPF/FileProperties/ConflictsViewModel.cs | ||
---|---|---|
9 | 9 |
using System.Text; |
10 | 10 |
using Caliburn.Micro; |
11 | 11 |
using Pithos.Client.WPF.Converters; |
12 |
using Pithos.Client.WPF.Utils; |
|
12 | 13 |
using Pithos.Core; |
13 | 14 |
using Pithos.Interfaces; |
14 | 15 |
|
... | ... | |
45 | 46 |
private string _reason; |
46 | 47 |
public string Reason |
47 | 48 |
{ |
48 |
get { return _reason; } |
|
49 |
get |
|
50 |
{ |
|
51 |
return _reason; |
|
52 |
} |
|
49 | 53 |
set |
50 | 54 |
{ |
51 | 55 |
_reason = value; |
... | ... | |
91 | 95 |
get { return _conflicts; } |
92 | 96 |
} |
93 | 97 |
|
98 |
public bool HasConflicts |
|
99 |
{ |
|
100 |
get { return Conflicts!=null && Conflicts.Count > 0; } |
|
101 |
} |
|
102 |
|
|
94 | 103 |
public string[] Actions |
95 | 104 |
{ |
96 | 105 |
get { return new[] {"Keep Local", "Keep Server", "Keep Both"}; } |
... | ... | |
105 | 114 |
select state; |
106 | 115 |
var conflicts = from state in fileStates |
107 | 116 |
let info=FileInfoExtensions.FromPath(state.FilePath) |
108 |
select new ConflictFile {FilePath = state.FilePath,Reason=state.ConflictReason,LocalModified = info.LastWriteTime}; |
|
117 |
select new ConflictFile |
|
118 |
{ |
|
119 |
FilePath = state.FilePath, |
|
120 |
Reason=state.ConflictReason??state.FileStatus.Name() , |
|
121 |
LocalModified = info.LastWriteTime |
|
122 |
}; |
|
109 | 123 |
_conflicts = new ObservableCollection<ConflictFile>(conflicts.ToList()); |
110 | 124 |
|
111 | 125 |
} |
Also available in: Unified diff