Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using Com.Piwigo.Lib.IService; |
---|
4 | using Com.Piwigo.Wpf.DTO; |
---|
5 | using Com.Piwigo.Lib.DTO; |
---|
6 | using Com.Piwigo.Wpf.DTO.Helper; |
---|
7 | using Com.Piwigo.Wpf.Helper; |
---|
8 | using Com.Piwigo.Wpf.Service; |
---|
9 | using System.Windows.Input; |
---|
10 | |
---|
11 | namespace Com.Piwigo.Wpf.Command |
---|
12 | { |
---|
13 | public static class PwgCmdSelectImageInAlbum |
---|
14 | { |
---|
15 | public static DelegateCommand Command = new DelegateCommand(Execute, CanExecute); |
---|
16 | |
---|
17 | private static void Execute(object obj) |
---|
18 | { |
---|
19 | foreach (PwgImageWPF imgWpf in PwgModelManager.Instance.ImageList) |
---|
20 | { |
---|
21 | if (imgWpf.IsSelected) |
---|
22 | { |
---|
23 | PwgModelManager.Instance.ImageShown = imgWpf; |
---|
24 | } |
---|
25 | } |
---|
26 | } |
---|
27 | |
---|
28 | private static bool CanExecute(object obj) |
---|
29 | { |
---|
30 | bool ret = false; |
---|
31 | |
---|
32 | if (PwgModelManager.Instance.ImageList != null) |
---|
33 | { |
---|
34 | ret = (PwgModelManager.Instance.ImageList.Count >= 0); |
---|
35 | } |
---|
36 | return ret; |
---|
37 | } |
---|
38 | } |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.