コード例 #1
0
        public MeasurableQuantityEditViewModel()
        {
            AddMeasurementUnitCommand = new DelegateCommand(
                () =>
            {
                Views.MeasurementUnitCreationDialog creationDialog = new Views.MeasurementUnitCreationDialog();
                creationDialog.MeasurableQuantityInstance          = _measurableQuantityInstance;
                creationDialog.CanModifyQuantity = false;

                if (creationDialog.ShowDialog() == true)
                {
                    RaisePropertyChanged("UnitOfMeasurementList");
                }
            });
        }
コード例 #2
0
        public MeasurementUnitMainViewModel(IEventAggregator eventAggregator,
                                            IDataService <LabDbEntities> labDbData)
        {
            _eventAggregator = eventAggregator;
            _labDbData       = labDbData;

            NewUnitCommand = new DelegateCommand(
                () =>
            {
                Views.MeasurementUnitCreationDialog creationDialog = new Views.MeasurementUnitCreationDialog();

                if (creationDialog.ShowDialog() == true)
                {
                    RaisePropertyChanged("UnitOfMeasurementList");
                }
            });
        }