Files
2026-02-23 17:02:55 +08:00

50 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace MetroGauges.Controls
{
public class OutTable
{
private Canvas m_Canvas;
private List<Row> rows = new List<Row>();
public List<FrameworkElement> DrawShaps { get; set; }
public int Cols { get; set; }
public List<Row> Rows { get { return rows; } }
public Point StartPoint { get; set; }
public OutTable(Canvas canvas)
{
m_Canvas = canvas;
}
public Row NewRow()
{
Row row = new Row(Cols, m_Canvas) { Table=this };
rows.Add(row);
return row;
}
public void DrawTable()
{
for (int i = 0; i < this.rows.Count; i++)
{
this.rows[i].StartPoint = new Point() { X = this.StartPoint.X, Y = this.StartPoint.Y + this.rows[i].Height*i };
this.rows[i].IntiCells();
}
}
}
}