Example #1
0
 public MeasuringLoader(DeviceContext deviceContext, MeasuringSubscriptionSet measuringSubscriptionSet, IMeasuringMonitor measuringMonitor, RelayCommand dependentCommand, FragmentOptionToggleCommandViewModel readCycleCommand)
 {
     _deviceContext            = deviceContext;
     _measuringSubscriptionSet = measuringSubscriptionSet;
     _measuringMonitor         = measuringMonitor;
     this._dependentCommand    = dependentCommand;
     _readCycleCommand         = readCycleCommand;
 }
        public MeasuringMonitorEditorViewModel(ITypesContainer container,
                                               IMeasuringGroupEditorViewModelFactory measuringGroupEditorViewModelFactory,
                                               IMeasuringMonitor measuringMonitor, IApplicationGlobalCommands applicationGlobalCommands)
        {
            _container = container;
            _measuringGroupEditorViewModelFactory = measuringGroupEditorViewModelFactory;
            _measuringMonitor              = measuringMonitor;
            _applicationGlobalCommands     = applicationGlobalCommands;
            MeasuringGroupEditorViewModels = new ObservableCollection <IMeasuringGroupEditorViewModel>();
            AddMeasuringGroupCommand       = new RelayCommand(OnAddMeasuringGroupExecute);
            DeleteGroupCommand             = new RelayCommand <object>(OnDeleteGroupExecute);
            SetElementLeftCommand          = new RelayCommand <object>(OnSetElementLeftExecute, CanExecuteSetElementLeft);
            SetElementRightCommand         = new RelayCommand <object>(OnSetElementRightExecute, CanExecuteSetElementRight);
            CheckElementsPositionCommand   = new RelayCommand(() =>
            {
                (SetElementLeftCommand as RelayCommand <object>)?.RaiseCanExecuteChanged();
                (SetElementRightCommand as RelayCommand <object>)?.RaiseCanExecuteChanged();
            });
            var r = new GongSolutions.Wpf.DragDrop.DefaultDragHandler();

            OpenConfigurationSettingsCommand = new RelayCommand(OnOpenConfigurationSettingsExecute);
        }