public CreateDynamicPanelStateCommand(DynamicPageEditorViewModel pageVM, DynamicChildNodViewModel stateVM)
        {
            _pageVM  = pageVM;
            _stateVM = stateVM;

            _index = _pageVM.DynamicChildren.IndexOf(_stateVM);

            _docService = ServiceLocator.Current.GetInstance <IDocumentService>();
        }
        public DynamicPanelStatesChangeCommand(DynamicPageEditorViewModel pageVM)
        {
            _pageVM = pageVM;

            foreach (DynamicChildNodViewModel state in _pageVM.DynamicChildren)
            {
                DynamicChildNodViewModelUndo item = new DynamicChildNodViewModelUndo(state, _pageVM.DynamicChildren.IndexOf(state));
                _oldList.Add(item);
            }
        }
예제 #3
0
        public FlickingStateManagerViewModel(DynamicPageEditorViewModel OwnerPageVM)
        {
            this.AddDeviceCommand    = new DelegateCommand <object>(AddDeviceExecute);
            this.MoveUpCommand       = new DelegateCommand <object>(MoveUpExecute, CanExecuteMoveUp);
            this.MoveDownCommand     = new DelegateCommand <object>(MoveDownExecute, CanExecuteMoveDown);
            this.DeleteDeviceCommand = new DelegateCommand <object>(DeleteDeviceExecute, CanExecuteDeleteDevice);
            this.CloseWindowCommand  = new DelegateCommand <Window>(CloseWindowExecute);

            //new
            DynamicChildren = OwnerPageVM.DynamicChildren;
            foreach (DynamicChildNodViewModel item in DynamicChildren)
            {
                item.PropertyChanged += PagePropertyChangedHandler;
            }
            DyncWidget = OwnerPageVM.DyncWidget;
        }