public MemoryExplorerListItemViewModel(MemoryExplorerViewModel memoryExplorer)
        {
            if (memoryExplorer == null)
                throw new ArgumentNullException("memoryExplorer");

            _memoryExplorer = memoryExplorer;
        }
        void DeactivateViewModel()
        {
            MemoryExplorerViewModel vm = base.DataContext as MemoryExplorerViewModel;

            if (vm != null)
            {
                vm.Deactivate();
            }
        }
        void Grid_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            MemoryExplorerViewModel viewModel = base.DataContext as MemoryExplorerViewModel;

            if (viewModel != null)
            {
                e.Handled = viewModel.IsExploringElementTree;
            }
        }
        void NotifyViewModelOfNewVisualParent()
        {
            MemoryExplorerViewModel viewModel = base.DataContext as MemoryExplorerViewModel;

            if (viewModel != null)
            {
                viewModel.IsViewLoaded = (VisualTreeHelper.GetParent(this) != null);
            }
        }
Example #5
0
        internal ViewModelBase FindInputVariableForNewScriptorium()
        {
            MemoryExplorerViewModel memoryExplorer =
                this.Workspaces.FirstOrDefault(ws => ws is MemoryExplorerViewModel)
                as MemoryExplorerViewModel;

            if (memoryExplorer == null)
            {
                return(null);
            }

            return(memoryExplorer.SelectedObject);
        }
        public BreadcrumbTrailViewModel(MemoryExplorerViewModel memoryExplorer)
        {
            if (memoryExplorer == null)
                throw new ArgumentNullException("memoryExplorer");

            _memoryExplorer = memoryExplorer;
            _memoryExplorer.PropertyChanged += this.OnMemoryExplorerPropertyChanged;
            _previousSelectedObject = _memoryExplorer.SelectedObject;

            _breadcrumbsInternal = new ObservableCollection<IBreadcrumb>();
            _breadcrumbsInternal.Add(new CurrentBreadcrumbViewModel(_memoryExplorer));
            _breadcrumbsReadOnly = new ReadOnlyObservableCollection<IBreadcrumb>(_breadcrumbsInternal);
        }
Example #7
0
        public ObjectViewModel(object instance, MemoryExplorerViewModel memoryExplorer, MemoryExplorerListItemViewModel referencedBy)
        {
            if (instance == null)
                throw new ArgumentNullException("instance");

            if (memoryExplorer == null)
                throw new ArgumentNullException("memoryExplorer");

            _instance = instance;
            _memoryExplorer = memoryExplorer;
            _referencedBy = referencedBy;
            _filterSettings = new MemoryExplorerListFilterSettingsViewModel(_memoryExplorer);

            base.DisplayName = _instance.GetType().FullName;
        }