Пример #1
0
        public IGridBlock_State Child_GridBlockGet(string macroAddress)
        {
            IGridBlock_State grid = null;

            if (_gridBlockDictionary.TryGetValue(macroAddress, out grid) == false)
            {
                throw new ArgumentException($"Error! Unable to find '{macroAddress}'!");
            }
            return(grid);
        }
        private static bool GridSync_Color(IGridBlock_State grid, IGridControl gridControl, Color defaultColor)
        {
            var result = false;

            if (grid == null || grid.State_Color == Color.Black)  // Default color
            {
                if (gridControl.BackColor != defaultColor)
                {
                    gridControl.BackColor = defaultColor;
                    result = true;
                }
            }
            else
            {
                gridControl.BackColor = grid.State_Color;
            }
            return(result);
        }
        private static bool GridSync_Size(IGridBlock_State grid, IGridControl gridControl, int controlWidth, int controlHeight)
        {
            return(false);
            ////if (gridControl.Text == "5.1") gridControl.Text = "5.1";
            //var result = false;
            //if (gridControl.Width != controlWidth)
            //{
            //    gridControl.Width = controlWidth;
            //    result = true;
            //}
            //if (grid != null && grid.State_Col != 1) return result;

            //var parent = gridControl._Parent;
            //if (parent.Height != controlHeight)
            //{
            //    parent.Height = controlHeight;
            //    result = true;
            //}
            //return result;
        }