private static void Main(string[] args) { #if DEBUG && !SILVERLIGHT DisplayGeometryGraph.SetShowFunctions(); // ProximityOverlapRemoval.DebugMode = true; #endif var argsParser = new ArgsParser.ArgsParser(args); argsParser.AddOptionWithAfterStringWithHelp("-graphs", "number of graphs with circles to generate"); argsParser.AddOptionWithAfterStringWithHelp("-circles", "number of circles per graph to generate"); argsParser.AddOptionWithAfterStringWithHelp("-fcrc", "number of circles per graph to generate"); argsParser.AddOptionWithAfterStringWithHelp("-triangles", "number of triangles per graph to generate"); argsParser.AddOptionWithAfterStringWithHelp("-nodes_per_circle", "number of nodes per circle"); argsParser.AddOptionWithAfterStringWithHelp("-box_width", "the initial width of the rectangle to layout the nodes"); argsParser.AddOptionWithAfterStringWithHelp("-test_dir", "the directory of test files"); argsParser.AddOptionWithAfterStringWithHelp("-ds", "generate a number of dense spots"); argsParser.AddAllowedOptionWithHelpString("-dup", "duplicate with color"); argsParser.AddAllowedOptionWithHelpString("-dot", "load real dot files"); if (!argsParser.Parse()) { Console.WriteLine(argsParser.ErrorMessage); Console.WriteLine(argsParser.UsageString()); return; } var program = new Program(argsParser); program.Run(); }
static ArgsParser.ArgsParser SetArgsParser(string[] args) { var argsParser = new ArgsParser.ArgsParser(args); argsParser.AddAllowedOptionWithHelpString("-help", "print this message"); argsParser.AddAllowedOptionWithHelpString(QuietOption, "pops the UI if the option is not used, otherwise exits"); argsParser.AddAllowedOptionWithHelpString(BundlingOption, "use edge routing with bundles"); argsParser.AddOptionWithAfterStringWithHelp(FileOption, "the name of the input file"); argsParser.AddOptionWithAfterStringWithHelp(SvgFileNameOption, "the name of the svg output file"); argsParser.AddOptionWithAfterStringWithHelp(EdgeSeparationOption, "use specified edge separation in edge bundling"); argsParser.AddAllowedOptionWithHelpString(MdsOption, "use mds layout"); argsParser.AddAllowedOptionWithHelpString(FdOption, "use force directed layout"); argsParser.AddOptionWithAfterStringWithHelp(InkImportanceOption, "ink importance coefficient in edge bundling"); argsParser.AddOptionWithAfterStringWithHelp(TightPaddingOption, "tight padding coefficient in edge bundling"); argsParser.AddOptionWithAfterStringWithHelp(LoosePaddingOption, "loose padding coefficient in edge bundling"); argsParser.AddOptionWithAfterStringWithHelp(CapacityCoeffOption, "capacity coeffiecient in edge bundling "); argsParser.AddAllowedOptionWithHelpString(AsyncLayoutOption, "run the viewer in the async mode"); if (!argsParser.Parse()) { Console.WriteLine(argsParser.UsageString()); Environment.Exit(1); } return(argsParser); }
static ArgsParser.ArgsParser SetArgsParser(string [] args) { argsParser = new ArgsParser.ArgsParser(args); argsParser.AddAllowedOptionWithHelpString(OneTimeRunOption, "loads only one graph"); argsParser.AddAllowedOptionWithHelpString(SequentialRunOption, "no threads"); argsParser.AddAllowedOptionWithHelpString(StraightLineEdgesOption, "route straight line edges"); argsParser.AddAllowedOptionWithHelpString(NoEdgeRoutingOption, "don't route the edges"); argsParser.AddAllowedOptionWithHelpString(NoIterationsWithMajorization, "0 iterations with majorization"); argsParser.AddOptionWithAfterStringWithHelp(FileListOption, "file list"); argsParser.AddAllowedOptionWithHelpString(RoundedCornersOption, "rounded corners for boxes always"); argsParser.AddAllowedOptionWithHelpString(PrintMaxNodeDegreeOption, "print max node degree and exit"); argsParser.AddOptionWithAfterStringWithHelp(NodeSeparationOption, "node separation"); argsParser.AddOptionWithAfterStringWithHelp(NodeQuotaOption, "node quota"); argsParser.AddAllowedOption(AllowOverlapsInMds); argsParser.AddAllowedOption(RunRemoveOverlapsOption); argsParser.AddAllowedOptionWithHelpString(DrawBackgrounImageOption, "will draw the background in LG browsing - used for experimenting"); argsParser.AddAllowedOptionWithHelpString(EdgeZoomLevelsUpperBoundOption, "use upper bound in the edge zoom level algorithm"); argsParser.AddOptionWithAfterStringWithHelp(LargeLayoutThresholdOption, "sets the large layout threshold"); argsParser.AddOptionWithAfterStringWithHelp(BackgroundImageOption, "sets the background image for the large layout"); argsParser.AddOptionWithAfterStringWithHelp(MaxNodesPerTileOption, "sets the max nodes per tile for large layout"); argsParser.AddAllowedOptionWithHelpString(DoNotLayoutOption, "do not call the layout calculation"); argsParser.AddOptionWithAfterStringWithHelp(SaveMsaglOption, "saves the file into a msagl file"); argsParser.AddAllowedOption(RecoverSugiyamaTestOption); argsParser.AddAllowedOption(QuietOption); argsParser.AddAllowedOption(BundlingOption); argsParser.AddOptionWithAfterStringWithHelp(FileOption, "the name of the input file"); argsParser.AddOptionWithAfterStringWithHelp(ListOfFilesOption, "the name of the file containing a list of files"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption, "testing Constrained Delaunay Triangulation"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption0, "testing Constrained Delaunay Triangulation on a small graph"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption1, "testing threading through a CDT"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption2, "testing Constrained Delaunay Triangulation on file \'polys\'"); argsParser.AddAllowedOptionWithHelpString(ReverseXOption, "reversing X coordinate"); argsParser.AddOptionWithAfterStringWithHelp(EdgeSeparationOption, "use specified edge separation"); argsParser.AddAllowedOptionWithHelpString(MdsOption, "use mds layout"); argsParser.AddAllowedOptionWithHelpString(FdOption, "use force directed layout"); argsParser.AddAllowedOptionWithHelpString(ConstraintsTestOption, "test constraints"); argsParser.AddOptionWithAfterStringWithHelp(InkImportanceOption, "ink importance coefficient"); argsParser.AddOptionWithAfterStringWithHelp(TightPaddingOption, "tight padding coefficient"); argsParser.AddOptionWithAfterStringWithHelp(LoosePaddingOption, "loose padding coefficient"); argsParser.AddOptionWithAfterStringWithHelp(CapacityCoeffOption, "capacity coeffiecient"); argsParser.AddAllowedOptionWithHelpString(PolygonDistanceTestOption, "test Polygon.Distance"); argsParser.AddAllowedOptionWithHelpString(RandomBundlingTest, "random bundling test"); argsParser.AddAllowedOptionWithHelpString(TestCdtThreaderOption, "test CdtThreader"); argsParser.AddAllowedOptionWithHelpString(AsyncLayoutOption, "test viewer in the async mode"); argsParser.AddAllowedOptionWithHelpString(EnlargeHighDegreeNodes, "enlarge high degree nodes"); argsParser.AddAllowedOptionWithHelpString(ExitAfterLgLayoutOption, "exit after lg calculation"); if (!argsParser.Parse()) { Console.WriteLine(argsParser.UsageString()); Environment.Exit(1); } return(argsParser); }
static void Main(string[] args) { #if TEST_MSAGL DisplayGeometryGraph.SetShowFunctions(); #endif ArgsParser.ArgsParser argsParser = SetArgsParser(args); if (argsParser.OptionIsUsed("-help")) { Console.WriteLine(argsParser.UsageString()); Environment.Exit(0); } bundling = argsParser.OptionIsUsed(BundlingOption); var gviewer = new GViewer(); if (argsParser.OptionIsUsed(FdOption)) { gviewer.CurrentLayoutMethod = LayoutMethod.IcrementalLayout; } Form form = CreateForm(null, gviewer); if (argsParser.OptionIsUsed(AsyncLayoutOption)) { gviewer.AsyncLayout = true; } string fileName = argsParser.GetStringOptionValue(FileOption); if (fileName != null) { string ext = Path.GetExtension(fileName); if (ext != null) { ext = ext.ToLower(); if (ext == ".dot") { ProcessDotFile(gviewer, argsParser, fileName); } } else { Console.WriteLine("do not know how to process {0}", fileName); Environment.Exit(1); } } if (!argsParser.OptionIsUsed(QuietOption)) { Application.Run(form); } }
static ArgsParser.ArgsParser SetArgsParser(string[] args) { var argsParser = new ArgsParser.ArgsParser(args); argsParser.AddAllowedOptionWithHelpString("-help", "print the usage method"); argsParser.AddAllowedOption(RecoverSugiyamaTestOption); argsParser.AddAllowedOption(QuietOption); argsParser.AddAllowedOption(BundlingOption); argsParser.AddOptionWithAfterStringWithHelp(FileOption, "the name of the input file"); argsParser.AddOptionWithAfterStringWithHelp(SvgFileNameOption, "the name of the svg output file"); argsParser.AddOptionWithAfterStringWithHelp(ListOfFilesOption, "the name of the file containing a list of files"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption, "testing Constrained Delaunay Triangulation"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption0, "testing Constrained Delaunay Triangulation on a small graph"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption1, "testing threading through a CDT"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption2, "testing Constrained Delaunay Triangulation on file \'polys\'"); argsParser.AddAllowedOptionWithHelpString(ReverseXOption, "reversing X coordinate"); argsParser.AddOptionWithAfterStringWithHelp(EdgeSeparationOption, "use specified edge separation"); argsParser.AddAllowedOptionWithHelpString(MdsOption, "use mds layout"); argsParser.AddAllowedOptionWithHelpString(RectRoutingOption, "use rect layout"); argsParser.AddAllowedOptionWithHelpString(SplineRoutingOption, "use spline layout"); argsParser.AddAllowedOptionWithHelpString(FdOption, "use force directed layout"); argsParser.AddAllowedOptionWithHelpString(ConstraintsTestOption, "test constraints"); argsParser.AddOptionWithAfterStringWithHelp(InkImportanceOption, "ink importance coefficient"); argsParser.AddOptionWithAfterStringWithHelp(TightPaddingOption, "tight padding coefficient"); argsParser.AddOptionWithAfterStringWithHelp(LoosePaddingOption, "loose padding coefficient"); argsParser.AddOptionWithAfterStringWithHelp(CapacityCoeffOption, "capacity coeffiecient"); argsParser.AddAllowedOptionWithHelpString(PolygonDistanceTestOption, "test Polygon.Distance"); argsParser.AddAllowedOptionWithHelpString(PolygonDistanceTestOption3, "test PolygonDistance3"); argsParser.AddAllowedOptionWithHelpString(RandomBundlingTest, "random bundling test"); argsParser.AddAllowedOptionWithHelpString(TestCdtThreaderOption, "test CdtThreader"); argsParser.AddAllowedOptionWithHelpString(AsyncLayoutOption, "test viewer in the async mode"); if (!argsParser.Parse()) { Console.WriteLine(argsParser.ErrorMessage); System.Diagnostics.Debug.WriteLine(argsParser.UsageString()); Environment.Exit(1); } return(argsParser); }
static void Main(string[] args) { #if TEST_MSAGL DisplayGeometryGraph.SetShowFunctions(); #endif ArgsParser.ArgsParser argsParser = SetArgsParser(args); if (argsParser.OptionIsUsed("-help")) { Console.WriteLine(argsParser.UsageString()); Environment.Exit(0); } if (argsParser.OptionIsUsed(PolygonDistanceTestOption)) { TestPolygonDistance(); } else if (argsParser.OptionIsUsed(TestCdtThreaderOption)) { TestCdtThreader(); } else if (argsParser.OptionIsUsed(RandomBundlingTest)) { RandomBundlingTests.RsmContent(); } bundling = argsParser.OptionIsUsed(BundlingOption); var gviewer = new GViewer(); gviewer.MouseMove += Draw.GviewerMouseMove; if (argsParser.OptionIsUsed(FdOption)) { TestFD(); gviewer.CurrentLayoutMethod = LayoutMethod.IcrementalLayout; } Form form = CreateForm(null, gviewer); if (argsParser.OptionIsUsed(AsyncLayoutOption)) { gviewer.AsyncLayout = true; } string listOfFilesFile = argsParser.GetStringOptionValue(ListOfFilesOption); if (listOfFilesFile != null) { ProcessListOfFiles(listOfFilesFile, argsParser); return; } string fileName = argsParser.GetStringOptionValue(FileOption); string ext = Path.GetExtension(fileName); if (ext != null) { ext = ext.ToLower(); if (ext == ".dot") { ProcessDotFile(gviewer, argsParser, fileName); } else { if (ext == ".geom") { GeometryGraph geometryGraph = GeometryGraphReader.CreateFromFile(fileName); geometryGraph.Margins = 10; FixHookPorts(geometryGraph); // if (argsParser.OptionIsUsed(BundlingOption)) { for (int i = 0; i < 1; i++) { #if TEST_MSAGL /*DisplayGeometryGraph.ShowGraph(geometryGraph); * var l = new List<DebugCurve>(); l.AddRange(geometryGraph.Nodes.Select(n=>new DebugCurve(100,1,"black",n.BoundaryCurve))); * l.AddRange(geometryGraph.Edges.Select(e=>new DebugCurve(100,1,"black", new LineSegment(e.Source.Center,e.Target.Center)))); * foreach (var cl in geometryGraph.RootCluster.AllClustersDepthFirst()) { * l.Add(new DebugCurve(100,2,"blue",cl.BoundaryCurve)); * foreach (var node in cl.Nodes) * l.Add(new DebugCurve(100, 2, "brown", node.BoundaryCurve)); * * foreach (var e in cl.Edges) * l.Add(new DebugCurve(100, 2, "pink", new LineSegment(e.Source.Center, e.Target.Center))); * * } * * DisplayGeometryGraph.ShowDebugCurves(l.ToArray());*/ #endif BundlingSettings bs = GetBundlingSettings(argsParser); double loosePadding; double tightPadding = GetPaddings(argsParser, out loosePadding); if (argsParser.OptionIsUsed(MdsOption)) { var mdsLayoutSettings = new MdsLayoutSettings { RemoveOverlaps = true, NodeSeparation = loosePadding * 3 }; var mdsLayout = new MdsGraphLayout(mdsLayoutSettings, geometryGraph); mdsLayout.Run(); } else { if (argsParser.OptionIsUsed(FdOption)) { var settings = new FastIncrementalLayoutSettings { AvoidOverlaps = true }; (new InitialLayout(geometryGraph, settings)).Run(); } } var splineRouter = new SplineRouter(geometryGraph, geometryGraph.Edges, tightPadding, loosePadding, Math.PI / 6, bs); splineRouter.Run(); } #if TEST_MSAGL DisplayGeometryGraph.ShowGraph(geometryGraph); #endif return; } else { if (ext == ".msagl") { Graph graph = Graph.Read(fileName); // DisplayGeometryGraph.ShowGraph(graph.GeometryGraph); if (graph != null) { if (argsParser.OptionIsUsed(BundlingOption)) { BundlingSettings bs = GetBundlingSettings(argsParser); double loosePadding; double tightPadding = GetPaddings(argsParser, out loosePadding); var br = new SplineRouter(graph.GeometryGraph, tightPadding, loosePadding, Math.PI / 6, bs); br.Run(); // DisplayGeometryGraph.ShowGraph(graph.GeometryGraph); } } gviewer.NeedToCalculateLayout = false; gviewer.Graph = graph; gviewer.NeedToCalculateLayout = true; } } } } else if (argsParser.OptionIsUsed(TestCdtOption)) { Triangulation(argsParser.OptionIsUsed(ReverseXOption)); Environment.Exit(0); } else if (argsParser.OptionIsUsed(TestCdtOption0)) { TestTriangulationOnSmallGraph(argsParser); Environment.Exit(0); } else if (argsParser.OptionIsUsed(TestCdtOption2)) { TestTriangulationOnPolys(); Environment.Exit(0); } else if (argsParser.OptionIsUsed(TestCdtOption1)) { ThreadThroughCdt(); Environment.Exit(0); } else if (argsParser.OptionIsUsed(ConstraintsTestOption)) { TestGraphWithConstraints(); } if (!argsParser.OptionIsUsed(QuietOption)) { Application.Run(form); } }
static ArgsParser.ArgsParser SetArgsParser(string[] args) { _argsParser = new ArgsParser.ArgsParser(args); _argsParser.AddAllowedOptionWithHelpString(OneTimeRunOption, "loads only one graph"); _argsParser.AddAllowedOptionWithHelpString(SequentialRunOption, "no threads"); _argsParser.AddAllowedOptionWithHelpString(StraightLineEdgesOption, "route straight line edges"); _argsParser.AddAllowedOptionWithHelpString(NoEdgeRoutingOption, "don't route the edges"); _argsParser.AddAllowedOptionWithHelpString(NoIterationsWithMajorization, "0 iterations with majorization"); _argsParser.AddOptionWithAfterStringWithHelp(FileListOption, "file list"); _argsParser.AddAllowedOptionWithHelpString(RoundedCornersOption, "rounded corners for boxes always"); _argsParser.AddAllowedOptionWithHelpString(PrintMaxNodeDegreeOption, "print max node degree and exit"); _argsParser.AddOptionWithAfterStringWithHelp(NodeSeparationOption, "node separation"); _argsParser.AddOptionWithAfterStringWithHelp(NodeQuotaOption, "max number of nodes per tile"); _argsParser.AddOptionWithAfterStringWithHelp(IncreaseNodeQuotaOption, "increase max number of nodes per tile for higher levels"); _argsParser.AddOptionWithAfterStringWithHelp("-rt", "max number of rails per tile"); _argsParser.AddAllowedOption(AllowOverlapsInMds); _argsParser.AddAllowedOption(RunRemoveOverlapsOption); _argsParser.AddAllowedOptionWithHelpString(EdgeZoomLevelsUpperBoundOption, "use upper bound in the edge zoom level algorithm"); _argsParser.AddOptionWithAfterStringWithHelp(LargeLayoutThresholdOption, "sets the large layout threshold"); _argsParser.AddOptionWithAfterStringWithHelp(BackgroundImageOption, "sets the background image for the large layout"); _argsParser.AddOptionWithAfterStringWithHelp(BackgroundColorOption, "sets the background color for the large layout viewer"); _argsParser.AddOptionWithAfterStringWithHelp(RailColorsOption, "sets the rail colors for the large layout viewer"); _argsParser.AddOptionWithAfterStringWithHelp(MaxNodesPerTileOption, "sets the max nodes per tile for large layout"); _argsParser.AddAllowedOptionWithHelpString(DoNotLayoutOption, "do not call the layout calculation"); _argsParser.AddAllowedOption(RecoverSugiyamaTestOption); _argsParser.AddAllowedOption(QuietOption); _argsParser.AddAllowedOption(BundlingOption); _argsParser.AddOptionWithAfterStringWithHelp(FileOption, "the name of the input file"); _argsParser.AddAllowedOptionWithHelpString(TestCdtOption, "testing Constrained Delaunay Triangulation"); _argsParser.AddAllowedOptionWithHelpString(TestCdtOption0, "testing Constrained Delaunay Triangulation on a small graph"); _argsParser.AddAllowedOptionWithHelpString(TestCdtOption1, "testing threading through a CDT"); _argsParser.AddAllowedOptionWithHelpString(TestCdtOption2, "testing Constrained Delaunay Triangulation on file \'polys\'"); _argsParser.AddAllowedOptionWithHelpString(ReverseXOption, "reversing X coordinate"); _argsParser.AddOptionWithAfterStringWithHelp(EdgeSeparationOption, "use specified edge separation"); _argsParser.AddAllowedOptionWithHelpString(MdsOption, "use mds layout"); _argsParser.AddAllowedOptionWithHelpString(FdOption, "use force directed layout"); _argsParser.AddAllowedOptionWithHelpString(ConstraintsTestOption, "test constraints"); _argsParser.AddOptionWithAfterStringWithHelp(InkImportanceOption, "ink importance coefficient"); _argsParser.AddOptionWithAfterStringWithHelp(TightPaddingOption, "tight padding coefficient"); _argsParser.AddOptionWithAfterStringWithHelp(LoosePaddingOption, "loose padding coefficient"); _argsParser.AddOptionWithAfterStringWithHelp(CapacityCoeffOption, "capacity coeffiecient"); _argsParser.AddAllowedOptionWithHelpString(PolygonDistanceTestOption, "test Polygon.Distance"); _argsParser.AddAllowedOptionWithHelpString(RandomBundlingTest, "random bundling test"); _argsParser.AddAllowedOptionWithHelpString(TestCdtThreaderOption, "test CdtThreader"); _argsParser.AddAllowedOptionWithHelpString(AsyncLayoutOption, "test viewer in the async mode"); _argsParser.AddAllowedOptionWithHelpString(EnlargeHighDegreeNodes, "enlarge high degree nodes"); _argsParser.AddAllowedOptionWithHelpString(ExitAfterLgLayoutOption, "exit after lg calculation"); _argsParser.AddAllowedOptionWithHelpString("-no_route_simpl", "do not simplify the routes"); _argsParser.AddAllowedOptionWithHelpString("-no_tiles", "do not generate or load tiles"); _argsParser.AddOptionWithAfterStringWithHelp("-labelH", "the height of labels"); if (!_argsParser.Parse()) { Console.WriteLine(_argsParser.UsageString()); Environment.Exit(1); } return _argsParser; }
static ArgsParser.ArgsParser SetArgsParser(string[] args) { var argsParser = new ArgsParser.ArgsParser(args); argsParser.AddAllowedOption(RecoverSugiyamaTestOption); argsParser.AddAllowedOption(QuietOption); argsParser.AddAllowedOption(BundlingOption); argsParser.AddOptionWithAfterStringWithHelp(FileOption, "the name of the input file"); argsParser.AddOptionWithAfterStringWithHelp(ListOfFilesOption, "the name of the file containing a list of files"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption, "testing Constrained Delaunay Triangulation"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption0, "testing Constrained Delaunay Triangulation on a small graph"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption1, "testing threading through a CDT"); argsParser.AddAllowedOptionWithHelpString(TestCdtOption2, "testing Constrained Delaunay Triangulation on file \'polys\'"); argsParser.AddAllowedOptionWithHelpString(ReverseXOption, "reversing X coordinate"); argsParser.AddOptionWithAfterStringWithHelp(EdgeSeparationOption, "use specified edge separation"); argsParser.AddAllowedOptionWithHelpString(MdsOption, "use mds layout"); argsParser.AddAllowedOptionWithHelpString(FdOption, "use force directed layout"); argsParser.AddAllowedOptionWithHelpString(ConstraintsTestOption, "test constraints"); argsParser.AddOptionWithAfterStringWithHelp(InkImportanceOption, "ink importance coefficient"); argsParser.AddOptionWithAfterStringWithHelp(TightPaddingOption, "tight padding coefficient"); argsParser.AddOptionWithAfterStringWithHelp(LoosePaddingOption, "loose padding coefficient"); argsParser.AddOptionWithAfterStringWithHelp(CapacityCoeffOption, "capacity coeffiecient"); argsParser.AddAllowedOptionWithHelpString(PolygonDistanceTestOption, "test Polygon.Distance"); argsParser.AddAllowedOptionWithHelpString(PolygonDistanceTestOption3, "test PolygonDistance3"); argsParser.AddAllowedOptionWithHelpString(RandomBundlingTest, "random bundling test"); argsParser.AddAllowedOptionWithHelpString(TestCdtThreaderOption, "test CdtThreader"); argsParser.AddAllowedOptionWithHelpString(AsyncLayoutOption, "test viewer in the async mode"); if (!argsParser.Parse()) { Console.WriteLine(argsParser.UsageString()); Environment.Exit(1); } return argsParser; }
static ArgsParser.ArgsParser SetArgsParser(string[] args) { _argsParser = new ArgsParser.ArgsParser(args); _argsParser.AddAllowedOptionWithHelpString(OneTimeRunOption, "loads only one graph"); _argsParser.AddAllowedOptionWithHelpString(SequentialRunOption, "no threads"); _argsParser.AddAllowedOptionWithHelpString(StraightLineEdgesOption, "route straight line edges"); _argsParser.AddAllowedOptionWithHelpString(NoEdgeRoutingOption, "don't route the edges"); _argsParser.AddAllowedOptionWithHelpString(NoIterationsWithMajorization, "0 iterations with majorization"); _argsParser.AddOptionWithAfterStringWithHelp(FileListOption, "file list"); _argsParser.AddAllowedOptionWithHelpString(RoundedCornersOption, "rounded corners for boxes always"); _argsParser.AddAllowedOptionWithHelpString(PrintMaxNodeDegreeOption, "print max node degree and exit"); _argsParser.AddOptionWithAfterStringWithHelp(NodeSeparationOption, "node separation"); _argsParser.AddOptionWithAfterStringWithHelp(NodeQuotaOption, "max number of nodes per tile"); _argsParser.AddOptionWithAfterStringWithHelp(IncreaseNodeQuotaOption, "increase max number of nodes per tile for higher levels"); _argsParser.AddOptionWithAfterStringWithHelp("-rt", "max number of rails per tile"); _argsParser.AddAllowedOption(AllowOverlapsInMds); _argsParser.AddAllowedOption(RunRemoveOverlapsOption); _argsParser.AddAllowedOptionWithHelpString(EdgeZoomLevelsUpperBoundOption, "use upper bound in the edge zoom level algorithm"); _argsParser.AddOptionWithAfterStringWithHelp(LargeLayoutThresholdOption, "sets the large layout threshold"); _argsParser.AddOptionWithAfterStringWithHelp(BackgroundImageOption, "sets the background image for the large layout"); _argsParser.AddOptionWithAfterStringWithHelp(BackgroundColorOption, "sets the background color for the large layout viewer"); _argsParser.AddOptionWithAfterStringWithHelp(RailColorsOption, "sets the rail colors for the large layout viewer"); _argsParser.AddOptionWithAfterStringWithHelp(SelectionColorsOption, "sets the selected rail colors for the large layout viewer"); _argsParser.AddOptionWithAfterStringWithHelp(MaxNodesPerTileOption, "sets the max nodes per tile for large layout"); _argsParser.AddAllowedOptionWithHelpString(DoNotLayoutOption, "do not call the layout calculation"); _argsParser.AddAllowedOption(RecoverSugiyamaTestOption); _argsParser.AddAllowedOption(QuietOption); _argsParser.AddAllowedOption(BundlingOption); _argsParser.AddOptionWithAfterStringWithHelp(FileOption, "the name of the input file"); _argsParser.AddAllowedOptionWithHelpString(TestCdtOption, "testing Constrained Delaunay Triangulation"); _argsParser.AddAllowedOptionWithHelpString(TestCdtOption0, "testing Constrained Delaunay Triangulation on a small graph"); _argsParser.AddAllowedOptionWithHelpString(TestCdtOption1, "testing threading through a CDT"); _argsParser.AddAllowedOptionWithHelpString(TestCdtOption2, "testing Constrained Delaunay Triangulation on file \'polys\'"); _argsParser.AddAllowedOptionWithHelpString(ReverseXOption, "reversing X coordinate"); _argsParser.AddOptionWithAfterStringWithHelp(EdgeSeparationOption, "use specified edge separation"); _argsParser.AddAllowedOptionWithHelpString(MdsOption, "use mds layout"); _argsParser.AddAllowedOptionWithHelpString(FdOption, "use force directed layout"); _argsParser.AddAllowedOptionWithHelpString(ConstraintsTestOption, "test constraints"); _argsParser.AddOptionWithAfterStringWithHelp(InkImportanceOption, "ink importance coefficient"); _argsParser.AddOptionWithAfterStringWithHelp(TightPaddingOption, "tight padding coefficient"); _argsParser.AddOptionWithAfterStringWithHelp(LoosePaddingOption, "loose padding coefficient"); _argsParser.AddOptionWithAfterStringWithHelp(CapacityCoeffOption, "capacity coeffiecient"); _argsParser.AddAllowedOptionWithHelpString(PolygonDistanceTestOption, "test Polygon.Distance"); _argsParser.AddAllowedOptionWithHelpString(RandomBundlingTest, "random bundling test"); _argsParser.AddAllowedOptionWithHelpString(TestCdtThreaderOption, "test CdtThreader"); _argsParser.AddAllowedOptionWithHelpString(AsyncLayoutOption, "test viewer in the async mode"); _argsParser.AddAllowedOptionWithHelpString(EnlargeHighDegreeNodes, "enlarge high degree nodes"); _argsParser.AddAllowedOptionWithHelpString(ExitAfterLgLayoutOption, "exit after lg calculation"); _argsParser.AddAllowedOptionWithHelpString("-no_route_simpl", "do not simplify the routes"); _argsParser.AddAllowedOptionWithHelpString("-no_tiles", "do not generate or load tiles"); _argsParser.AddOptionWithAfterStringWithHelp("-labelH", "the height of labels"); if (!_argsParser.Parse()) { System.Diagnostics.Debug.WriteLine(_argsParser.UsageString()); Environment.Exit(1); } return(_argsParser); }