private void GenerateGraph()
        {
            if (!_projectService.AreAllVarietiesCompared)
            {
                return;
            }

            _busyService.ShowBusyIndicatorUntilFinishDrawing();
            SelectedCorrespondence = null;
            Graph = _graphService.GenerateGlobalCorrespondencesGraph(_syllablePosition, _selectedVarieties);
        }
Пример #2
0
 private void GenerateGraph()
 {
     _busyService.ShowBusyIndicatorUntilFinishDrawing();
     SelectedCorrespondence = null;
     Graph = _graphService.GenerateGlobalCorrespondencesGraph(_syllablePosition, _selectedVarieties);
 }
Пример #3
0
        public bool ExportGlobalCorrespondencesChart(object ownerViewModel, SyllablePosition syllablePosition, int frequencyFilter)
        {
            FileDialogResult result = _dialogService.ShowSaveFileDialog("Export Global Correspondences Chart", this, new FileType("PNG image", ".png"));

            if (result.IsValid)
            {
                IBidirectionalGraph <GlobalCorrespondencesGraphVertex, GlobalCorrespondencesGraphEdge> graph = _graphService.GenerateGlobalCorrespondencesGraph(syllablePosition);

                var graphLayout = new GlobalCorrespondencesGraphLayout
                {
                    IsAnimationEnabled       = false,
                    CreationTransition       = null,
                    DestructionTransition    = null,
                    LayoutAlgorithmType      = "Grid",
                    EdgeRoutingAlgorithmType = "Bundle",
                    EdgeRoutingParameters    = new BundleEdgeRoutingParameters {
                        InkCoefficient = 0, LengthCoefficient = 1, VertexMargin = 2
                    },
                    Graph            = graph,
                    Background       = Brushes.White,
                    WeightFilter     = frequencyFilter,
                    SyllablePosition = syllablePosition
                };
                graphLayout.Resources[typeof(EdgeControl)] = System.Windows.Application.Current.Resources["GlobalCorrespondenceEdgeControlStyle"];
                SaveElement(graphLayout, result.FileName, null);
                return(true);
            }

            return(false);
        }