public TransitionViewModel(StateMachineViewModel parent, StateMachineTransition model, IViewService viewService, IMessageBoxService messageBoxService)
        {
            _parent            = parent ?? throw new ArgumentNullException(nameof(parent));
            _model             = model ?? throw new ArgumentNullException(nameof(model));
            _viewService       = viewService ?? throw new ArgumentNullException(nameof(viewService));
            _messageBoxService = messageBoxService ?? throw new ArgumentNullException(nameof(messageBoxService));

            _propertyGridSource = new Lazy <TransitionPropertyGridSource>(() => new TransitionPropertyGridSource(this));

            CommandInitialize();
            ModelInitialize();
        }
Ejemplo n.º 2
0
        public StateViewModel(State state, StateMachineViewModel parent, IViewService viewService, IMessageBoxService messageBoxService)
        {
            _model             = state ?? throw new ArgumentNullException(nameof(state));
            _viewService       = viewService ?? throw new ArgumentNullException(nameof(viewService));
            _messageBoxService = messageBoxService ?? throw new ArgumentNullException(nameof(messageBoxService));
            Parent             = parent ?? throw new ArgumentNullException(nameof(parent));

            Location            = new Point(_model.X, _model.Y);
            EditCommand         = new RelayCommand(Edit, CanEdit);
            DeleteCommand       = new RelayCommand(Delete, CanDelete);
            _propertyGridSource = new StatePropertyGridSource(this);
        }
        private void InitializeModel()
        {
            var viewService = ApplicationContainer.Container.Resolve <IViewService>();

            StateMachineViewModel = new SimulationStateMachineViewModel(_model, viewService, _messageBoxService);
        }
Ejemplo n.º 4
0
 public StateMachineInputViewModel(StateMachineInput model, StateMachineViewModel parent)
 {
     _model  = model ?? throw new ArgumentNullException(nameof(model));
     _parent = parent ?? throw new ArgumentNullException(nameof(parent));
 }
 public StateMachineOutputActionViewModel(StateMachineOutputAction model, StateMachineViewModel parent)
 {
     _model  = model ?? throw new ArgumentNullException(nameof(model));
     _parent = parent;
 }