Skip to content

Commit

Permalink
Updated internal properties to private
Browse files Browse the repository at this point in the history
  • Loading branch information
ncguilbeault committed Jun 3, 2024
1 parent 7fddc3c commit 6177682
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/Bonsai.ML.Visualizers/KinematicStateVisualizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ namespace Bonsai.ML.Visualizers
/// </summary>
public class KinematicStateVisualizer : MashupVisualizer
{
internal int RowCount { get; set; } = 3;
internal int ColumnCount { get; set; } = 2;
internal List<StateComponentVisualizer> ComponentVisualizers { get; private set; } = new();
private TableLayoutPanel container;
private int updateFrequency = 1000 / 50;
private bool resetAxes = true;
private int rowCount = 3;
private int columnCount = 2;

internal string[] Labels = new string[] {
private string[] labels = new string[] {
"Position X",
"Position Y",
"Velocity X",
Expand All @@ -40,27 +40,27 @@ public override void Load(IServiceProvider provider)
{
container = new TableLayoutPanel
{
ColumnCount = ColumnCount,
RowCount = RowCount,
ColumnCount = columnCount,
RowCount = rowCount,
Dock = DockStyle.Fill
};

for (int i = 0; i < container.RowCount; i++)
{
container.RowStyles.Add(new RowStyle(SizeType.Percent, 100f / RowCount));
container.RowStyles.Add(new RowStyle(SizeType.Percent, 100f / rowCount));
}

for (int i = 0; i < container.ColumnCount; i++)
{
container.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f / ColumnCount));
container.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f / columnCount));
}

for (int i = 0 ; i < RowCount; i++)
for (int i = 0 ; i < rowCount; i++)
{
for (int j = 0; j < ColumnCount; j++)
for (int j = 0; j < columnCount; j++)
{
var StateComponentVisualizer = new StateComponentVisualizer() {
Label = Labels[i * ColumnCount + j]
Label = labels[i * columnCount + j]
};
StateComponentVisualizer.Load(provider);
container.Controls.Add(StateComponentVisualizer.Plot, j, i);
Expand Down

0 comments on commit 6177682

Please sign in to comment.