Beispiel #1
0
        public ScanPanelControl()
        {
            //InitializeComponent();
            //Dock = DockStyle.Fill;
            Location = new Point(0, 0);
            Size     = new System.Drawing.Size(MainForm.MainFormWidth, MainForm.MainFormHeight);
            titleBar = new TitleBarControl();
            Controls.Add(titleBar);

            _scanningStatusPanel = new Panel();
            _scanningStatusPanel.BackgroundImage       = Properties.Resources.top_gray_bg;
            _scanningStatusPanel.BackgroundImageLayout = ImageLayout.Tile;
            _scanningStatusPanel.Size     = new System.Drawing.Size(MainForm.MainFormWidth, 106);
            _scanningStatusPanel.Location = new Point(0, titleBar.Height);
            Controls.Add(_scanningStatusPanel);

            _scanningLogo = new Label();
            //_scanningLogo.Image = Properties.Resources.scanning;
            _scanningLogo.Image     = Properties.Resources.scanning_work;
            _scanningLogo.Size      = _scanningLogo.Image.Size;
            _scanningLogo.BackColor = Color.Transparent;
            _scanningLogo.Location  = new Point(32, 20);
            _scanningStatusPanel.Controls.Add(_scanningLogo);

            _progressLabel              = new Label();
            _progressLabel.Text         = "正在准备";
            _progressLabel.ForeColor    = Color.FromArgb(0x47, 0x47, 0x47);
            _progressLabel.BackColor    = Color.Transparent;
            _progressLabel.Font         = new System.Drawing.Font("微软雅黑", 12, GraphicsUnit.Pixel);
            _progressLabel.TextAlign    = ContentAlignment.MiddleLeft;
            _progressLabel.AutoEllipsis = true;
            _progressLabel.Width        = 750;
            //_progressLabel.MaximumSize = new System.Drawing.Size(750, 0);
            //_progressLabel.AutoSize = true;
            _progressLabel.SizeChanged += _progressLabelOnSizeChanged;
            _scanningStatusPanel.Controls.Add(_progressLabel);

            _progressBar          = new ProgressBar();
            _progressBar.Value    = 90;
            _progressBar.Size     = new System.Drawing.Size(600, 14);
            _progressBar.Location = new Point(20, 52);
            _scanningStatusPanel.Controls.Add(_progressBar);

            _pauseBtn            = new ImageButton();
            _pauseBtn.Text       = "暂停";
            _pauseBtn.Image      = Properties.Resources.btn_primary_n;
            _pauseBtn.Size       = _pauseBtn.Image.Size;
            _pauseBtn.NormalBack = Properties.Resources.btn_primary_n;
            _pauseBtn.HoverBack  = Properties.Resources.btn_primary_h;
            _pauseBtn.PressBack  = Properties.Resources.btn_primary_p;
            _pauseBtn.ForeColor  = Color.WhiteSmoke;
            _pauseBtn.Font       = new System.Drawing.Font("微软雅黑", 14, GraphicsUnit.Pixel);
            _pauseBtn.TextAlign  = ContentAlignment.MiddleCenter;
            _pauseBtn.Location   = new Point(_progressBar.Location.X + _progressBar.Width + 32,
                                             52 + _progressBar.Height / 2 - _pauseBtn.Height / 2);
            _scanningStatusPanel.Controls.Add(_pauseBtn);

            _stopBtn            = new ImageButton();
            _stopBtn.Text       = "停止";
            _stopBtn.Image      = Properties.Resources.btn_primary_n;
            _stopBtn.Size       = _stopBtn.Image.Size;
            _stopBtn.NormalBack = Properties.Resources.btn_primary_n;
            _stopBtn.HoverBack  = Properties.Resources.btn_primary_h;
            _stopBtn.PressBack  = Properties.Resources.btn_primary_p;
            _stopBtn.ForeColor  = Color.WhiteSmoke;
            _stopBtn.Font       = new System.Drawing.Font("微软雅黑", 14, GraphicsUnit.Pixel);
            _stopBtn.TextAlign  = ContentAlignment.MiddleCenter;
            _stopBtn.Location   = new Point(_pauseBtn.Location.X + _pauseBtn.Width + 12,
                                            _pauseBtn.Location.Y);
            _scanningStatusPanel.Controls.Add(_stopBtn);

            _scanStatusSummary           = new Label();
            _scanStatusSummary.Text      = "共扫描sdfsdfs";
            _scanStatusSummary.AutoSize  = true;
            _scanStatusSummary.Font      = new System.Drawing.Font("微软雅黑", 12, GraphicsUnit.Pixel);
            _scanStatusSummary.BackColor = Color.Transparent;
            _scanStatusSummary.TextAlign = ContentAlignment.MiddleLeft;
            _scanStatusSummary.ForeColor = Color.FromArgb(0x47, 0x47, 0x47);
            _scanStatusSummary.Location  = new Point(32,
                                                     _progressBar.Location.Y + _progressBar.Height);
            _scanningStatusPanel.Controls.Add(_scanStatusSummary);

            _returnBackImage                 = new Panel();
            _returnBackImage.BackColor       = Color.Transparent;
            _returnBackImage.BackgroundImage = Properties.Resources.btn_return_n;
            _returnBackImage.Width           = _returnBackImage.Height = 64;
            _returnBackImage.Location        = new Point(MainForm.MainFormWidth - _returnBackImage.Width, 0);
            _scanningStatusPanel.Controls.Add(_returnBackImage);

            _returnBtn = new Label();
            //_returnBtn.BackColor = Color.Red;
            _returnBtn.Width    = _returnBtn.Height = 24;
            _returnBtn.Location = new Point(_returnBackImage.Width - 8 - _returnBtn.Width, 6);
            _returnBackImage.Controls.Add(_returnBtn);
            _returnBtn.MouseEnter += _returnBtnOnMouseEnter;
            _returnBtn.MouseLeave += _returnBtnOnMouseLeave;
            _returnBtn.MouseDown  += _returnBtnOnMouseDown;
            _returnBtn.MouseUp    += _returnBtnOnMouseUp;

            //scanning result panel
            _scanningResultPanel = new Panel();
            _scanningResultPanel.BackgroundImage       = Properties.Resources.top_gray_bg;
            _scanningResultPanel.BackgroundImageLayout = ImageLayout.Tile;
            _scanningResultPanel.Size     = new System.Drawing.Size(MainForm.MainFormWidth, 106);
            _scanningResultPanel.Location = new Point(0, titleBar.Height);
            Controls.Add(_scanningResultPanel);

            _scanningResultLogo          = new Label();
            _scanningResultLogo.Image    = Properties.Resources.warning;
            _scanningResultLogo.Image    = Properties.Resources.Complete;
            _scanningResultLogo.Size     = _scanningResultLogo.Image.Size;
            _scanningResultLogo.Location = new Point(32, 20);
            _scanningResultPanel.Controls.Add(_scanningResultLogo);

            _scanningResultTitleWarning           = new Label();
            _scanningResultTitleWarning.Text      = "本次扫描发现0个待处理文件!";
            _scanningResultTitleWarning.AutoSize  = true;
            _scanningResultTitleWarning.BackColor = Color.Transparent;
            _scanningResultTitleWarning.TextAlign = ContentAlignment.MiddleLeft;
            _scanningResultTitleWarning.Font      = new System.Drawing.Font("微软雅黑", 18, GraphicsUnit.Pixel);
            _scanningResultTitleWarning.ForeColor = Color.FromArgb(0xcf, 0x49, 0x2c);
            _scanningResultTitleWarning.Location  = new Point(120, 30);
            _scanningResultPanel.Controls.Add(_scanningResultTitleWarning);

            _scanningResultTitleSucceed           = new Label();
            _scanningResultTitleSucceed.Text      = "已成功处理扫描中发现的文件!";
            _scanningResultTitleSucceed.AutoSize  = true;
            _scanningResultTitleSucceed.BackColor = Color.Transparent;
            _scanningResultTitleSucceed.TextAlign = ContentAlignment.MiddleLeft;
            _scanningResultTitleSucceed.Font      = new System.Drawing.Font("微软雅黑", 18, GraphicsUnit.Pixel);
            _scanningResultTitleSucceed.ForeColor = Color.FromArgb(0x4f, 0xb5, 0x2c);
            _scanningResultTitleSucceed.Location  = new Point(120, 30);
            _scanningResultPanel.Controls.Add(_scanningResultTitleSucceed);

            _scanResultSummary           = new Label();
            _scanResultSummary.Text      = "";
            _scanResultSummary.AutoSize  = true;
            _scanResultSummary.Font      = new System.Drawing.Font("微软雅黑", 12, GraphicsUnit.Pixel);
            _scanResultSummary.BackColor = Color.Transparent;
            _scanResultSummary.TextAlign = ContentAlignment.MiddleLeft;
            _scanResultSummary.ForeColor = Color.FromArgb(0x84, 0x84, 0x84);
            _scanResultSummary.Location  = new Point(120,
                                                     _scanningResultTitleWarning.Location.Y + _scanningResultTitleWarning.Height);
            _scanningResultPanel.Controls.Add(_scanResultSummary);

            _handleBtn            = new ImageButton();
            _handleBtn.Text       = "一键处理";
            _handleBtn.Image      = Properties.Resources.btn_primary_n;
            _handleBtn.Size       = _handleBtn.Image.Size;
            _handleBtn.NormalBack = Properties.Resources.btn_primary_n;
            _handleBtn.HoverBack  = Properties.Resources.btn_primary_h;
            _handleBtn.PressBack  = Properties.Resources.btn_primary_p;
            _handleBtn.ForeColor  = Color.WhiteSmoke;
            _handleBtn.Font       = new System.Drawing.Font("微软雅黑", 14, GraphicsUnit.Pixel);
            _handleBtn.TextAlign  = ContentAlignment.MiddleCenter;
            _handleBtn.Location   = new Point(652, 42);
            _scanningResultPanel.Controls.Add(_handleBtn);

            _giveupBtn            = new ImageButton();
            _giveupBtn.Text       = "暂不处理";
            _giveupBtn.Image      = Properties.Resources.btn_primary_n;
            _giveupBtn.Size       = _giveupBtn.Image.Size;
            _giveupBtn.NormalBack = Properties.Resources.btn_primary_n;
            _giveupBtn.HoverBack  = Properties.Resources.btn_primary_h;
            _giveupBtn.PressBack  = Properties.Resources.btn_primary_p;
            _giveupBtn.ForeColor  = Color.WhiteSmoke;
            _giveupBtn.Font       = new System.Drawing.Font("微软雅黑", 14, GraphicsUnit.Pixel);
            _giveupBtn.TextAlign  = ContentAlignment.MiddleCenter;
            _giveupBtn.Location   = new Point(_handleBtn.Location.X + _handleBtn.Width + 12, 42);
            _scanningResultPanel.Controls.Add(_giveupBtn);

            _confirmBtn            = new ImageButton();
            _confirmBtn.Text       = "确认";
            _confirmBtn.Image      = Properties.Resources.btn_primary_n;
            _confirmBtn.Size       = _confirmBtn.Image.Size;
            _confirmBtn.NormalBack = Properties.Resources.btn_primary_n;
            _confirmBtn.HoverBack  = Properties.Resources.btn_primary_h;
            _confirmBtn.PressBack  = Properties.Resources.btn_primary_p;
            _confirmBtn.ForeColor  = Color.WhiteSmoke;
            _confirmBtn.Font       = new System.Drawing.Font("微软雅黑", 14, GraphicsUnit.Pixel);
            _confirmBtn.TextAlign  = ContentAlignment.MiddleCenter;
            _confirmBtn.Location   = new Point(710, 42);
            _scanningResultPanel.Controls.Add(_confirmBtn);

            _divider           = new Label();
            _divider.Size      = new System.Drawing.Size(MainForm.MainFormWidth, 20);
            _divider.Location  = new Point(0, _scanningStatusPanel.Location.Y + _scanningStatusPanel.Height);
            _divider.BackColor = Color.FromArgb(0xf8, 0xf8, 0xf8);
            Controls.Add(_divider);

            _pornItemResultView          = new PornItemTableViewWithPreview(false);
            _pornItemResultView.Location = new Point(0, _divider.Location.Y + _divider.Height);
            _pornItemResultView.Height   = MainForm.MainFormHeight - _pornItemResultView.Location.Y - 30;
            _pornItemResultView.Width    = MainForm.MainFormWidth;
            Controls.Add(_pornItemResultView);

            _footerPanel           = new Panel();
            _footerPanel.Size      = new System.Drawing.Size(MainForm.MainFormWidth, 30);
            _footerPanel.Location  = new Point(0, _pornItemResultView.Location.Y + _pornItemResultView.Height);
            _footerPanel.BackColor = Color.FromArgb(0xf8, 0xf8, 0xf8);
            Controls.Add(_footerPanel);

            //_autoShutdownCheckBox = new CheckBox();
            //_autoShutdownCheckBox.FlatStyle = FlatStyle.Flat;
            //_autoShutdownCheckBox.CheckAlign = ContentAlignment.MiddleCenter;
            //_autoShutdownCheckBox.Location = new Point(20, 12);
            //_footerPanel.Controls.Add(_autoShutdownCheckBox);

            //_autoShutdownDescLabel = new Label();
            //_autoShutdownDescLabel.Text = "扫描完成自动处理并关机";

            Load             += ScanPanelControlOnLoad;
            _returnBtn.Click += _returnBtnOnClick;

            //_scanningStatusPanel.Visible = false;
            //_handleBtn.Visible = false;
            //_giveupBtn.Visible = false;
            _scanningResultPanel.Visible = false;
            _confirmBtn.Visible          = false;

            _localScan = new LocalScan();
            _localScan.ScanProgressChanged += _localScanOnScanProgressChanged;
            _localScan.ScanComplete        += _localScanOnScanComplete;

            _pauseBtn.Click   += _pauseBtnOnClick;
            _stopBtn.Click    += _stopBtnOnClick;
            _giveupBtn.Click  += _giveupBtnOnClick;
            _handleBtn.Click  += _handleBtnOnClick;
            _confirmBtn.Click += _confirmBtnOnClick;

            Disposed += ScanPanelControlOnDisposed;

            _checkAll          = new CheckBox();
            _checkAll.AutoSize = true;
            //_checkAll.Size = new System.Drawing.Size(115, 22);
            _checkAll.Text      = "选中全部扫描项";
            _checkAll.BackColor = Color.FromArgb(0xf8, 0xf8, 0xf8);
            //_checkAll.UseVisualStyleBackColor = true;
            _footerPanel.Controls.Add(_checkAll);
            _checkAll.Location        = new System.Drawing.Point(40, _footerPanel.Height / 2 - _checkAll.Height / 2);
            _checkAll.CheckedChanged += _checkAllOnChanged;
            //_checkAll.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);

            _unCheckAll          = new CheckBox();
            _unCheckAll.AutoSize = true;
            //_checkAll.Size = new System.Drawing.Size(115, 22);
            _unCheckAll.Text      = "不选中扫描项";
            _unCheckAll.BackColor = Color.FromArgb(0xf8, 0xf8, 0xf8);
            //_checkAll.UseVisualStyleBackColor = true;
            _footerPanel.Controls.Add(_unCheckAll);
            _unCheckAll.Location        = new System.Drawing.Point(_checkAll.Location.X + _checkAll.Width + 40, _footerPanel.Height / 2 - _unCheckAll.Height / 2);
            _unCheckAll.CheckedChanged += _unCheckAllOnChanged;
            _unCheckAll.Checked         = true;
        }
        public ProtectionPanelControl()
        {
            //InitializeComponent();
            //Dock = DockStyle.Fill;
            Location  = new Point(0, 0);
            Size      = new System.Drawing.Size(MainForm.MainFormWidth, MainForm.MainFormHeight);
            _titleBar = new TitleBarControl();
            //_titleBar.TitleText = "山妖卫士-安全防护中心";
            _titleBar.Height = 44;
            Controls.Add(_titleBar);

            _settingPanel = new Panel();
            Controls.Add(_settingPanel);
            //_settingPanel.BackColor = Color.Red;
            _settingPanel.BackgroundImage       = Properties.Resources.top_green_bg;
            _settingPanel.BackgroundImageLayout = ImageLayout.Tile;
            _settingPanel.Height   = 204;
            _settingPanel.Width    = MainForm.MainFormWidth;
            _settingPanel.Location = new Point(0, _titleBar.Height);

            _logoLabel = new Label();
            //_logoLabel.Image = Properties.Resources.fh_icon_animation_n;
            SetLogoImage();
            _logoLabel.BackColor = Color.Transparent;
            _logoLabel.Height    = 150;
            _logoLabel.Width     = 174;
            _logoLabel.Location  = new Point(54, 30);
            _settingPanel.Controls.Add(_logoLabel);

            int btnsX      = 300;
            int heightDist = 30;

            _websiteBtn = new ImageSwitchButton(Properties.Settings.Default.IsPornWebsiteProtectionTurnOn,
                                                Properties.Resources.switch_on,
                                                Properties.Resources.switch_off);
            _websiteBtn.Location        = new Point(btnsX, 36);
            _websiteDescLabel           = new Label();
            _websiteDescLabel.AutoSize  = true;
            _websiteDescLabel.Text      = "不良网站检测防护";
            _websiteDescLabel.ForeColor = Color.FromArgb(0x5e, 0x5e, 0x5e);
            _websiteDescLabel.Font      = new System.Drawing.Font("微软雅黑", 16, GraphicsUnit.Pixel);
            _websiteDescLabel.Location  = new Point(btnsX + _websiteBtn.Width + 4,
                                                    _websiteBtn.Location.Y + _websiteBtn.Height / 2 - _websiteDescLabel.Height / 2);
            _websiteDescLabel.BackColor = Color.Transparent;
            _settingPanel.Controls.Add(_websiteBtn);
            _settingPanel.Controls.Add(_websiteDescLabel);
            _websiteBtn.SwitchChanged += _websiteBtnOnSwitchChanged;
            ToolTip websiteTip = new ToolTip();

            websiteTip.AutoPopDelay = 32000;
            websiteTip.SetToolTip(_websiteDescLabel, "自动检测色情网站并屏蔽");

            _activeImageBtn = new ImageSwitchButton(Properties.Settings.Default.IsLocalActiveImageTurnOn,
                                                    Properties.Resources.switch_on,
                                                    Properties.Resources.switch_off);
            _activeImageBtn.Location        = new Point(btnsX, _websiteBtn.Location.Y + _websiteBtn.Height + heightDist);
            _activeImageDescLabel           = new Label();
            _activeImageDescLabel.AutoSize  = true;
            _activeImageDescLabel.Text      = "本地活跃图片文件监控";
            _activeImageDescLabel.ForeColor = Color.FromArgb(0x5e, 0x5e, 0x5e);
            _activeImageDescLabel.Font      = new System.Drawing.Font("微软雅黑", 16, GraphicsUnit.Pixel);
            _activeImageDescLabel.BackColor = Color.Transparent;
            _activeImageDescLabel.Location  = new Point(btnsX + _activeImageBtn.Width + 4,
                                                        _activeImageBtn.Location.Y + _activeImageBtn.Height / 2 - _activeImageDescLabel.Height / 2);
            _settingPanel.Controls.Add(_activeImageBtn);
            _settingPanel.Controls.Add(_activeImageDescLabel);
            _activeImageBtn.SwitchChanged += _activeImageBtnOnSwitchChanged;
            if (Properties.Settings.Default.IsLocalActiveImageTurnOn)
            {
                MainForm.Instance._activeFileMonitor.EnableImageDetection();
            }
            ToolTip activImageTip = new ToolTip();

            activImageTip.AutoPopDelay = 32000;
            activImageTip.SetToolTip(_activeImageDescLabel, "监控本地活跃图片文件,记录本地色情图片文件的创建");

            _activeVideoBtn = new ImageSwitchButton(Properties.Settings.Default.IsLocalActiveVideoTurnOn,
                                                    Properties.Resources.switch_on,
                                                    Properties.Resources.switch_off);
            _activeVideoBtn.Location        = new Point(btnsX, _activeImageBtn.Location.Y + _activeImageBtn.Height + heightDist);
            _activeVideoDescLabel           = new Label();
            _activeVideoDescLabel.AutoSize  = true;
            _activeVideoDescLabel.Text      = "本地活跃视频文件监控";
            _activeVideoDescLabel.ForeColor = Color.FromArgb(0x5e, 0x5e, 0x5e);
            _activeVideoDescLabel.Font      = new System.Drawing.Font("微软雅黑", 16, GraphicsUnit.Pixel);
            _activeVideoDescLabel.BackColor = Color.Transparent;
            _activeVideoDescLabel.Location  = new Point(btnsX + _activeVideoBtn.Width + 4,
                                                        _activeVideoBtn.Location.Y + _activeVideoBtn.Height / 2 - _activeVideoDescLabel.Height / 2);
            _settingPanel.Controls.Add(_activeVideoBtn);
            _settingPanel.Controls.Add(_activeVideoDescLabel);
            _activeVideoBtn.SwitchChanged += _activeVideoBtnOnSwitchChanged;
            //_activeVideoBtn.Enabled = false;
            ToolTip activeVideoTip = new ToolTip();

            activeVideoTip.AutoPopDelay = 32000;
            activeVideoTip.SetToolTip(_activeVideoDescLabel, "监控本地活跃视频文件,记录本地色情视频文件的创建");
            if (Properties.Settings.Default.IsLocalActiveVideoTurnOn)
            {
                MainForm.Instance._activeFileMonitor.EnableVideoDetection();
            }

            _networkImageBtn = new ImageSwitchButton(Properties.Settings.Default.IsNetworkImageTurnOn,
                                                     Properties.Resources.switch_on,
                                                     Properties.Resources.switch_off);
            _networkImageBtn.Location        = new Point(btnsX, _activeVideoBtn.Location.Y + _activeVideoBtn.Height + heightDist);
            _networkImageDescLabel           = new Label();
            _networkImageDescLabel.AutoSize  = true;
            _networkImageDescLabel.Text      = "网页不良图片过滤";
            _networkImageDescLabel.ForeColor = Color.FromArgb(0x5e, 0x5e, 0x5e);
            _networkImageDescLabel.Font      = new System.Drawing.Font("微软雅黑", 16, GraphicsUnit.Pixel);
            _networkImageDescLabel.BackColor = Color.Transparent;
            _networkImageDescLabel.Location  = new Point(btnsX + _networkImageBtn.Width + 4,
                                                         _networkImageBtn.Location.Y + _networkImageBtn.Height / 2 - _networkImageDescLabel.Height / 2);
            _settingPanel.Controls.Add(_networkImageBtn);
            _settingPanel.Controls.Add(_networkImageDescLabel);
            _networkImageBtn.SwitchChanged += _networkImageBtnOnSwitchChanged;
            ToolTip networkImageTip = new ToolTip();

            networkImageTip.AutoPopDelay = 32000;
            networkImageTip.SetToolTip(_networkImageDescLabel, "过滤网页中的色情图片,此项功能在开启或关闭后,如页面未刷新,请使用Ctrl+F5强制刷新");

            _strongNetworkImageFilter          = new CheckBox();
            _strongNetworkImageFilter.Location = new Point(CheckBoxLocationX,
                                                           _networkImageDescLabel.Location.Y);
            _strongNetworkImageFilter.BackColor = Color.Transparent;
            _strongNetworkImageFilter.Text      = "强力过滤";
            _strongNetworkImageFilter.ForeColor = Color.FromArgb(0x5e, 0x5e, 0x5e);
            _strongNetworkImageFilter.Font      = new System.Drawing.Font("微软雅黑", 16, GraphicsUnit.Pixel);
            _strongNetworkImageFilter.BackColor = Color.Transparent;
            _strongNetworkImageFilter.Checked   = Properties.Settings.Default.IsStrongNetworkImageFilter;
            if (!Properties.Settings.Default.IsNetworkImageTurnOn)
            {
                _strongNetworkImageFilter.Enabled = false;
            }
            _strongNetworkImageFilter.CheckedChanged += _strongNetworkImageFilterOnCheckedChanged;
            _settingPanel.Controls.Add(_strongNetworkImageFilter);
            ToolTip strongNetworkImageFilterTip = new ToolTip();

            strongNetworkImageFilterTip.AutoPopDelay = 32000;
            strongNetworkImageFilterTip.SetToolTip(_strongNetworkImageFilter, "包含擦边球色情图片,此项功能在开启或关闭后,如页面未刷新,请使用Ctrl+F5强制刷新");

            //自启动checkbox
            _autoStartCheckbox                 = new CheckBox();
            _autoStartCheckbox.Location        = new Point(CheckBoxLocationX, _websiteDescLabel.Location.Y);
            _autoStartCheckbox.BackColor       = Color.Transparent;
            _autoStartCheckbox.Text            = "开机启动";
            _autoStartCheckbox.ForeColor       = Color.FromArgb(0x5e, 0x5e, 0x5e);
            _autoStartCheckbox.Font            = new System.Drawing.Font("微软雅黑", 16, GraphicsUnit.Pixel);
            _autoStartCheckbox.BackColor       = Color.Transparent;
            _autoStartCheckbox.Checked         = GetAutoStart();
            _autoStartCheckbox.CheckedChanged += _autoStartCheckboxOnCheckedChanged;
            _settingPanel.Controls.Add(_autoStartCheckbox);
            ToolTip autoStartToolTip = new ToolTip();

            autoStartToolTip.AutoPopDelay = 32000;
            autoStartToolTip.SetToolTip(_autoStartCheckbox, "不良网站或是网络图片过滤功能必须与开机启动设置匹配");
            //ToolTip strongNetworkImageFilterTip = new ToolTip();
            //strongNetworkImageFilterTip.SetToolTip(_strongNetworkImageFilter, "包含擦边球色情图片");

            //增量快速扫描
            //_fastLocalScanIncrementalCheckbox = new CheckBox();
            //_fastLocalScanIncrementalCheckbox.Location = new Point(CheckBoxLocationX, _activeImageDescLabel.Location.Y);
            //_fastLocalScanIncrementalCheckbox.BackColor = Color.Transparent;
            //_fastLocalScanIncrementalCheckbox.Text = "增量上网记录扫描";
            //_fastLocalScanIncrementalCheckbox.AutoSize = true;
            //_fastLocalScanIncrementalCheckbox.ForeColor = Color.FromArgb(0x5e, 0x5e, 0x5e);
            //_fastLocalScanIncrementalCheckbox.Font = new System.Drawing.Font("微软雅黑", 16, GraphicsUnit.Pixel);
            //_fastLocalScanIncrementalCheckbox.BackColor = Color.Transparent;
            //_fastLocalScanIncrementalCheckbox.Checked = Properties.Settings.Default.isFastLocalScanIncremental;
            //_fastLocalScanIncrementalCheckbox.CheckedChanged += _fastLocalScanIncrementalCheckboxOnCheckedChanged;
            //_settingPanel.Controls.Add(_fastLocalScanIncrementalCheckbox);

            //增量全盘扫描
            //_allLocalScanIncrementalCheckbox = new CheckBox();
            //_allLocalScanIncrementalCheckbox.Location = new Point(CheckBoxLocationX, _activeVideoDescLabel.Location.Y);
            //_allLocalScanIncrementalCheckbox.BackColor = Color.Transparent;
            //_allLocalScanIncrementalCheckbox.Text = "增量全盘扫描";
            //_allLocalScanIncrementalCheckbox.AutoSize = true;
            //_allLocalScanIncrementalCheckbox.ForeColor = Color.FromArgb(0x5e, 0x5e, 0x5e);
            //_allLocalScanIncrementalCheckbox.Font = new System.Drawing.Font("微软雅黑", 16, GraphicsUnit.Pixel);
            //_allLocalScanIncrementalCheckbox.BackColor = Color.Transparent;
            //_allLocalScanIncrementalCheckbox.Checked = Properties.Settings.Default.isAllLocalScanIncremental;
            //_allLocalScanIncrementalCheckbox.CheckedChanged += _allLocalScanIncrementalCheckboxOnCheckedChanged;
            //_settingPanel.Controls.Add(_allLocalScanIncrementalCheckbox );

            _returnBackImage                 = new Panel();
            _returnBackImage.BackColor       = Color.Transparent;
            _returnBackImage.BackgroundImage = Properties.Resources.btn_return_n;
            _returnBackImage.Width           = _returnBackImage.Height = 64;
            _returnBackImage.Location        = new Point(MainForm.MainFormWidth - _returnBackImage.Width, 0);
            _settingPanel.Controls.Add(_returnBackImage);

            _returnBtn = new Label();
            //_returnBtn.BackColor = Color.Red;
            _returnBtn.Width    = _returnBtn.Height = 24;
            _returnBtn.Location = new Point(_returnBackImage.Width - 8 - _returnBtn.Width, 6);
            _returnBackImage.Controls.Add(_returnBtn);
            _returnBtn.MouseEnter += _returnBtnOnMouseEnter;
            _returnBtn.MouseLeave += _returnBtnOnMouseLeave;
            _returnBtn.MouseDown  += _returnBtnOnMouseDown;
            _returnBtn.MouseUp    += _returnBtnOnMouseUp;

            _tabHeaderPanel           = new Panel();
            _tabHeaderPanel.BackColor = Color.FromArgb(0xf3, 0xf3, 0xf3);
            //_tabHeaderPanel.BackColor = Color.Green;
            _tabHeaderPanel.Height   = 24;
            _tabHeaderPanel.Width    = MainForm.MainFormWidth;
            _tabHeaderPanel.Location = new Point(0, _settingPanel.Location.Y + _settingPanel.Height);
            Controls.Add(_tabHeaderPanel);

            _pornItemTableView          = new PornItemTableViewWithPreview(true);
            _pornItemTableView.Height   = 264 + 30;
            _pornItemTableView.Width    = MainForm.MainFormWidth;
            _pornItemTableView.Location = new Point(0, _tabHeaderPanel.Location.Y + _tabHeaderPanel.Height);

            Controls.Add(_pornItemTableView);

            _processPanel           = new Panel();
            _processPanel.Width     = MainForm.MainFormWidth;
            _processPanel.Height    = 34;
            _processPanel.BackColor = Color.FromArgb(0xf3, 0xf3, 0xf3);
            _processPanel.Location  = new Point(0, _pornItemTableView.Location.Y + _pornItemTableView.Height);
            Controls.Add(_processPanel);

            _clearAllBtn           = new ImageButton();
            _clearAllBtn.Size      = Properties.Resources.btn_Clear_n.Size;
            _clearAllBtn.Image     = _clearAllBtn.NormalBack = Properties.Resources.btn_Clear_n;
            _clearAllBtn.HoverBack = Properties.Resources.btn_Clear_h;
            _clearAllBtn.PressBack = Properties.Resources.btn_Clear_p;
            _clearAllBtn.Location  = new Point(32, _processPanel.Height / 2 - _clearAllBtn.Height / 2);
            _processPanel.Controls.Add(_clearAllBtn);

            _clearAllBtn.Click += _clearAllBtnOnClick;
            _returnBtn.Click   += _returnBtnOnClick;

            Load += ProtectionPanelControlOnLoad;

            //只有有功能打开时才操作,否则会导致默认关闭时,总是操作,导致杀毒软件报警
            if (Properties.Settings.Default.IsNetworkImageTurnOn || Properties.Settings.Default.IsPornWebsiteProtectionTurnOn)
            {
                TurnOnProxy();
            }
            //SetSystemProxy();
        }