mirror of
https://github.com/netchx/netch.git
synced 2026-05-07 22:44:03 +08:00
remove: ServerForm.CreateComboBox parse argument
This commit is contained in:
@@ -62,7 +62,7 @@ namespace Netch.Forms
|
||||
);
|
||||
}
|
||||
|
||||
protected void CreateComboBox(string name, string remark, List<string> values, Func<string, bool> parse, Action<string> save, string value, int width = InputBoxWidth)
|
||||
protected void CreateComboBox(string name, string remark, List<string> values, Action<string> save, string value, int width = InputBoxWidth)
|
||||
{
|
||||
_controlLines++;
|
||||
|
||||
@@ -78,7 +78,6 @@ namespace Netch.Forms
|
||||
comboBox.Items.AddRange(values.ToArray());
|
||||
comboBox.SelectedIndex = values.IndexOf(value);
|
||||
comboBox.DrawItem += Utils.Utils.DrawCenterComboBox;
|
||||
_checkActions.Add(comboBox, parse);
|
||||
_saveActions.Add(comboBox, o => save.Invoke((string) o));
|
||||
ConfigurationGroupBox.Controls.AddRange(
|
||||
new Control[]
|
||||
@@ -123,7 +122,7 @@ namespace Netch.Forms
|
||||
|
||||
private void ServerForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.Text = TypeName ?? string.Empty;
|
||||
Text = TypeName ?? string.Empty;
|
||||
|
||||
RemarkTextBox.Text = Server.Remark;
|
||||
AddressTextBox.Text = Server.Hostname;
|
||||
|
||||
@@ -16,7 +16,6 @@ namespace Netch.Servers.Shadowsocks.Form
|
||||
server.Password);
|
||||
CreateComboBox("EncryptMethod", "Encrypt Method",
|
||||
SSGlobal.EncryptMethods,
|
||||
s => SSGlobal.EncryptMethods.Contains(s),
|
||||
s => server.EncryptMethod = s,
|
||||
server.EncryptMethod);
|
||||
CreateTextBox("Plugin", "Plugin",
|
||||
|
||||
@@ -16,12 +16,10 @@ namespace Netch.Servers.ShadowsocksR.Form
|
||||
server.Password);
|
||||
CreateComboBox("EncryptMethod", "Encrypt Method",
|
||||
SSRGlobal.EncryptMethods,
|
||||
s => SSRGlobal.EncryptMethods.Contains(s),
|
||||
s => server.EncryptMethod = s,
|
||||
server.EncryptMethod);
|
||||
CreateComboBox("Protocol", "Protocol",
|
||||
SSRGlobal.Protocols,
|
||||
s => SSRGlobal.Protocols.Contains(s),
|
||||
s => server.Protocol = s,
|
||||
server.Protocol);
|
||||
CreateTextBox("ProtocolParam", "Protocol Param",
|
||||
@@ -30,7 +28,6 @@ namespace Netch.Servers.ShadowsocksR.Form
|
||||
server.ProtocolParam);
|
||||
CreateComboBox("OBFS", "OBFS",
|
||||
SSRGlobal.OBFSs,
|
||||
s => SSRGlobal.OBFSs.Contains(s),
|
||||
s => server.OBFS = s,
|
||||
server.OBFS);
|
||||
CreateTextBox("OBFSParam", "OBFS Param",
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Netch.Servers.Trojan
|
||||
{
|
||||
public class TrojanUtil : IServerUtil
|
||||
{
|
||||
public ushort Priority { get; } = 2;
|
||||
public ushort Priority { get; } = 3;
|
||||
public string TypeName { get; } = "Trojan";
|
||||
public string FullName { get; } = "Trojan";
|
||||
public string ShortName { get; } = "TR";
|
||||
|
||||
@@ -21,17 +21,14 @@ namespace Netch.Servers.VMess.Form
|
||||
76);
|
||||
CreateComboBox("EncryptMethod", "Encrypt Method",
|
||||
VMessGlobal.EncryptMethods,
|
||||
s => VMessGlobal.EncryptMethods.Contains(s),
|
||||
s => server.EncryptMethod = s,
|
||||
server.EncryptMethod);
|
||||
CreateComboBox("TransferProtocol", "Transfer Protocol",
|
||||
VMessGlobal.TransferProtocols,
|
||||
s => VMessGlobal.TransferProtocols.Contains(s),
|
||||
s => server.TransferProtocol = s,
|
||||
server.TransferProtocol);
|
||||
CreateComboBox("FakeType", "Fake Type",
|
||||
VMessGlobal.FakeTypes,
|
||||
s => VMessGlobal.FakeTypes.Contains(s),
|
||||
s => server.FakeType = s,
|
||||
server.FakeType);
|
||||
CreateTextBox("Host", "Host",
|
||||
@@ -44,7 +41,6 @@ namespace Netch.Servers.VMess.Form
|
||||
server.Path);
|
||||
CreateComboBox("QUICSecurity", "QUIC Security",
|
||||
VMessGlobal.QUIC,
|
||||
s => VMessGlobal.QUIC.Contains(s),
|
||||
s => server.QUIC = s,
|
||||
server.QUIC);
|
||||
CreateTextBox("QUICSecret", "QUIC Secret",
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Netch.Servers.VMess
|
||||
{
|
||||
public class VMessUtil : IServerUtil
|
||||
{
|
||||
public ushort Priority { get; } = 2;
|
||||
public ushort Priority { get; } = 3;
|
||||
public string TypeName { get; } = "VMess";
|
||||
public string FullName { get; } = "VMess";
|
||||
public string ShortName { get; } = "V2";
|
||||
|
||||
Reference in New Issue
Block a user