2 using System.Windows.Controls;
5 namespace Pithos.Client.WPF {
6 using System.ComponentModel.Composition;
8 [Export(typeof(IShell))]
9 public class ShellViewModel : ViewAware, IShell
13 protected override void OnViewAttached(object view, object context)
15 var window = (Window)view;
16 window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
17 window.ShowInTaskbar = false;
19 base.OnViewAttached(view, context);
23 protected override void OnViewLoaded(object view)
25 var window = (Window) view;
28 base.OnViewLoaded(view);
32 #region Status Properties
34 private string _statusMessage;
35 public string StatusMessage
37 get { return _statusMessage; }
40 _statusMessage = value;
41 NotifyOfPropertyChange(()=>StatusMessage);
45 private string _usageMessage;
46 public string UsageMessage
48 get { return _usageMessage; }
51 _usageMessage = value;
52 NotifyOfPropertyChange(()=>UsageMessage);
56 private readonly IObservableCollection<FileEntry> _recentFiles=new BindableCollection<FileEntry>();
57 public IObservableCollection<FileEntry> RecentFiles
59 get { return _recentFiles; }
65 public void ShowPreferences()
67 var window = (Window) this.GetView();
68 window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
72 public void OpenPithosFolder()
77 public void GoToSite()
82 public void ToggleSynching()
87 public void SaveChanges()
89 var window = (Window)GetView();
93 public void RejectChanges()
95 var window=(Window)GetView();