예제 #1
0
        public ListViewModel(IMammaRepository mammaRepository)
        {
            _mammaRepository = mammaRepository;

            DeleteCommand = new RelayCommand(x => Delete(), x => SelectedItem != null);
            ExportCommand = new RelayCommand(x => Export(), x => SelectedItem != null);

            LoadData();
        }
예제 #2
0
        private void InitializeCommand()
        {
            SaveCommand = new RelayCommand(x => ManualSave(), x => _isChanged && _isValid);
            GotoListCommand = new RelayCommand(x => ShowList());
            ExportCommand = new RelayCommand(x => Export(), x => _isValid);

            AddFFCommnad = new RelayCommand(x => AddFocalFormation(), x => AreFocalFormations);
            DeleteFFComand = new RelayCommand(x => DeleteFocalFormation(),
                x => AreFocalFormations && SelectedFocalFormation != null);
            CopyFFComand = new RelayCommand(x => CopyFocalFormation(),
                x => AreFocalFormations && SelectedFocalFormation != null);

            AddCystCommnad = new RelayCommand(x => AddCyst(), x => AreCysts);
            DeleteCystComand = new RelayCommand(x => DeleteCyst(), x => AreCysts && SelectedCyst != null);
            CopyCystComand = new RelayCommand(x => CopyCyst(), x => AreCysts && SelectedCyst != null);
        }