コード例 #1
0
ファイル: ListViewModel.cs プロジェクト: burukinsd/USD
        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
ファイル: MammaViewModel.cs プロジェクト: burukinsd/USD
        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);
        }