private void OnMsgControlConfig(string sn)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new MethodInvoker(delegate { OnMsgControlConfig(sn); }));
                return;
            }
            if (sn == MonitorAllConfig.Instance().ALLScreenName)
            {
                _appearance = brightnessSettingTabControl.Appearance;
                _size = brightnessSettingTabControl.ItemSize;
                _tabSizeMode = brightnessSettingTabControl.SizeMode;
                brightnessSettingTabControl.Appearance = TabAppearance.FlatButtons;
                brightnessSettingTabControl.ItemSize = new Size(0, 1);
                brightnessSettingTabControl.SizeMode = TabSizeMode.Fixed;
                brightnessSettingTabControl.SelectTab("globSettingTabPage");
                //brightnessSettingTabControl.Visible = false;
                //this.Enabled = false;
                //label_tip.Text = CommonUI.GetCustomMessage(_langTable, "choicesinglescreen", "请选择单个显示屏,配置亮度调节");
                //label_tip.BringToFront();
                //label_tip.Visible = true;
                //ShowCustomMessageBox(CommonUI.GetCustomMessage(_langTable, "choicesinglescreen", "请选择单个显示屏,配置亮度调节"), "", MessageBoxButtons.OK, Windows.Forms.MessageBoxIconType.Alert);
                //groupBox_AutoBrightConfig.Parent = panel_ConfigBase;
                //groupBox_AutoBrightConfig.Visible = true;
                //groupBox_BrightnessTable.Visible = false;
                return;
            }
            else
            {
                if (MonitorAllConfig.Instance().LedInfoList != null && MonitorAllConfig.Instance().LedInfoList.Count == 1)
                {
                    brightnessSettingTabControl.Appearance = _appearance;
                    brightnessSettingTabControl.ItemSize = _size;
                    brightnessSettingTabControl.SizeMode = _tabSizeMode;
                    brightnessSettingTabControl.SelectTab("brightnessConfigTabPage");

                    //tabControl1.Dock = DockStyle.Fill;
                    //tabControl1.Visible = true;
                    //groupBox_AutoBrightConfig.Visible = true;
                    //groupBox_AutoBrightConfig.Parent = tabPage_AutoBrightConfig;
                    //groupBox_BrightnessTable.Visible = true;
                    //groupBox_BrightnessTable.Parent = tabPage_BrightnessTable;
                    //label_tip.Visible = false;
                }
                else
                {
                    brightnessSettingTabControl.Appearance = TabAppearance.FlatButtons;
                    brightnessSettingTabControl.ItemSize = new Size(0, 1);
                    brightnessSettingTabControl.SizeMode = TabSizeMode.Fixed;
                    brightnessSettingTabControl.SelectTab("brightnessConfigTabPage");

                    //tabControl1.Visible = false;
                    //groupBox_AutoBrightConfig.Visible = false;
                    //groupBox_BrightnessTable.Visible = true;
                    //groupBox_BrightnessTable.Parent = panel_ConfigBase;
                    //label_tip.Visible = true;
                }
            }

            //label_tip.Visible = false;
            //this.Enabled = true;
            //if (sn == _sn)
            //{
            //    return;
            //}
            //_sn = sn;
            //if (MonitorAllConfig.Instance().BrightnessConfigList != null)
            //{
            //    SmartLightConfigInfo tmp = MonitorAllConfig.Instance().BrightnessConfigList.Find(a => a.ScreenSN == sn);

            //    if (tmp == null)
            //    {
            //        _screenConfigInfo = new SmartLightConfigInfo();
            //        _screenConfigInfo.ScreenSN = sn;
            //        _screenConfigInfo.HwExecTypeValue = BrightnessHWExecType.SoftWareControl;
            //    }
            //    else _screenConfigInfo = (SmartLightConfigInfo)(tmp.Clone());
            //}
            //else
            //{
            //    _screenConfigInfo = new SmartLightConfigInfo(); _screenConfigInfo.ScreenSN = sn;
            //    _screenConfigInfo.HwExecTypeValue = BrightnessHWExecType.SoftWareControl;
            //}
            //switch (_screenConfigInfo.HwExecTypeValue)
            //{
            //    case BrightnessHWExecType.DisDisplayBlack:
            //        radioButton_Software.Checked = true;
            //        checkBox_ScreenDisplay.Checked = true;
            //        break;
            //    case BrightnessHWExecType.DisHardWareControl:
            //        radioButton_Software.Checked = true;
            //        if (_screenConfigInfo.DisplayHardcareConfig == null || _screenConfigInfo.DisplayHardcareConfig.OneDayConfigList == null || _screenConfigInfo.DisplayHardcareConfig.OneDayConfigList.Count == 0)
            //        {
            //            checkBox_Hareware.Checked = false;
            //        }
            //        else checkBox_Hareware.Checked = true;
            //        break;
            //    case BrightnessHWExecType.HardWareControl:
            //        radioButton_Hardware.Checked = true;
            //        break;
            //    case BrightnessHWExecType.SoftWareControl:
            //        radioButton_Software.Checked = true;
            //        checkBox_Hareware.Checked = false;
            //        checkBox_ScreenDisplay.Checked = false;
            //        break;
            //    default:
            //        break;
            //}
        }
        private void OnMsgControlConfig(string sn)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new MethodInvoker(delegate { OnMsgControlConfig(sn); }));
                return;
            }
            if (sn == MonitorAllConfig.Instance().ALLScreenName)
            {
                _appearance  = brightnessSettingTabControl.Appearance;
                _size        = brightnessSettingTabControl.ItemSize;
                _tabSizeMode = brightnessSettingTabControl.SizeMode;
                brightnessSettingTabControl.Appearance = TabAppearance.FlatButtons;
                brightnessSettingTabControl.ItemSize   = new Size(0, 1);
                brightnessSettingTabControl.SizeMode   = TabSizeMode.Fixed;
                brightnessSettingTabControl.SelectTab("globSettingTabPage");
                //brightnessSettingTabControl.Visible = false;
                //this.Enabled = false;
                //label_tip.Text = CommonUI.GetCustomMessage(_langTable, "choicesinglescreen", "请选择单个显示屏,配置亮度调节");
                //label_tip.BringToFront();
                //label_tip.Visible = true;
                //ShowCustomMessageBox(CommonUI.GetCustomMessage(_langTable, "choicesinglescreen", "请选择单个显示屏,配置亮度调节"), "", MessageBoxButtons.OK, Windows.Forms.MessageBoxIconType.Alert);
                //groupBox_AutoBrightConfig.Parent = panel_ConfigBase;
                //groupBox_AutoBrightConfig.Visible = true;
                //groupBox_BrightnessTable.Visible = false;
                return;
            }
            else
            {
                if (MonitorAllConfig.Instance().LedInfoList != null && MonitorAllConfig.Instance().LedInfoList.Count == 1)
                {
                    brightnessSettingTabControl.Appearance = _appearance;
                    brightnessSettingTabControl.ItemSize   = _size;
                    brightnessSettingTabControl.SizeMode   = _tabSizeMode;
                    brightnessSettingTabControl.SelectTab("brightnessConfigTabPage");

                    //tabControl1.Dock = DockStyle.Fill;
                    //tabControl1.Visible = true;
                    //groupBox_AutoBrightConfig.Visible = true;
                    //groupBox_AutoBrightConfig.Parent = tabPage_AutoBrightConfig;
                    //groupBox_BrightnessTable.Visible = true;
                    //groupBox_BrightnessTable.Parent = tabPage_BrightnessTable;
                    //label_tip.Visible = false;
                }
                else
                {
                    brightnessSettingTabControl.Appearance = TabAppearance.FlatButtons;
                    brightnessSettingTabControl.ItemSize   = new Size(0, 1);
                    brightnessSettingTabControl.SizeMode   = TabSizeMode.Fixed;
                    brightnessSettingTabControl.SelectTab("brightnessConfigTabPage");

                    //tabControl1.Visible = false;
                    //groupBox_AutoBrightConfig.Visible = false;
                    //groupBox_BrightnessTable.Visible = true;
                    //groupBox_BrightnessTable.Parent = panel_ConfigBase;
                    //label_tip.Visible = true;
                }
            }


            //label_tip.Visible = false;
            //this.Enabled = true;
            //if (sn == _sn)
            //{
            //    return;
            //}
            //_sn = sn;
            //if (MonitorAllConfig.Instance().BrightnessConfigList != null)
            //{
            //    SmartLightConfigInfo tmp = MonitorAllConfig.Instance().BrightnessConfigList.Find(a => a.ScreenSN == sn);

            //    if (tmp == null)
            //    {
            //        _screenConfigInfo = new SmartLightConfigInfo();
            //        _screenConfigInfo.ScreenSN = sn;
            //        _screenConfigInfo.HwExecTypeValue = BrightnessHWExecType.SoftWareControl;
            //    }
            //    else _screenConfigInfo = (SmartLightConfigInfo)(tmp.Clone());
            //}
            //else
            //{
            //    _screenConfigInfo = new SmartLightConfigInfo(); _screenConfigInfo.ScreenSN = sn;
            //    _screenConfigInfo.HwExecTypeValue = BrightnessHWExecType.SoftWareControl;
            //}
            //switch (_screenConfigInfo.HwExecTypeValue)
            //{
            //    case BrightnessHWExecType.DisDisplayBlack:
            //        radioButton_Software.Checked = true;
            //        checkBox_ScreenDisplay.Checked = true;
            //        break;
            //    case BrightnessHWExecType.DisHardWareControl:
            //        radioButton_Software.Checked = true;
            //        if (_screenConfigInfo.DisplayHardcareConfig == null || _screenConfigInfo.DisplayHardcareConfig.OneDayConfigList == null || _screenConfigInfo.DisplayHardcareConfig.OneDayConfigList.Count == 0)
            //        {
            //            checkBox_Hareware.Checked = false;
            //        }
            //        else checkBox_Hareware.Checked = true;
            //        break;
            //    case BrightnessHWExecType.HardWareControl:
            //        radioButton_Hardware.Checked = true;
            //        break;
            //    case BrightnessHWExecType.SoftWareControl:
            //        radioButton_Software.Checked = true;
            //        checkBox_Hareware.Checked = false;
            //        checkBox_ScreenDisplay.Checked = false;
            //        break;
            //    default:
            //        break;
            //}
        }
예제 #3
0
파일: GControl14.cs 프로젝트: zha0/Cerberus
 // Token: 0x060002BD RID: 701 RVA: 0x0000316D File Offset: 0x0000136D
 static void smethod_4(TabControl tabControl_0, TabSizeMode tabSizeMode_0)
 {
     tabControl_0.SizeMode = tabSizeMode_0;
 }
예제 #4
0
		public TabControl()
		{
			selectedIndex = -1;

			alignment = TabAlignment.Top;
			drawMode = TabDrawMode.Normal;
			itemSize = new Size(42, 21);
			padding = new Point(6, 3);
			moveButtonSize = new Size (17, 17);
			sizeMode = TabSizeMode.Normal;
			appearance = TabAppearance.Normal;
			tabPageCollection = new TabPageCollection(this);
			SetStyle(ControlStyles.UserPaint, true);

			moveButtonLeftState = ButtonState.Normal;
			moveButtonRightState = ButtonState.Normal;
			hotTrackIndex = -1;
			SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
		}