Skip to content
Snippets Groups Projects
Commit ac4df9fb authored by Timon Römer's avatar Timon Römer
Browse files

Changes window structure

parent 0bf00046
No related branches found
Tags
No related merge requests found
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArrowheads_002Ecs_002Fl_003AC_0021_003FUsers_003Ftimon_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Ff33d684d28eda96ce8ff511fd89719957527f5a249bf0c427bba5f237d27d_003FArrowheads_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABidirectionalGraph_002Ecs_002Fl_003AC_0021_003FUsers_003Fmp455017_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fa8e81c4118651b5932b855cf99986877c2c24685d864158c9053e4f62e213fce_003FBidirectionalGraph_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABidirectionalGraph_002Ecs_002Fl_003AC_0021_003FUsers_003Fmp455017_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fa8e81c4118651b5932b855cf99986877c2c24685d864158c9053e4f62e213fce_003FBidirectionalGraph_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEdge_002Ecs_002Fl_003AC_0021_003FUsers_003Ftimon_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fc6dec8134d4e5115e30fcbbde23a657edc52dc4585c5673fe87fae89530f2_003FEdge_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEdge_002Ecs_002Fl_003AC_0021_003FUsers_003Ftimon_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fc6dec8134d4e5115e30fcbbde23a657edc52dc4585c5673fe87fae89530f2_003FEdge_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AGeometryGraph_002Ecs_002Fl_003AC_0021_003FUsers_003Ftimon_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fec51c2d7ba4c960a9dae3716ddab555d654bcbe75d697cc141c3b2c8f247f_003FGeometryGraph_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIDictionary_00602_002Ecs_002Fl_003AC_0021_003FUsers_003Fmp455017_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb756d57b94fb4ab9aa95a9b2a97fce1fa24ea0_003Fa1_003F8276683c_003FIDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIDictionary_00602_002Ecs_002Fl_003AC_0021_003FUsers_003Fmp455017_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb756d57b94fb4ab9aa95a9b2a97fce1fa24ea0_003Fa1_003F8276683c_003FIDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ALayoutHelpers_002Ecs_002Fl_003AC_0021_003FUsers_003Ftimon_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fd0dd8419a9cbd7bcef7ea0c031796cd8197cb3c658c80b7c71ec2da3918b3_003FLayoutHelpers_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003AC_0021_003FUsers_003Ftimon_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F362e998b40631a36346249d25c3c8c712372e68c65f251adc18f8931b4a77a32_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003AC_0021_003FUsers_003Ftimon_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F362e998b40631a36346249d25c3c8c712372e68c65f251adc18f8931b4a77a32_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003AC_0021_003FUsers_003Ftimon_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F50b63217dc36f9d6edcabbd75adb3a7f68f1ebd3b4645b30614b43a9eda189_003FNode_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003AC_0021_003FUsers_003Ftimon_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F50b63217dc36f9d6edcabbd75adb3a7f68f1ebd3b4645b30614b43a9eda189_003FNode_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASplineRouter_002Ecs_002Fl_003AC_0021_003FUsers_003Ftimon_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fb2961a4f945481bf9a55f7d27e451184c68497a74672874e415414929e5d53a_003FSplineRouter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASplineRouter_002Ecs_002Fl_003AC_0021_003FUsers_003Ftimon_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fb2961a4f945481bf9a55f7d27e451184c68497a74672874e415414929e5d53a_003FSplineRouter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
......
...@@ -16,7 +16,7 @@ public static class GraphVisualizer ...@@ -16,7 +16,7 @@ public static class GraphVisualizer
foreach (var edge in flowGraph.Graph.Edges) foreach (var edge in flowGraph.Graph.Edges)
{ {
if(edge.IsBackwards) continue; //if(edge.IsBackwards) continue;
var msaglEdge = msaglGraph.AddEdge(edge.Source.Id, edge.Target.Id); var msaglEdge = msaglGraph.AddEdge(edge.Source.Id, edge.Target.Id);
......
...@@ -4,12 +4,17 @@ using System.Collections.Generic; ...@@ -4,12 +4,17 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Windows; using System.Windows;
using System.Windows.Forms.Integration; using System.Windows.Forms.Integration;
using Microsoft.Msagl.Core;
using Microsoft.Msagl.Core.Geometry;
using Microsoft.Msagl.Core.Geometry.Curves; using Microsoft.Msagl.Core.Geometry.Curves;
using Microsoft.Msagl.Core.Layout;
using Microsoft.Msagl.Core.Routing; using Microsoft.Msagl.Core.Routing;
using MsaglDrawing = Microsoft.Msagl.Drawing; using MsaglDrawing = Microsoft.Msagl.Drawing;
using Microsoft.Msagl.GraphViewerGdi; using Microsoft.Msagl.GraphViewerGdi;
using Microsoft.Msagl.Layout.Layered; using Microsoft.Msagl.Layout.Layered;
using Microsoft.Msagl.Layout.MDS;
using Microsoft.Msagl.Routing; using Microsoft.Msagl.Routing;
using Microsoft.Msagl.Routing.Rectilinear;
namespace FlowForge namespace FlowForge
...@@ -162,19 +167,39 @@ namespace FlowForge ...@@ -162,19 +167,39 @@ namespace FlowForge
_gViewer.Graph = _msaglGraph; _gViewer.Graph = _msaglGraph;
if (_nodePositions.Any()) // Set the graph and check which layout settings are applied by default
_gViewer.Graph = _msaglGraph;
// Print layout information to debug output
if (_msaglGraph.LayoutAlgorithmSettings is SugiyamaLayoutSettings)
{
Console.WriteLine("Using Sugiyama Layout");
}
else if (_msaglGraph.LayoutAlgorithmSettings is MdsLayoutSettings)
{
Console.WriteLine("Using MDS Layout");
}
else
{ {
var originalScale = _gViewer.ZoomF; Console.WriteLine("Using another layout algorithm");
}
ApplyNodePositions(_msaglGraph);
var sugiyamaSettings = new SugiyamaLayoutSettings if (_nodePositions.Any())
{ {
ApplyNodePositions(_msaglGraph);
}; var sugiyamaSettings = new SugiyamaLayoutSettings();
sugiyamaSettings.NodeSeparation = 10;
//sugiyamaSettings.EdgeRoutingSettings.EdgeRoutingMode = EdgeRoutingMode.RectilinearToCenter;
sugiyamaSettings.EdgeRoutingSettings.EdgeRoutingMode = EdgeRoutingMode.Spline;
sugiyamaSettings.EdgeRoutingSettings.Padding = 1;
sugiyamaSettings.RepetitionCoefficientForOrdering = 100;
sugiyamaSettings.EdgeRoutingSettings.KeepOriginalSpline = false;
Microsoft.Msagl.Miscellaneous.LayoutHelpers.RouteAndLabelEdges(_msaglGraph.GeometryGraph, sugiyamaSettings, _msaglGraph.GeometryGraph.Edges, 100, new CancelToken());
/*
// Step 3: Apply layout settings to the graph // Step 3: Apply layout settings to the graph
_msaglGraph.LayoutAlgorithmSettings = sugiyamaSettings; _msaglGraph.LayoutAlgorithmSettings = sugiyamaSettings;
...@@ -193,13 +218,11 @@ namespace FlowForge ...@@ -193,13 +218,11 @@ namespace FlowForge
// Set the label to the midpoint of the edge path // Set the label to the midpoint of the edge path
edge.Label.GeometryLabel.Center = edge.GeometryEdge.Curve.BoundingBox.Center; edge.Label.GeometryLabel.Center = edge.GeometryEdge.Curve.BoundingBox.Center;
} }
} }*/
//SetStraightLineEdges(_msaglGraph); //SetStraightLineEdges(_msaglGraph);
_gViewer.ZoomF = originalScale; //_gViewer.Invalidate();
_gViewer.Invalidate();
_gViewer.NeedToCalculateLayout = false; _gViewer.NeedToCalculateLayout = false;
_gViewer.Graph = _msaglGraph; _gViewer.Graph = _msaglGraph;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment