source: extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdDeleteTrace.cs @ 11926

Last change on this file since 11926 was 11926, checked in by bayral, 13 years ago

New step for piwigowpf

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