Beispiel #1
0
        public ShellViewModel(
            IMatrixViewModel matrix,
            IMatrixSettingsViewModel matrixSettings,
            IEventStream eventStream)
        {
            this.Matrix         = matrix;
            this.MatrixSettings = matrixSettings;

            eventStream.Subscribe <MatrixChanged>(OnMatrixChanged);
        }
Beispiel #2
0
        public ElementTreeItemViewModel(IMatrixViewModel matrixViewModel, IDsmElement element, int depth)
        {
            _children = new List <ElementTreeItemViewModel>();
            _parent   = null;
            Element   = element;
            Depth     = depth;
            Color     = MatrixColorConverter.GetColor(depth);

            MoveCommand                  = matrixViewModel.ChangeElementParentCommand;
            MoveUpElementCommand         = matrixViewModel.MoveUpElementCommand;
            MoveDownElementCommand       = matrixViewModel.MoveDownElementCommand;
            SortElementCommand           = matrixViewModel.SortElementCommand;
            ToggleElementExpandedCommand = matrixViewModel.ToggleElementExpandedCommand;
        }