Ejemplo n.º 1
0
        private void Select(Label labelViewModel)
        {
            // Finde vertex
            var vertex = _vertexLookup[labelViewModel.VertexId];

            Select(vertex);
        }
Ejemplo n.º 2
0
        private void HighlightVertexAndAllConnectedElements(Label labelViewModel)
        {
            // Same as vertex
            var vertex = _vertexLookup[labelViewModel.VertexId];

            HighlightVertexAndAllConnectedElements(vertex);
        }
Ejemplo n.º 3
0
        private void CreateLabelViewModel(string vertexId, string label, double angle, Size size)
        {
            var labelViewModel = new Label(vertexId, label, angle, size);

            labelViewModel.MouseEnterCommand = new DelegateCommand(() => Select(labelViewModel));
            labelViewModel.MouseLeaveCommand = new DelegateCommand(() => Select((Vertex)null));
            _labelViewModels.Add(labelViewModel);
        }
Ejemplo n.º 4
0
        private void CreateLabelViewModel(string vertexId, string label, double angle, Size size)
        {
            var labelViewModel = new Label(vertexId, label, angle, size);

            labelViewModel.MouseEnterCommand = new DelegateCommand(() => HighlightVertexAndAllConnectedElements(labelViewModel));
            labelViewModel.MouseLeaveCommand = new DelegateCommand(() => ClearSelection());
            _labelViewModels.Add(labelViewModel);
        }