Example #1
0
        void LoadGrid(DataGridView _dg)
        {
            L_GridPars lGridPars = ParAll.SG.Some.Grids;
            GridPars   gridPars  = lGridPars[_dg.Parent.Name];

            if (gridPars == null)
            {
                return;
            }
            L_ColumnPars lColumnPars = gridPars.Columns;

            foreach (DataGridViewColumn col in _dg.Columns)
            {
                ColumnPars columnPars = lColumnPars[col.Name];
                if (columnPars == null)
                {
                    continue;
                }
                col.Width = columnPars.Width;
            }
        }
Example #2
0
        public void LoadRectangle()
        {
            L_WindowLPars.CurrentWins.LoadFormRect(this);
            L_GridPars lGridPars = ParAll.SG.Some.Grids;
            GridPars   gridPars  = lGridPars[Name];

            if (gridPars == null)
            {
                return;
            }
            L_ColumnPars lColumnPars = gridPars.Columns;

            foreach (DataGridViewColumn col in dg.Columns)
            {
                ColumnPars columnPars = lColumnPars[col.Name];
                if (columnPars == null)
                {
                    continue;
                }
                col.Width = columnPars.Width;
            }
        }
Example #3
0
        void SaveGrid(DataGridView _dg)
        {
            L_GridPars lGridPars = ParAll.SG.Some.Grids;
            GridPars   gridPars  = lGridPars[_dg.Parent.Name];

            if (gridPars == null)
            {
                gridPars      = lGridPars.AddNewTree(ParAll.ST.MP) as GridPars;
                gridPars.Name = _dg.Parent.Name;
            }
            L_ColumnPars lColumnPars = gridPars.Columns;

            foreach (DataGridViewColumn col in _dg.Columns)
            {
                ColumnPars columnPars = lColumnPars[col.Name];
                if (columnPars == null)
                {
                    columnPars      = lColumnPars.AddNewTree(ParAll.ST.MP) as ColumnPars;
                    columnPars.Name = col.Name;
                }
                columnPars.Width = col.Width;
            }
        }
Example #4
0
        public void SaveRectangle()
        {
            L_GridPars lGridPars = ParAll.SG.Some.Grids;
            GridPars   gridPars  = lGridPars[Name];

            if (gridPars == null)
            {
                gridPars      = lGridPars.AddNewTree(ParAll.ST.MP) as GridPars;
                gridPars.Name = Name;
            }
            L_ColumnPars lColumnPars = gridPars.Columns;

            foreach (DataGridViewColumn col in dg.Columns)
            {
                ColumnPars columnPars = lColumnPars[col.Name];
                if (columnPars == null)
                {
                    columnPars      = lColumnPars.AddNewTree(ParAll.ST.MP) as ColumnPars;
                    columnPars.Name = col.Name;
                }
                columnPars.Width = col.Width;
            }
            L_WindowLPars.CurrentWins.SaveFormRect(this);
        }