Cleanup code

This commit is contained in:
ChsBuffer
2020-07-05 12:21:35 +08:00
parent 6439e8394c
commit 797e34997f
27 changed files with 633 additions and 599 deletions

View File

@@ -2,6 +2,7 @@
using System.Drawing;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using Netch.Utils;
namespace Netch.Forms.Server
{
@@ -22,16 +23,16 @@ namespace Netch.Forms.Server
private void ShadowsocksR_Load(object sender, EventArgs e)
{
ConfigurationGroupBox.Text = Utils.i18N.Translate(ConfigurationGroupBox.Text);
RemarkLabel.Text = Utils.i18N.Translate(RemarkLabel.Text);
AddressLabel.Text = Utils.i18N.Translate(AddressLabel.Text);
PasswordLabel.Text = Utils.i18N.Translate(PasswordLabel.Text);
EncryptMethodLabel.Text = Utils.i18N.Translate(EncryptMethodLabel.Text);
ProtocolLabel.Text = Utils.i18N.Translate(ProtocolLabel.Text);
ProtocolParamLabel.Text = Utils.i18N.Translate(ProtocolParamLabel.Text);
OBFSLabel.Text = Utils.i18N.Translate(OBFSLabel.Text);
OBFSParamLabel.Text = Utils.i18N.Translate(OBFSParamLabel.Text);
ControlButton.Text = Utils.i18N.Translate(ControlButton.Text);
ConfigurationGroupBox.Text = i18N.Translate(ConfigurationGroupBox.Text);
RemarkLabel.Text = i18N.Translate(RemarkLabel.Text);
AddressLabel.Text = i18N.Translate(AddressLabel.Text);
PasswordLabel.Text = i18N.Translate(PasswordLabel.Text);
EncryptMethodLabel.Text = i18N.Translate(EncryptMethodLabel.Text);
ProtocolLabel.Text = i18N.Translate(ProtocolLabel.Text);
ProtocolParamLabel.Text = i18N.Translate(ProtocolParamLabel.Text);
OBFSLabel.Text = i18N.Translate(OBFSLabel.Text);
OBFSParamLabel.Text = i18N.Translate(OBFSParamLabel.Text);
ControlButton.Text = i18N.Translate(ControlButton.Text);
foreach (var encrypt in Global.EncryptMethods.SSR)
{
@@ -139,8 +140,8 @@ namespace Netch.Forms.Server
};
}
Utils.Configuration.Save();
MessageBox.Show(Utils.i18N.Translate("Saved"), Utils.i18N.Translate("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
Configuration.Save();
MessageBox.Show(i18N.Translate("Saved"), i18N.Translate("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
Global.MainForm.InitServer();
Close();
}