public UC_StandarAndSimpleLayout(SettingCommInfo commInfo)
        {
            InitializeComponent();
            try
            {
                _commonInfo = (SettingCommInfo)commInfo.Clone();
            }
            catch
            {
                _commonInfo = new SettingCommInfo();
            }

            _proposedSize = new System.Drawing.Size(int.MaxValue, int.MaxValue);

            //默认字体
            this.DefaultFocusStyle.GridFont = new Font("宋体", 12, FontStyle.Regular);

            #region Bitmap -- Test
            //_tempBitMap = new Bitmap(_fanImage);
            //_lineBytes = ((_tempBitMap.Width * 24 + 31) >> 5) << 2;
            //_bmpInf.bmiHeader.biBitCount = 32;
            //_bmpInf.bmiHeader.biClrImportant = 1;
            //_bmpInf.bmiHeader.biClrUsed = 0;
            //_bmpInf.bmiHeader.biCompression = 0;
            //_bmpInf.bmiHeader.biHeight = -_tempBitMap.Height;
            //_bmpInf.bmiHeader.biPlanes = 1;
            //_bmpInf.bmiHeader.biSize = 40;
            //_bmpInf.bmiHeader.biSizeImage = _lineBytes * _tempBitMap.Height;
            //_bmpInf.bmiHeader.biWidth = _tempBitMap.Width;
            //_bmpInf.bmiHeader.biXPelsPerMeter = 0;
            //_bmpInf.bmiHeader.biYPelsPerMeter = 0;
            #endregion
        }
 public Frm_FanPowerAdvanceSetting(List <ILEDDisplayInfo> oneLedInfos, string sn, string commPort,
                                   SerializableDictionary <string, byte> curAllSettingDic,
                                   SettingCommInfo commInfo)
 {
     InitializeComponent();
     _oneLedInfos  = oneLedInfos;
     _sn           = sn;
     _commPort     = commPort;
     _curConfigDic = new SerializableDictionary <string, byte>();
     if (curAllSettingDic != null)
     {
         foreach (string addr in curAllSettingDic.Keys)
         {
             _curConfigDic.Add(addr, curAllSettingDic[addr]);
         }
     }
     try
     {
         _commonInfo = (SettingCommInfo)commInfo.Clone();
     }
     catch
     {
         _commonInfo = new SettingCommInfo();
     }
 }
 public Frm_FanPowerAdvanceSetting(List<ILEDDisplayInfo> oneLedInfos,string sn,string commPort,
                                   SerializableDictionary<string, byte> curAllSettingDic, 
                                   SettingCommInfo commInfo)
 {
     InitializeComponent();
     _oneLedInfos = oneLedInfos;
     _sn = sn;
     _commPort = commPort;
     _curConfigDic = new SerializableDictionary<string, byte>();
     if (curAllSettingDic != null)
     {
         foreach(string addr in curAllSettingDic.Keys)
         {
             _curConfigDic.Add(addr, curAllSettingDic[addr]);
         }
     }
     try
     {
         _commonInfo = (SettingCommInfo)commInfo.Clone();
     }
     catch
     {
         _commonInfo = new SettingCommInfo();
     }
 }
Ejemplo n.º 4
0
        public UC_StandarAndSimpleLayout(SettingCommInfo commInfo)
        {
            InitializeComponent();
            try
            {
                _commonInfo = (SettingCommInfo)commInfo.Clone();
            }
            catch
            {
                _commonInfo = new SettingCommInfo();
            }

            _proposedSize = new System.Drawing.Size(int.MaxValue, int.MaxValue);

            //默认字体
            this.DefaultFocusStyle.GridFont = new Font("宋体", 12, FontStyle.Regular);

            #region Bitmap -- Test
            //_tempBitMap = new Bitmap(_fanImage);
            //_lineBytes = ((_tempBitMap.Width * 24 + 31) >> 5) << 2;
            //_bmpInf.bmiHeader.biBitCount = 32;
            //_bmpInf.bmiHeader.biClrImportant = 1;
            //_bmpInf.bmiHeader.biClrUsed = 0;
            //_bmpInf.bmiHeader.biCompression = 0;
            //_bmpInf.bmiHeader.biHeight = -_tempBitMap.Height;
            //_bmpInf.bmiHeader.biPlanes = 1;
            //_bmpInf.bmiHeader.biSize = 40;
            //_bmpInf.bmiHeader.biSizeImage = _lineBytes * _tempBitMap.Height;
            //_bmpInf.bmiHeader.biWidth = _tempBitMap.Width;
            //_bmpInf.bmiHeader.biXPelsPerMeter = 0;
            //_bmpInf.bmiHeader.biYPelsPerMeter = 0;
            #endregion
        }
