Beispiel #1
0
        public void Dispose()
        {
            RelatedEntityListBoxViewModel.ItemSelected            -= OnRelatedEntitySelected;
            RelatedEntityListBoxViewModel.Items.CollectionChanged -= OnRelatedEntityCollectionChanged;
            RelatedEntityListBoxViewModel.Dispose();

            UnsubscribeFromDiagramEvents();
            UnsubscribeFromViewportEvents();

            DiagramViewportViewModel.Dispose();
        }
Beispiel #2
0
        public DiagramViewModel(IArrangedDiagram diagram, double minZoom, double maxZoom, double initialZoom)
            : base(diagram)
        {
            DiagramViewportViewModel = new DiagramViewportViewModel(diagram, minZoom, maxZoom, initialZoom);

            RelatedEntityListBoxViewModel = new RelatedEntityListBoxViewModel(diagram);
            RelatedEntityListBoxViewModel.ItemSelected            += OnRelatedEntitySelected;
            RelatedEntityListBoxViewModel.Items.CollectionChanged += OnRelatedEntityCollectionChanged;

            PopupTextViewModel = new AutoHidePopupTextViewModel();

            PreviewMouseDownCommand = new DelegateCommand(OnAnyMouseDownEvent);
            MouseDownCommand        = new DelegateCommand(OnUnhandledMouseDownEvent);

            SubscribeToDiagramEvents();
            SubscribeToViewportEvents();
        }
Beispiel #3
0
 private void HideRelatedEntityListBox()
 {
     DiagramViewportViewModel.UnpinDecoration();
     RelatedEntityListBoxViewModel.Hide();
 }
Beispiel #4
0
 private void OnShowRelatedEntitySelectorRequested(ShowRelatedNodeButtonViewModel diagramNodeButtonViewModel, IEnumerable <IModelEntity> modelEntities)
 {
     DiagramViewportViewModel.PinDecoration();
     RelatedEntityListBoxViewModel.Show(diagramNodeButtonViewModel, modelEntities);
 }