📄 ssnetworkcontrol.cs
字号:
label2.Name = "label2";
label2.Size = new Size(0xfb, 2);
label2.TabIndex = 2;
label2.Visible = false;
label3.BorderColor = Color.Empty;
label3.BorderStyle = BorderStyle.Fixed3D;
label3.ButtonBorderStyle = ButtonBorderStyle.None;
label3.Location = new Point(0xd9, 0x4f);
label3.Name = "label3";
label3.Size = new Size(130, 2);
label3.TabIndex = 0;
this.gbConnStatus.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
this.gbConnStatus.Controls.Add(this.ctlConnectionType);
this.gbConnStatus.Controls.Add(this.ctlExamine);
this.gbConnStatus.Controls.Add(this.chkConnLog);
this.gbConnStatus.Controls.Add(this.pbConnStatus);
this.gbConnStatus.ForeColor = Color.Black;
this.gbConnStatus.Location = new Point(5, 9);
this.gbConnStatus.Name = "gbConnStatus";
this.gbConnStatus.Size = new Size(0x161, 0x72);
this.gbConnStatus.TabIndex = 0;
this.gbConnStatus.TabStop = false;
this.gbConnStatus.Text = "网络连接状态";
this.ctlConnectionType.AutoSize = true;
this.ctlConnectionType.BorderColor = Color.Empty;
this.ctlConnectionType.ButtonBorderStyle = ButtonBorderStyle.None;
this.ctlConnectionType.Location = new Point(6, 0x57);
this.ctlConnectionType.Name = "ctlConnectionType";
this.ctlConnectionType.Size = new Size(0x5b, 13);
this.ctlConnectionType.TabIndex = 0;
this.ctlConnectionType.Text = "当前连接的类型";
this.ctlExamine.Location = new Point(0xdd, 0x52);
this.ctlExamine.Name = "ctlExamine";
this.ctlExamine.Size = new Size(0x77, 0x17);
this.ctlExamine.TabIndex = 0;
this.ctlExamine.Text = "网络情况诊断 ...";
this.ctlExamine.UseVisualStyleBackColor = true;
this.ctlExamine.Click += new EventHandler(this.ctlExamine_Click);
this.chkConnLog.AutoSize = true;
this.chkConnLog.Location = new Point(6, 0x56);
this.chkConnLog.Name = "chkConnLog";
this.chkConnLog.Size = new Size(0x7a, 0x11);
this.chkConnLog.TabIndex = 0;
this.chkConnLog.Text = "保存网络连接日志";
this.chkConnLog.UseVisualStyleBackColor = true;
this.chkConnLog.Visible = false;
this.pbConnStatus.ErrorImage = null;
this.pbConnStatus.InitialImage = null;
this.pbConnStatus.Location = new Point(0x1d, 0x12);
this.pbConnStatus.Name = "pbConnStatus";
this.pbConnStatus.Size = new Size(0x12b, 0x40);
this.pbConnStatus.TabIndex = 2;
this.pbConnStatus.TabStop = false;
this.gbNetworkConfig.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
this.gbNetworkConfig.Controls.Add(label3);
this.gbNetworkConfig.Controls.Add(this.ctlHttpProxyType);
this.gbNetworkConfig.Controls.Add(label2);
this.gbNetworkConfig.Controls.Add(this.chkUseSocks);
this.gbNetworkConfig.Controls.Add(this.chkUseDirect);
this.gbNetworkConfig.Controls.Add(this.chkUseHttpProxy);
this.gbNetworkConfig.Controls.Add(this.lbHttpProxyPort);
this.gbNetworkConfig.Controls.Add(this.lbSocksPort);
this.gbNetworkConfig.Controls.Add(this.txtHttpProxyPort);
this.gbNetworkConfig.Controls.Add(this.btnTestHttpProxy);
this.gbNetworkConfig.Controls.Add(this.txtHttpProxyPassword);
this.gbNetworkConfig.Controls.Add(this.lbHttpPassword);
this.gbNetworkConfig.Controls.Add(this.txtHttpProxyUserName);
this.gbNetworkConfig.Controls.Add(this.lbHttpUser);
this.gbNetworkConfig.Controls.Add(this.txtHttpProxyServerAdress);
this.gbNetworkConfig.Controls.Add(this.lbHttpProxyServer);
this.gbNetworkConfig.Controls.Add(this.btnTestSocks);
this.gbNetworkConfig.Controls.Add(this.txtSocksPassword);
this.gbNetworkConfig.Controls.Add(this.lbSocksPassword);
this.gbNetworkConfig.Controls.Add(this.txtSocksUserName);
this.gbNetworkConfig.Controls.Add(this.lbSocksUser);
this.gbNetworkConfig.Controls.Add(this.txtSockServerAddress);
this.gbNetworkConfig.Controls.Add(this.txtSocksPort);
this.gbNetworkConfig.Controls.Add(this.lbSocksServer);
this.gbNetworkConfig.Controls.Add(this.btnTestTcp);
this.gbNetworkConfig.Controls.Add(this.lbDirectly);
this.gbNetworkConfig.Controls.Add(this.ctlPromptHttpSetting);
this.gbNetworkConfig.ForeColor = Color.Black;
this.gbNetworkConfig.Location = new Point(5, 0x85);
this.gbNetworkConfig.Name = "gbNetworkConfig";
this.gbNetworkConfig.Size = new Size(0x161, 0xc7);
this.gbNetworkConfig.TabIndex = 1;
this.gbNetworkConfig.TabStop = false;
this.gbNetworkConfig.Text = "网络连接设置";
this.ctlHttpProxyType.BackColor = Color.White;
this.ctlHttpProxyType.DropDownStyle = ComboBoxStyle.DropDownList;
this.ctlHttpProxyType.FormattingEnabled = true;
this.ctlHttpProxyType.Location = new Point(0x61, 70);
this.ctlHttpProxyType.Name = "ctlHttpProxyType";
this.ctlHttpProxyType.Size = new Size(0x6f, 0x15);
this.ctlHttpProxyType.TabIndex = 3;
this.ctlHttpProxyType.SelectedIndexChanged += new EventHandler(this.ctlHttpProxyType_SelectedIndexChanged);
this.ctlHttpProxyType.DropDownClosed += new EventHandler(this.ctlHttpProxyType_DropDownClosed);
this.ctlHttpProxyType.DropDown += new EventHandler(this.ctlHttpProxyType_DropDown);
this.chkUseSocks.AutoSize = true;
this.chkUseSocks.Location = new Point(6, 0xc6);
this.chkUseSocks.Name = "chkUseSocks";
this.chkUseSocks.Size = new Size(0x59, 0x11);
this.chkUseSocks.TabIndex = 2;
this.chkUseSocks.Text = "SOCKS 代理";
this.chkUseSocks.UseVisualStyleBackColor = true;
this.chkUseSocks.Visible = false;
this.chkUseSocks.CheckedChanged += new EventHandler(this.chkSocks_CheckedChanged);
this.chkUseDirect.AutoSize = true;
this.chkUseDirect.Location = new Point(8, 0x12);
this.chkUseDirect.Name = "chkUseDirect";
this.chkUseDirect.Size = new Size(0x4a, 0x11);
this.chkUseDirect.TabIndex = 0;
this.chkUseDirect.Text = "直接连接";
this.chkUseDirect.UseVisualStyleBackColor = true;
this.chkUseDirect.CheckedChanged += new EventHandler(this.chkUseTcp_CheckedChanged);
this.chkUseHttpProxy.AutoSize = true;
this.chkUseHttpProxy.Location = new Point(9, 0x48);
this.chkUseHttpProxy.Name = "chkUseHttpProxy";
this.chkUseHttpProxy.Size = new Size(0x52, 0x11);
this.chkUseHttpProxy.TabIndex = 2;
this.chkUseHttpProxy.Text = "HTTP 代理";
this.chkUseHttpProxy.UseVisualStyleBackColor = true;
this.chkUseHttpProxy.CheckedChanged += new EventHandler(this.chkHttpProxy_CheckedChanged);
this.lbHttpProxyPort.AutoSize = true;
this.lbHttpProxyPort.BorderColor = Color.Empty;
this.lbHttpProxyPort.ButtonBorderStyle = ButtonBorderStyle.None;
this.lbHttpProxyPort.Location = new Point(0xe5, 0x84);
this.lbHttpProxyPort.Name = "lbHttpProxyPort";
this.lbHttpProxyPort.Size = new Size(0x22, 13);
this.lbHttpProxyPort.TabIndex = 3;
this.lbHttpProxyPort.Text = "端口:";
this.lbSocksPort.AutoSize = true;
this.lbSocksPort.BorderColor = Color.Empty;
this.lbSocksPort.ButtonBorderStyle = ButtonBorderStyle.None;
this.lbSocksPort.Location = new Point(0xe2, 0xe0);
this.lbSocksPort.Name = "lbSocksPort";
this.lbSocksPort.Size = new Size(0x22, 13);
this.lbSocksPort.TabIndex = 6;
this.lbSocksPort.Text = "端口:";
this.lbSocksPort.Visible = false;
this.txtHttpProxyPort.BackColor = Color.White;
this.txtHttpProxyPort.BorderStyle = BorderStyle.FixedSingle;
this.txtHttpProxyPort.Location = new Point(0x10a, 0x80);
this.txtHttpProxyPort.MaxLength = 5;
this.txtHttpProxyPort.Name = "txtHttpProxyPort";
this.txtHttpProxyPort.Size = new Size(0x49, 20);
this.txtHttpProxyPort.TabIndex = 6;
this.txtHttpProxyPort.Text = "80";
this.txtHttpProxyPort.Leave += new EventHandler(this.txtHttpProxyPort_Leave);
this.btnTestHttpProxy.Enabled = false;
this.btnTestHttpProxy.Location = new Point(0x108, 0xa9);
this.btnTestHttpProxy.Name = "btnTestHttpProxy";
this.btnTestHttpProxy.Size = new Size(0x4b, 0x17);
this.btnTestHttpProxy.TabIndex = 9;
this.btnTestHttpProxy.Text = "测试...";
this.btnTestHttpProxy.UseVisualStyleBackColor = true;
this.btnTestHttpProxy.Click += new EventHandler(this.btnTestHttpProxy_Click);
this.txtHttpProxyPassword.BackColor = Color.White;
this.txtHttpProxyPassword.BorderStyle = BorderStyle.FixedSingle;
this.txtHttpProxyPassword.Location = new Point(70, 0xac);
this.txtHttpProxyPassword.MaxLength = 50;
this.txtHttpProxyPassword.Name = "txtHttpProxyPassword";
this.txtHttpProxyPassword.Size = new Size(0x99, 20);
this.txtHttpProxyPassword.TabIndex = 8;
this.txtHttpProxyPassword.UseSystemPasswordChar = true;
this.lbHttpPassword.AutoSize = true;
this.lbHttpPassword.BorderColor = Color.Empty;
this.lbHttpPassword.ButtonBorderStyle = ButtonBorderStyle.None;
this.lbHttpPassword.Location = new Point(0x12, 0xaf);
this.lbHttpPassword.Name = "lbHttpPassword";
this.lbHttpPassword.Size = new Size(0x2e, 13);
this.lbHttpPassword.TabIndex = 10;
this.lbHttpPassword.Text = "密 码:";
this.txtHttpProxyUserName.BackColor = Color.White;
this.txtHttpProxyUserName.BorderStyle = BorderStyle.FixedSingle;
this.txtHttpProxyUserName.Location = new Point(70, 150);
this.txtHttpProxyUserName.MaxLength = 50;
this.txtHttpProxyUserName.Name = "txtHttpProxyUserName";
this.txtHttpProxyUserName.Size = new Size(0x99, 20);
this.txtHttpProxyUserName.TabIndex = 7;
this.lbHttpUser.AutoSize = true;
this.lbHttpUser.BorderColor = Color.Empty;
this.lbHttpUser.ButtonBorderStyle = ButtonBorderStyle.None;
this.lbHttpUser.Location = new Point(0x12, 0x99);
this.lbHttpUser.Name = "lbHttpUser";
this.lbHttpUser.Size = new Size(0x2e, 13);
this.lbHttpUser.TabIndex = 11;
this.lbHttpUser.Text = "用户名:";
this.txtHttpProxyServerAdress.BackColor = Color.White;
this.txtHttpProxyServerAdress.BorderStyle = BorderStyle.FixedSingle;
this.txtHttpProxyServerAdress.Location = new Point(70, 0x80);
this.txtHttpProxyServerAdress.MaxLength = 0xff;
this.txtHttpProxyServerAdress.Name = "txtHttpProxyServerAdress";
this.txtHttpProxyServerAdress.Size = new Size(0x99, 20);
this.txtHttpProxyServerAdress.TabIndex = 5;
this.txtHttpProxyServerAdress.Leave += new EventHandler(this.txtHttpProxyServerAdress_Leave);
this.txtHttpProxyServerAdress.TextChanged += new EventHandler(this.txtHttpProxyServerAdress_TextChanged);
this.lbHttpProxyServer.AutoSize = true;
this.lbHttpProxyServer.BorderColor = Color.Empty;
this.lbHttpProxyServer.ButtonBorderStyle = ButtonBorderStyle.None;
this.lbHttpProxyServer.Location = new Point(0x12, 0x84);
this.lbHttpProxyServer.Name = "lbHttpProxyServer";
this.lbHttpProxyServer.Size = new Size(0x2e, 13);
this.lbHttpProxyServer.TabIndex = 13;
this.lbHttpProxyServer.Text = "服务器:";
this.btnTestSocks.Enabled = false;
this.btnTestSocks.Location = new Point(0x107, 0x10a);
this.btnTestSocks.Name = "btnTestSocks";
this.btnTestSocks.Size = new Size(0x4b, 0x17);
this.btnTestSocks.TabIndex = 7;
this.btnTestSocks.Text = "测试...";
this.btnTestSocks.UseVisualStyleBackColor = true;
this.btnTestSocks.Visible = false;
this.btnTestSocks.Click += new EventHandler(this.btnTestSocks_Click);
this.txtSocksPassword.BackColor = Color.White;
this.txtSocksPassword.BorderStyle = BorderStyle.FixedSingle;
this.txtSocksPassword.Location = new Point(0x43, 0x10a);
this.txtSocksPassword.MaxLength = 50;
this.txtSocksPassword.Name = "txtSocksPassword";
this.txtSocksPassword.Size = new Size(0x99, 20);
this.txtSocksPassword.TabIndex = 6;
this.txtSocksPassword.UseSystemPasswordChar = true;
this.txtSocksPassword.Visible = false;
this.lbSocksPassword.AutoSize = true;
this.lbSocksPassword.BorderColor = Color.Empty;
this.lbSocksPassword.ButtonBorderStyle = ButtonBorderStyle.None;
this.lbSocksPassword.Location = new Point(15, 0x10c);
this.lbSocksPassword.Name = "lbSocksPassword";
this.lbSocksPassword.Size = new Size(0x2e, 13);
this.lbSocksPassword.TabIndex = 10;
this.lbSocksPassword.Text = "密 码:";
this.lbSocksPassword.Visible = false;
this.txtSocksUserName.BackColor = Color.White;
this.txtSocksUserName.BorderStyle = BorderStyle.FixedSingle;
this.txtSocksUserName.Location = new Point(0x43, 0xf4);
this.txtSocksUserName.MaxLength = 50;
this.txtSocksUserName.Name = "txtSocksUserName";
this.txtSocksUserName.Size = new Size(0x99, 20);
this.txtSocksUserName.TabIndex = 5;
this.txtSocksUserName.Visible = false;
this.lbSocksUser.AutoSize = true;
this.lbSocksUser.BorderColor = Color.Empty;
this.lbSocksUser.ButtonBorderStyle = ButtonBorderStyle.None;
this.lbSocksUser.Location = new Point(15, 0xf6);
this.lbSocksUser.Name = "lbSocksUser";
this.lbSocksUser.Size = new Size(0x2e, 13);
this.lbSocksUser.TabIndex = 8;
this.lbSocksUser.Text = "用户名:";
this.lbSocksUser.Visible = false;
this.txtSockServerAddress.BackColor = Color.White;
this.txtSockServerAddress.BorderStyle = BorderStyle.FixedSingle;
this.txtSockServerAddress.Location = new Point(0x43, 0xde);
this.txtSockServerAddress.MaxLength = 0xff;
this.txtSockServerAddress.Name = "txtSockServerAddress";
this.txtSockServerAddress.Size = new Size(0x99, 20);
this.txtSockServerAddress.TabIndex = 3;
this.txtSockServerAddress.Visible = false;
this.txtSockServerAddress.Leave += new EventHandler(this.txtSockServerAddress_Leave);
this.txtSockServerAddress.TextChanged += new EventHandler(this.txtSockServerAddress_TextChanged);
this.txtSocksPort.BackColor = Color.White;
this.txtSocksPort.BorderStyle = BorderStyle.FixedSingle;
this.txtSocksPort.Location = new Point(0x107, 0xde);
this.txtSocksPort.MaxLength = 5;
this.txtSocksPort.Name = "txtSocksPort";
this.txtSocksPort.Size = new Size(0x49, 20);
this.txtSocksPort.TabIndex = 4;
this.txtSocksPort.Text = "1080";
this.txtSocksPort.Visible = false;
this.txtSocksPort.Leave += new EventHandler(this.txtSocksPort_Leave);
this.lbSocksServer.AutoSize = true;
this.lbSocksServer.BorderColor = Color.Empty;
this.lbSocksServer.ButtonBorderStyle = ButtonBorderStyle.None;
this.lbSocksServer.Location = new Point(15, 0xe1);
this.lbSocksServer.Name = "lbSocksServer";
this.lbSocksServer.Size = new Size(0x2e, 13);
this.lbSocksServer.TabIndex = 4;
this.lbSocksServer.Text = "服务器:";
this.lbSocksServer.Visible = false;
this.btnTestTcp.Enabled = false;
this.btnTestTcp.Location = new Point(0x109, 0x24);
this.btnTestTcp.Name = "btnTestTcp";
this.btnTestTcp.Size = new Size(0x4b, 0x17);
this.btnTestTcp.TabIndex = 1;
this.btnTestTcp.Text = "测试...";
this.btnTestTcp.UseVisualStyleBackColor = true;
this.btnTestTcp.Click += new EventHandler(this.btnTestDirect_Click);
this.lbDirectly.BorderColor = Color.Empty;
this.lbDirectly.ButtonBorderStyle = ButtonBorderStyle.None;
this.lbDirectly.Location = new Point(0x18, 0x27);
this.lbDirectly.Name = "lbDirectly";
this.lbDirectly.Size = new Size(0xeb, 30);
this.lbDirectly.TabIndex = 1;
this.lbDirectly.Text = "直接连接到服务器,不使用代理。 在网络情况允许时,这是最稳定的连接方式。";
this.ctlPromptHttpSetting.BorderColor = Color.Empty;
this.ctlPromptHttpSetting.ButtonBorderStyle = ButtonBorderStyle.None;
this.ctlPromptHttpSetting.Location = new Point(0x19, 0x61);
this.ctlPromptHttpSetting.Name = "ctlPromptHttpSetting";
this.ctlPromptHttpSetting.Size = new Size(0x13c, 0x21);
this.ctlPromptHttpSetting.TabIndex = 12;
this.ctlPromptHttpSetting.Text = "请在 Internet Explorer 中设置 HTTP 代理服务器和端口。 如需指定用户名和密码,请在此处填写。";
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
base.Controls.Add(label);
base.Controls.Add(this.gbNetworkConfig);
base.Controls.Add(this.gbConnStatus);
base.Name = "SsNetworkControl";
base.Size = new Size(0x16b, 0x1b9);
base.Load += new EventHandler(this.SsNetworkControl_Load);
this.gbConnStatus.ResumeLayout(false);
this.gbConnStatus.PerformLayout();
((ISupportInitialize) this.pbConnStatus).EndInit();
this.gbNetworkConfig.ResumeLayout(false);
this.gbNetworkConfig.PerformLayout();
base.ResumeLayout(false);
}
private static bool IsValidProxy(string input)
{
return ConnectionManagerImp.VerfiyProxyHost(input);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -