using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using Tango.Core; using Tango.FSE.Diagnostics.Project.Widgets; namespace Tango.FSE.Diagnostics.Project { public class DiagnosticsProjectTab : ExtendedObject { private String _name; public String Name { get { return _name; } set { _name = value; RaisePropertyChangedAuto(); } } public ObservableCollection Columns { get; set; } public ObservableCollection Rows { get; set; } public ObservableCollection Widgets { get; set; } public DiagnosticsProjectTab() { Columns = new ObservableCollection(); Rows = new ObservableCollection(); Widgets = new ObservableCollection(); } public static DiagnosticsProjectTab CreateNew(String name, int columns, int rows) { var tab = new DiagnosticsProjectTab(); tab.Name = name; for (int i = 0; i < columns; i++) { tab.Columns.Add(CreateColumn()); } for (int i = 0; i < rows; i++) { tab.Rows.Add(CreateRow()); } return tab; } private static DiagnosticsProjectTabColumnDefinition CreateColumn() { return new DiagnosticsProjectTabColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) }; } private static DiagnosticsProjectTabRowDefinition CreateRow() { return new DiagnosticsProjectTabRowDefinition() { Height = new GridLength(1, GridUnitType.Star) }; } } }