public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer) { //this.persister = persister; //makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker)); //showEdit = new RedirectToEditCommand(editUrlManager); //clone = new CloneCommand(); //unpublishedDate = new EnsureNotPublishedCommand(); // moved to StateChanger //ensurePublishedDate = new EnsurePublishedCommand(); // moved to StateChanger this.security = security; save = new SaveCommand(persister); delete = new DeleteCommand(persister.Repository); replaceMaster = new ReplaceMasterCommand(versionMaker); makeVersion = new MakeVersionCommand(versionMaker); useDraftCmd = new UseDraftCommand(versionMaker); saveOnPageVersion = new SaveOnPageVersionCommand(versionMaker); draftState = new UpdateContentStateCommand(changer, ContentState.Draft); publishedState = new UpdateContentStateCommand(changer, ContentState.Published); updateObject = new UpdateObjectCommand(); useMaster = new UseMasterCommand(); validate = new ValidateCommand(); saveActiveContent = new ActiveContentSaveCommand(); moveToPosition = new MoveToPositionCommand(); updateReferences = new UpdateReferencesCommand(); }
public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer) { this.persister = persister; makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker)); replaceMaster = new ReplaceMasterCommand(versionMaker); makeVersion = new MakeVersionCommand(versionMaker); useNewVersion = new UseNewVersionCommand(versionMaker); updateObject = new UpdateObjectCommand(); delete = new DeleteCommand(persister.Repository); showPreview = new RedirectToPreviewCommand(adapters); showEdit = new RedirectToEditCommand(editUrlManager); useMaster = new UseMasterCommand(); clone = new CloneCommand(); validate = new ValidateCommand(); this.security = security; save = new SaveCommand(persister); incrementVersionIndex = new IncrementVersionIndexCommand(versionMaker); draftState = new UpdateContentStateCommand(changer, ContentState.Draft); publishedState = new UpdateContentStateCommand(changer, ContentState.Published); saveActiveContent = new ActiveContentSaveCommand(); moveToPosition = new MoveToPositionCommand(); unpublishedDate = new EnsureNotPublishedCommand(); publishedDate = new EnsurePublishedCommand(); updateReferences = new UpdateReferencesCommand(); }
public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer) { this.persister = persister; makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker)); replaceMaster = new ReplaceMasterCommand(versionMaker); makeVersion = new MakeVersionCommand(versionMaker); useNewVersion = new UseNewVersionCommand(versionMaker); updateObject = new UpdateObjectCommand(); delete = new DeleteCommand(persister.Repository); showPreview = new RedirectToPreviewCommand(adapters); showEdit = new RedirectToEditCommand(editUrlManager); useMaster = new UseMasterCommand(); clone = new CloneCommand(); validate = new ValidateCommand(); this.security = security; save = new SaveCommand(persister); incrementVersionIndex = new IncrementVersionIndexCommand(versionMaker); draftState = new UpdateContentStateCommand(changer, ContentState.Draft); publishedState = new UpdateContentStateCommand(changer, ContentState.Published); saveActiveContent = new ActiveContentSaveCommand(); moveToPosition = new MoveToPositionCommand(); unpublishedDate = new EnsureNotPublishedCommand(); publishedDate = new EnsurePublishedCommand(); updateReferences = new UpdateReferencesCommand(); }
public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer) { //this.persister = persister; //makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker)); //showEdit = new RedirectToEditCommand(editUrlManager); //clone = new CloneCommand(); //unpublishedDate = new EnsureNotPublishedCommand(); // moved to StateChanger //ensurePublishedDate = new EnsurePublishedCommand(); // moved to StateChanger this.security = security; save = new SaveCommand(persister); delete = new DeleteCommand(persister.Repository); replaceMaster = new ReplaceMasterCommand(versionMaker); makeVersion = new MakeVersionCommand(versionMaker); useDraftCmd = new UseDraftCommand(versionMaker); saveOnPageVersion = new SaveOnPageVersionCommand(versionMaker); draftState = new UpdateContentStateCommand(changer, ContentState.Draft); publishedState = new UpdateContentStateCommand(changer, ContentState.Published); updateObject = new UpdateObjectCommand(); useMaster = new UseMasterCommand(); validate = new ValidateCommand(); saveActiveContent = new ActiveContentSaveCommand(); moveToPosition = new MoveToPositionCommand(); updateReferences = new UpdateReferencesCommand(); }
public MainWindowViewModel() { controllerSequencer = new ControllerSequencer(Properties.Settings.Default.RoboAddress, new ControllerConfiguration(), new ApplicationConfiguration() { ApplicationName = "RoboterApp" }); this.PositionNames = new ObservableCollection <string>(this.controllerSequencer.GetPositionNames()); BackwardForwardPositionController = controllerSequencer.ConfigureMotorPositionController(new MotorConfiguration { Motor = Motor.Two, ReferencingDirection = Direction.Left, ReferencingSpeed = Speed.Maximal, ReferencingFinePositioningSpeed = Speed.Slow, ReferencingInput = DigitalInput.Two, ReferencingInputState = false, Limit = 700 }); MoveBackwardCommand = new ContinuousMoveAxisCommand(this.BackwardForwardPositionController, Direction.Left); MoveForwardCommand = new ContinuousMoveAxisCommand(this.BackwardForwardPositionController, Direction.Right); UpDownPositionController = controllerSequencer.ConfigureMotorPositionController(new MotorConfiguration { Motor = Motor.Three, ReferencingDirection = Direction.Left, ReferencingSpeed = Speed.Fast, ReferencingFinePositioningSpeed = Speed.Slow, ReferencingInput = DigitalInput.Three, ReferencingInputState = false, Limit = 2000 }); MoveUpCommand = new ContinuousMoveAxisCommand(this.UpDownPositionController, Direction.Left); MoveDownCommand = new ContinuousMoveAxisCommand(this.UpDownPositionController, Direction.Right); TurnLeftRightPositionController = controllerSequencer.ConfigureMotorPositionController(new MotorConfiguration { Motor = Motor.One, ReferencingDirection = Direction.Right, ReferencingSpeed = Speed.Average, ReferencingFinePositioningSpeed = Speed.Slow, ReferencingInput = DigitalInput.One, ReferencingInputState = false, Limit = 2200 }); TurnLeftCommand = new ContinuousMoveAxisCommand(this.TurnLeftRightPositionController, Direction.Left); TurnRightCommand = new ContinuousMoveAxisCommand(this.TurnLeftRightPositionController, Direction.Right); OpenCloseClampPositionController = controllerSequencer.ConfigureMotorPositionController(new MotorConfiguration { Motor = Motor.Four, ReferencingDirection = Direction.Left, ReferencingSpeed = Speed.Quick, ReferencingFinePositioningSpeed = Speed.Slow, ReferencingInput = DigitalInput.Four, ReferencingInputState = false, Limit = 15, IsSaveable = false }); OpenClampCommand = new ContinuousMoveAxisCommand(this.OpenCloseClampPositionController, Direction.Left); CloseClampCommand = new ContinuousMoveAxisCommand(this.OpenCloseClampPositionController, Direction.Right); ReferenceAxisCommand = new ReferenceAxisCommand(TurnLeftRightPositionController, UpDownPositionController, BackwardForwardPositionController, OpenCloseClampPositionController); SavePositionCommand = new SavePositionCommand(this.controllerSequencer, this.PositionNames); MoveToPositionCommand = new MoveToPositionCommand(this.controllerSequencer, this); this.sequenceCommandLogic = new SequenceCommandLogic(this.controllerSequencer, this.BackwardForwardPositionController, this.UpDownPositionController, this.TurnLeftRightPositionController, this.OpenCloseClampPositionController); StartSequenceCommand = new StartSequenceCommand(this.sequenceCommandLogic); AlarmSoundCommand = new AlarmSoundCommand(controllerSequencer); controllerSequencer.CommunicationLoopCyleTimeChanges.Subscribe(OnCommunicationLoopCycleTimeUpdate); controllerSequencer.CommunicationExceptions.Subscribe(OnCommunicationLoopExcpetion); controllerSequencer.ControllerConnectionStateChanges.Subscribe(OnControllerConnectionStateChanged); controllerSequencer.CommunicationLoopBlockingEvents.Subscribe(OnCommunicationLoopBlocked); CurrentControllerConnectionState = controllerSequencer.CurrentlyConnectedToController; }