Ejemplo n.º 5
0
        public UC_OneScreenLayout(string commPort, ILEDDisplayInfo ledDisplayInfo,
                                  Dictionary<string, byte> curAllSettingDic,
                                  SettingCommInfo commInfo, 
                                  SettingMonitorCntEventHandler SetOneScanBoardInfoEvent)
        {
            InitializeComponent();
            this.Disposed += new EventHandler(UC_OneScreenLayout_Disposed);

            _commPort = commPort;
            _curLedInf = ledDisplayInfo;
            _curSettingDic = curAllSettingDic;

            _customToolTipFont = this.Font;
            _complexScreenFont = this.Font;
            _simpleOrStandardScreenFont = this.Font;
            try
            {
                _commonInfo = (SettingCommInfo)commInfo.Clone();
            }
            catch
            {
                _commonInfo = new SettingCommInfo();
            }
            _setOneScanBoardInfoEvent = SetOneScanBoardInfoEvent;

            _ledType = _curLedInf.Type;
            if (_ledType == LEDDisplyType.ComplexType)
            {
                _complexLayout = new UC_ComplexLayout(_commonInfo);
                _complexLayout.Parent = doubleBufferPanel_SettingZoon;
                _complexLayout.Dock = DockStyle.Fill;
                _complexLayout.SetComplexScreenInfEvent += new SettingMonitorCntEventHandler(ComplexScreenSetInfo);
                groupBox_ScalingRate.Visible = false;
            }
            else
            {
                _standarAndSimpleLayout = new UC_StandarAndSimpleLayout(_commonInfo);
                _standarAndSimpleLayout.DefaultFocusStyle.BackColor = Color.Wheat;
                _standarAndSimpleLayout.IsCanSelect = true;
                _standarAndSimpleLayout.IsCanSelectMoreGrid = true;
                _standarAndSimpleLayout.Parent = doubleBufferPanel_SettingZoon;
                _standarAndSimpleLayout.Dock = DockStyle.Fill;
                _standarAndSimpleLayout.BorderStyle = BorderStyle.FixedSingle;
                _standarAndSimpleLayout.BackColor = Color.Transparent;
                _standarAndSimpleLayout.ClearAllRectangularGrid();
                _standarAndSimpleLayout.ContextMenuStrip = contextMenuStrip_Set;
                _standarAndSimpleLayout.GridMouseMove += new RectangularGridMouseEventHandler(StandarAndSimpleLayout_GridMouseMove);

                _standarAndSimpleLayout.GridMouseDoubleClick += new RectangularGridMouseEventHandler(StandarAndSimpleLayout_GridMouseDoubleClick);

                groupBox_ScalingRate.Visible = true;
            }
            UpdateDisplay();
            if (_standarAndSimpleLayout != null)
            {
                vScrollBar_PixelLength_Scroll(null, null);
            }
        }
Ejemplo n.º 6
0
        public UC_OneScreenLayout(string commPort, ILEDDisplayInfo ledDisplayInfo,
                                  Dictionary <string, byte> curAllSettingDic,
                                  SettingCommInfo commInfo,
                                  SettingMonitorCntEventHandler SetOneScanBoardInfoEvent)
        {
            InitializeComponent();
            this.Disposed += new EventHandler(UC_OneScreenLayout_Disposed);

            _commPort      = commPort;
            _curLedInf     = ledDisplayInfo;
            _curSettingDic = curAllSettingDic;

            _customToolTipFont          = this.Font;
            _complexScreenFont          = this.Font;
            _simpleOrStandardScreenFont = this.Font;
            try
            {
                _commonInfo = (SettingCommInfo)commInfo.Clone();
            }
            catch
            {
                _commonInfo = new SettingCommInfo();
            }
            _setOneScanBoardInfoEvent = SetOneScanBoardInfoEvent;

            _ledType = _curLedInf.Type;
            if (_ledType == LEDDisplyType.ComplexType)
            {
                _complexLayout        = new UC_ComplexLayout(_commonInfo);
                _complexLayout.Parent = doubleBufferPanel_SettingZoon;
                _complexLayout.Dock   = DockStyle.Fill;
                _complexLayout.SetComplexScreenInfEvent += new SettingMonitorCntEventHandler(ComplexScreenSetInfo);
                groupBox_ScalingRate.Visible             = false;
            }
            else
            {
                _standarAndSimpleLayout = new UC_StandarAndSimpleLayout(_commonInfo);
                _standarAndSimpleLayout.DefaultFocusStyle.BackColor = Color.Wheat;
                _standarAndSimpleLayout.IsCanSelect         = true;
                _standarAndSimpleLayout.IsCanSelectMoreGrid = true;
                _standarAndSimpleLayout.Parent      = doubleBufferPanel_SettingZoon;
                _standarAndSimpleLayout.Dock        = DockStyle.Fill;
                _standarAndSimpleLayout.BorderStyle = BorderStyle.FixedSingle;
                _standarAndSimpleLayout.BackColor   = Color.Transparent;
                _standarAndSimpleLayout.ClearAllRectangularGrid();
                _standarAndSimpleLayout.ContextMenuStrip = contextMenuStrip_Set;
                _standarAndSimpleLayout.GridMouseMove   += new RectangularGridMouseEventHandler(StandarAndSimpleLayout_GridMouseMove);

                _standarAndSimpleLayout.GridMouseDoubleClick += new RectangularGridMouseEventHandler(StandarAndSimpleLayout_GridMouseDoubleClick);

                groupBox_ScalingRate.Visible = true;
            }
            UpdateDisplay();
            if (_standarAndSimpleLayout != null)
            {
                vScrollBar_PixelLength_Scroll(null, null);
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 构造复杂显示屏监控信息设置页面
        /// </summary>
        public UC_ComplexLayout(SettingCommInfo commInfo)
        {
            InitializeComponent();
            _countList = new List <byte>();
            _addrList  = new List <string>();

            try
            {
                _commonInfo = (SettingCommInfo)commInfo.Clone();
            }
            catch
            {
                _commonInfo = new SettingCommInfo();
            }
            CountArray = new string[_commonInfo.MaxCount];  //最大个数加上4,然后再加未选中时的个数0
            for (int i = 0; i < _commonInfo.MaxCount; i++)
            {
                CountArray[i] = (i + 1).ToString();
            }
            InitDataGridView();
        }