예제 #1
0
        private TLEPanel CreatePanelWithDefaultSettings(string panelName)
        {
            TLEPanel panel = new TLEPanel(panelName);

            panel.StartTime = PanelOffsetTime;
            panel.EndTime   = PanelOffsetTime + PanelWidthTime;
            panel.PanelName = panelName;
            panel.Placement = new Placement();

            if (!string.IsNullOrEmpty(panelName) && PANEL_DEFAULT_HEIGHTS.ContainsKey(panelName))
            {
                panel.Placement.Height = PANEL_DEFAULT_HEIGHTS[panelName];
            }
            else //Groups
            {
                panel.Placement.Height = 100;
            }

            panel.Placement.Width = Width;
            return(panel);
        }
예제 #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);
        }