Skip to content

Commit

Permalink
Add an algorithm and UI to automatically layout production graphs.
Browse files Browse the repository at this point in the history
  • Loading branch information
MForster committed May 6, 2022
1 parent 6b95e7b commit 61d005c
Show file tree
Hide file tree
Showing 8 changed files with 540 additions and 7 deletions.
5 changes: 5 additions & 0 deletions Foreman/Foreman.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
<Reference Include="System.IO.Compression.ZipFile, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down Expand Up @@ -210,6 +213,8 @@
</Compile>
<Compile Include="Models\AssemblerSelector.cs" />
<Compile Include="Models\FuelSelector.cs" />
<Compile Include="Models\Layout\GraphLayout.cs" />
<Compile Include="Models\Layout\CoordinateAssignment.cs" />
<Compile Include="Models\LinkChecker.cs" />
<Compile Include="Models\ModuleSelector.cs" />
<Compile Include="Models\Nodes\ConsumerNode.cs" />
Expand Down
82 changes: 78 additions & 4 deletions Foreman/Forms/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Foreman/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,18 @@ private void GraphViewer_KeyDown(object sender, KeyEventArgs e)
}
}

//---------------------------------------------------------Graph layout

private void LayoutGraphButton_Click(object sender, EventArgs e)
{
GraphViewer.LayoutGraph();
}

private void ReduceCrossingsCheckBox_CheckedChanged(object sender, EventArgs e)
{
GraphViewer.ReduceCrossings = ReduceCrossingsCheckBox.Checked;
}

//---------------------------------------------------------double buffering commands

public static void SetDoubleBuffered(Control c)
Expand Down
Loading

0 comments on commit 61d005c

Please sign in to comment.