Esempio n. 1
0
        public void InitializePanel <T>(string panelName, List <T> elements)
        {
            if (!Panels.ContainsKey(panelName))
            {
                Panels[panelName] = CreatePanelWithDefaultSettings(panelName);
            }
            Panels[panelName].PanelCells = TLEPanelCell.Parse(elements);

            ReCalculatePlacementYForPanels();
        }
Esempio n. 2
0
        public TLEPanelTests()
        {
            panel = new TLEPanel("Doesn't matter");
            //panel.TimeCellWidth

            List <ITLEPanelCellElement> elements = new List <ITLEPanelCellElement>();

            elements.Add(new Beat()
            {
                Timestamp = new TimeSpan(0, 0, 12)
            });
            elements.Add(new Beat()
            {
                Timestamp = new TimeSpan(0, 0, 0, 12, 1)
            });
            elements.Add(new Beat()
            {
                Timestamp = new TimeSpan(0, 0, 0, 12, 2)
            });
            elements.Add(new Beat()
            {
                Timestamp = new TimeSpan(0, 0, 14)
            });
            elements.Add(new Beat()
            {
                Timestamp = new TimeSpan(0, 0, 15)
            });

            var parsedCells = TLEPanelCell.Parse(elements);

            panel.PanelCells = new List <TLEPanelCell>();
            panel.PanelCells.AddRange(parsedCells);

            panel.StartTime = new TimeSpan();
            panel.EndTime   = new TimeSpan(0, 0, 0, 30, 0);
        }