Exemplo n.º 1
0
        private static void RenewScreen(XDocument doc, int CurrentScreen)
        {
            Widgets          WW   = new Widgets(doc, CurrentScreen);
            ScreenTable      ST   = new ScreenTable(doc);
            ButtonsPole      BP   = new ButtonsPole(doc);
            TableLayoutPanel tp   = LoadTPFromFile(ST);
            TableLayoutPanel Pole = LoadPole(doc, BP);

            ff.LoadWidgets(WW, tp, Pole, CurrentScreen);
            ff.Controls.Add(tp);
        }
Exemplo n.º 2
0
        private static TableLayoutPanel LoadTPFromFile(ScreenTable ST)
        {
            TableLayoutPanel tp = new TableLayoutPanel
            {
#if DEBUG
                CellBorderStyle = TableLayoutPanelCellBorderStyle.Single,
#endif
                Dock        = DockStyle.Fill,
                ColumnCount = ST.C.Count(),
                RowCount    = ST.R.Count()
            };

            tp.ColumnStyles.Clear();
            tp.RowStyles.Clear();
            foreach (var cc in ST.C)
            {
                tp.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, cc.Width));
            }
            foreach (var rr in ST.R)
            {
                tp.RowStyles.Add(new RowStyle(SizeType.Percent, rr.Height));
            }
            return(tp);
        }