diff --git a/v2rayN/v2rayN/Forms/AddServer3Form.Designer.cs b/v2rayN/v2rayN/Forms/AddServer3Form.Designer.cs index 0722261f..f8e5a6cb 100644 --- a/v2rayN/v2rayN/Forms/AddServer3Form.Designer.cs +++ b/v2rayN/v2rayN/Forms/AddServer3Form.Designer.cs @@ -45,25 +45,20 @@ this.panel2 = new System.Windows.Forms.Panel(); this.btnOK = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); - this.menuServer = new System.Windows.Forms.MenuStrip(); - this.MenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.menuItemImportClipboard = new System.Windows.Forms.ToolStripMenuItem(); this.groupBox1.SuspendLayout(); this.panel2.SuspendLayout(); - this.menuServer.SuspendLayout(); this.SuspendLayout(); // // btnClose // - resources.ApplyResources(this.btnClose, "btnClose"); this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; + resources.ApplyResources(this.btnClose, "btnClose"); this.btnClose.Name = "btnClose"; this.btnClose.UseVisualStyleBackColor = true; this.btnClose.Click += new System.EventHandler(this.btnClose_Click); // // groupBox1 // - resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Controls.Add(this.label13); this.groupBox1.Controls.Add(this.cmbSecurity); this.groupBox1.Controls.Add(this.txtRemarks); @@ -75,6 +70,7 @@ this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.txtAddress); this.groupBox1.Controls.Add(this.label1); + resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Name = "groupBox1"; this.groupBox1.TabStop = false; // @@ -85,7 +81,6 @@ // // cmbSecurity // - resources.ApplyResources(this.cmbSecurity, "cmbSecurity"); this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbSecurity.FormattingEnabled = true; this.cmbSecurity.Items.AddRange(new object[] { @@ -95,6 +90,7 @@ resources.GetString("cmbSecurity.Items3"), resources.GetString("cmbSecurity.Items4"), resources.GetString("cmbSecurity.Items5")}); + resources.ApplyResources(this.cmbSecurity, "cmbSecurity"); this.cmbSecurity.Name = "cmbSecurity"; // // txtRemarks @@ -144,9 +140,9 @@ // // panel2 // - resources.ApplyResources(this.panel2, "panel2"); this.panel2.Controls.Add(this.btnClose); this.panel2.Controls.Add(this.btnOK); + resources.ApplyResources(this.panel2, "panel2"); this.panel2.Name = "panel2"; // // btnOK @@ -161,26 +157,6 @@ resources.ApplyResources(this.panel1, "panel1"); this.panel1.Name = "panel1"; // - // menuServer - // - resources.ApplyResources(this.menuServer, "menuServer"); - this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.MenuItem1}); - this.menuServer.Name = "menuServer"; - // - // MenuItem1 - // - resources.ApplyResources(this.MenuItem1, "MenuItem1"); - this.MenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.menuItemImportClipboard}); - this.MenuItem1.Name = "MenuItem1"; - // - // menuItemImportClipboard - // - resources.ApplyResources(this.menuItemImportClipboard, "menuItemImportClipboard"); - this.menuItemImportClipboard.Name = "menuItemImportClipboard"; - this.menuItemImportClipboard.Click += new System.EventHandler(this.menuItemImportClipboard_Click); - // // AddServer3Form // resources.ApplyResources(this, "$this"); @@ -189,7 +165,6 @@ this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); - this.Controls.Add(this.menuServer); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MinimizeBox = true; this.Name = "AddServer3Form"; @@ -197,10 +172,7 @@ this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.panel2.ResumeLayout(false); - this.menuServer.ResumeLayout(false); - this.menuServer.PerformLayout(); this.ResumeLayout(false); - this.PerformLayout(); } @@ -222,8 +194,5 @@ private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Label label13; - private System.Windows.Forms.MenuStrip menuServer; - private System.Windows.Forms.ToolStripMenuItem MenuItem1; - private System.Windows.Forms.ToolStripMenuItem menuItemImportClipboard; } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/AddServer3Form.cs b/v2rayN/v2rayN/Forms/AddServer3Form.cs index d1a4a858..6eda1582 100644 --- a/v2rayN/v2rayN/Forms/AddServer3Form.cs +++ b/v2rayN/v2rayN/Forms/AddServer3Form.cs @@ -100,41 +100,7 @@ namespace v2rayN.Forms private void btnClose_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.Cancel; - } - - - #region 导入配置 - - /// - /// 从剪贴板导入URL - /// - /// - /// - private void menuItemImportClipboard_Click(object sender, EventArgs e) - { - ImportConfig(); - } - - private void ImportConfig() - { - ClearServer(); - - VmessItem vmessItem = ShareHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg); - if (vmessItem == null) - { - UI.ShowWarning(msg); - return; - } - - txtAddress.Text = vmessItem.address; - txtPort.Text = vmessItem.port.ToString(); - cmbSecurity.Text = vmessItem.security; - txtId.Text = vmessItem.id; - txtRemarks.Text = vmessItem.remarks; - } - - #endregion - + } } } diff --git a/v2rayN/v2rayN/Forms/AddServer3Form.resx b/v2rayN/v2rayN/Forms/AddServer3Form.resx index 2f1a661e..11e4d167 100644 --- a/v2rayN/v2rayN/Forms/AddServer3Form.resx +++ b/v2rayN/v2rayN/Forms/AddServer3Form.resx @@ -118,486 +118,435 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 113, 12 + + 396, 17 - - 53, 12 - - - label6 - - - groupBox1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 547, 25 + + 75, 23 - - 11 + + 4 + + + &Cancel + + + btnClose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + True NoControl - - $this + + 426, 158 + + + 113, 12 + + + 22 + + + * Fill in manually + + + label13 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 groupBox1 - - 8 - - - Bottom - - - Import configuration file - - - Alias (remarks) - - - 3 - - - Password - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuItemImportClipboard - - - Fill - - - groupBox1 - - - 8 - - - 89, 12 - - - 127, 27 - - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 0 aes-256-gcm - - 6 + + aes-128-gcm - - 5 + + chacha20-poly1305 - - 303, 17 + + chacha20-ietf-poly1305 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + none - - 4 - - - MenuItem1 - - - 0 - - - 359, 21 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 396, 17 - - - 8 - - - 0, 0 - - - label1 - - - 547, 60 - - - 0, 25 - - - Encryption - - - groupBox1 - - - True - - - 22 - - - 162, 21 + + plain 127, 123 - - 127, 91 + + 278, 20 + + + 6 + + + cmbSecurity + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 1 + + + 127, 154 + + + 278, 21 + + + 11 + + + txtRemarks + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 2 + + + True + + + 12, 155 + + + 95, 12 + + + 10 + + + Alias (remarks) + + + label6 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 3 + + + True + + + 12, 124 + + + 65, 12 + + + 8 + + + Encryption + + + label5 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 groupBox1 - - panel2 + + 4 - + + 127, 91 + + + 278, 21 + + 5 - - 2 - - - groupBox1 - - - True - - - label5 - txtId System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 12, 31 - - + groupBox1 - - 1 - - - AddServer3Form - - - 278, 21 - - - groupBox1 - - - 127, 59 - - - 0 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - btnOK - - - $this - - - 71, 12 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 12, 124 - - - 2 - - - groupBox1 - - - txtPort - - - aes-128-gcm - - - 7 - - - 547, 10 - - - 0, 35 - 5 - - 235, 22 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Edit or add a [Shadowsocks] server - - - &OK - - - chacha20-poly1305 - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 75, 23 - - - btnClose - - - panel2 - - - 0 - - - 3 + + True 12, 93 - - 278, 20 + + 53, 12 - - 10 + + 4 - - chacha20-ietf-poly1305 + + Password - - True + + label3 - - panel2 - - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + groupBox1 + + + 6 + + + 127, 59 + 194, 21 + + 3 + + + txtPort + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 7 + + + True + + + 12, 62 + + + 71, 12 + + + 2 + + + Server port + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 8 + + + 127, 27 + + + 359, 21 + 1 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + txtAddress - - 6 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + groupBox1 - - 7 + + 9 - - label13 + + True - - none + + 12, 31 - + + 89, 12 + + + 0 + + + Server address + + + label1 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 groupBox1 - - v2rayN.Forms.BaseServerForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - label3 - - - Server port - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Top - - - 0, 231 - - - 9 - - - plain - - - 4 - - - &Cancel - - - True - - - 6, 12 - - - True - - - Server address - - - menuServer - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 127, 154 - - - 95, 12 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - * Fill in manually - 10 - - label2 + + Fill - - panel1 - - - 12, 62 - - - 547, 291 - - - cmbSecurity - - - $this + + 0, 10 - 547, 196 + 547, 221 - + 3 - - 75, 23 - - - 6 - - - 426, 158 - - - 65, 12 - - - 4 - - - 2 - - - 1 - - - - - - txtAddress - - - Import URL from clipboard - - - groupBox1 - Server - - txtRemarks - - - 12, 155 - - - True - - - 278, 21 + + groupBox1 System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + $this + + + 0 + + + 303, 17 + + + 75, 23 + + + 5 + + + &OK + + + btnOK + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + Bottom + + + 0, 231 + + + 547, 60 + + + 7 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Top + + + 0, 0 + + + 547, 10 + + + 6 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 True - - 17, 17 - + + 6, 12 + + + 547, 291 + + + Edit or add a [Shadowsocks] server + + + AddServer3Form + + + v2rayN.Forms.BaseServerForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/AddServer4Form.Designer.cs b/v2rayN/v2rayN/Forms/AddServer4Form.Designer.cs index bdcd694a..628e6c9e 100644 --- a/v2rayN/v2rayN/Forms/AddServer4Form.Designer.cs +++ b/v2rayN/v2rayN/Forms/AddServer4Form.Designer.cs @@ -45,25 +45,20 @@ this.panel2 = new System.Windows.Forms.Panel(); this.btnOK = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); - this.menuServer = new System.Windows.Forms.MenuStrip(); - this.MenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.menuItemImportClipboard = new System.Windows.Forms.ToolStripMenuItem(); this.groupBox1.SuspendLayout(); this.panel2.SuspendLayout(); - this.menuServer.SuspendLayout(); this.SuspendLayout(); // // btnClose // - resources.ApplyResources(this.btnClose, "btnClose"); this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; + resources.ApplyResources(this.btnClose, "btnClose"); this.btnClose.Name = "btnClose"; this.btnClose.UseVisualStyleBackColor = true; this.btnClose.Click += new System.EventHandler(this.btnClose_Click); // // groupBox1 // - resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Controls.Add(this.txtSecurity); this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.txtId); @@ -75,6 +70,7 @@ this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.txtAddress); this.groupBox1.Controls.Add(this.label1); + resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Name = "groupBox1"; this.groupBox1.TabStop = false; // @@ -135,9 +131,9 @@ // // panel2 // - resources.ApplyResources(this.panel2, "panel2"); this.panel2.Controls.Add(this.btnClose); this.panel2.Controls.Add(this.btnOK); + resources.ApplyResources(this.panel2, "panel2"); this.panel2.Name = "panel2"; // // btnOK @@ -152,26 +148,6 @@ resources.ApplyResources(this.panel1, "panel1"); this.panel1.Name = "panel1"; // - // menuServer - // - resources.ApplyResources(this.menuServer, "menuServer"); - this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.MenuItem1}); - this.menuServer.Name = "menuServer"; - // - // MenuItem1 - // - resources.ApplyResources(this.MenuItem1, "MenuItem1"); - this.MenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.menuItemImportClipboard}); - this.MenuItem1.Name = "MenuItem1"; - // - // menuItemImportClipboard - // - resources.ApplyResources(this.menuItemImportClipboard, "menuItemImportClipboard"); - this.menuItemImportClipboard.Name = "menuItemImportClipboard"; - this.menuItemImportClipboard.Click += new System.EventHandler(this.menuItemImportClipboard_Click); - // // AddServer4Form // resources.ApplyResources(this, "$this"); @@ -180,7 +156,6 @@ this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); - this.Controls.Add(this.menuServer); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MinimizeBox = true; this.Name = "AddServer4Form"; @@ -188,10 +163,7 @@ this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.panel2.ResumeLayout(false); - this.menuServer.ResumeLayout(false); - this.menuServer.PerformLayout(); this.ResumeLayout(false); - this.PerformLayout(); } @@ -209,9 +181,6 @@ private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Label label13; - private System.Windows.Forms.MenuStrip menuServer; - private System.Windows.Forms.ToolStripMenuItem MenuItem1; - private System.Windows.Forms.ToolStripMenuItem menuItemImportClipboard; private System.Windows.Forms.TextBox txtId; private System.Windows.Forms.Label label3; private System.Windows.Forms.TextBox txtSecurity; diff --git a/v2rayN/v2rayN/Forms/AddServer4Form.cs b/v2rayN/v2rayN/Forms/AddServer4Form.cs index 29102347..66d63999 100644 --- a/v2rayN/v2rayN/Forms/AddServer4Form.cs +++ b/v2rayN/v2rayN/Forms/AddServer4Form.cs @@ -90,40 +90,7 @@ namespace v2rayN.Forms { this.DialogResult = DialogResult.Cancel; } - - - #region 导入配置 - - /// - /// 从剪贴板导入URL - /// - /// - /// - private void menuItemImportClipboard_Click(object sender, EventArgs e) - { - ImportConfig(); - } - - private void ImportConfig() - { - ClearServer(); - - VmessItem vmessItem = ShareHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg); - if (vmessItem == null) - { - UI.ShowWarning(msg); - return; - } - - txtAddress.Text = vmessItem.address; - txtPort.Text = vmessItem.port.ToString(); - txtSecurity.Text = vmessItem.security; - txtId.Text = vmessItem.id; - txtRemarks.Text = vmessItem.remarks; - } - - #endregion - + } } diff --git a/v2rayN/v2rayN/Forms/AddServer4Form.resx b/v2rayN/v2rayN/Forms/AddServer4Form.resx index 396e263d..e70189c3 100644 --- a/v2rayN/v2rayN/Forms/AddServer4Form.resx +++ b/v2rayN/v2rayN/Forms/AddServer4Form.resx @@ -118,471 +118,420 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 113, 12 + + 396, 17 - - 113, 12 + + 75, 23 - - label6 + + + 4 + + + &Cancel + + + btnClose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + 127, 89 + + + 278, 21 + + + 26 + + + txtSecurity + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 groupBox1 - - + + 0 + + True - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 547, 25 - - - 11 - - - Bottom + + NoControl - - Import configuration file + + 12, 93 - - panel1 + + 89, 12 - - 3 + + 25 + + + User(Optional) + + + label4 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 1 + + + 127, 120 + + + 278, 21 + + + 24 + + + txtId + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 2 + + + True + + + NoControl + + + 12, 124 + + + 113, 12 + + + 23 Password(Optional) - + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 3 + + + True + + + 422, 155 + + + 113, 12 + + + 22 + + + * Fill in manually + + + label13 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 4 + + + 127, 151 + + + 278, 21 + + + 11 + + + txtRemarks + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 5 + + + True + + + 12, 155 + + + 95, 12 + + + 10 + + + Alias (remarks) + + + label6 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 groupBox1 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuItemImportClipboard - - - Fill - - - groupBox1 - - - 8 - - - 89, 12 - - - 127, 27 - - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 4 - - - Edit or add a [Socks] server - - - NoControl - - - 10 - - - 24 - - - Import URL from clipboard - - - 303, 17 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 23 - - - MenuItem1 - - - 0 - - - 359, 21 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 396, 17 - - - 8 - - - 0, 0 - - - label1 - - - 547, 60 - - - 0, 25 - - - groupBox1 - - - True - - - 22 - - - 162, 21 - - - True - - - 127, 120 - - - panel2 - - - groupBox1 - - - 5 - - - 2 - - - 26 - - - groupBox1 - - - menuServer - - - groupBox1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - NoControl - - - txtId - - - 235, 22 - - - 12, 93 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 12, 31 - - - groupBox1 - - - 1 - - - AddServer4Form - - - 278, 21 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 + + 6 127, 58 - - 1 - - - 0 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 71, 12 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - groupBox1 - - - txtPort - - - panel2 - - - 547, 10 - - - 0, 35 - - - 2 - - - txtSecurity - - - $this - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - label4 - - - &OK - - - btnClose - - - 278, 21 - - - 0 - - - 3 - - - 12, 124 - - - 2 - - - 10 - - - btnOK - 194, 21 - - 1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 6 - - - 1 - - - 7 - - - label13 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - v2rayN.Forms.BaseServerForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - label3 - - - Server port - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0, 231 - - - 9 - - - &Cancel - - - True - - - 6, 12 - - - Server address - - - 25 - - - txtAddress - - - 127, 151 - - - 95, 12 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Alias (remarks) - - - * Fill in manually - - - 7 - - - label2 - - - 12, 62 - - - 547, 291 - - - $this - - - 547, 196 - - - 6 - - - 0 - - - 75, 23 - - - 3 - - - 127, 89 - - - 422, 155 - - - True - - - 4 - - - 5 - - - - - - 75, 23 - - - 89, 12 - - - groupBox1 - - - groupBox1 - - - Server - - - txtRemarks - - - 12, 155 - - - True - - - User(Optional) - - - 278, 21 - - - Top - 3 + + txtPort + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 7 + + + True + + + 12, 62 + + + 71, 12 + + + 2 + + + Server port + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 8 + + + 127, 27 + + + 359, 21 + + + 1 + + + txtAddress + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 9 + + + True + + + 12, 31 + + + 89, 12 + + + 0 + + + Server address + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 10 + + + Fill + + + 0, 10 + + + 547, 221 + + + 3 + + + Server + + + groupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + 303, 17 + + + 75, 23 + + + 5 + + + &OK + + + btnOK + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + Bottom + + + 0, 231 + + + 547, 60 + + + 7 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Top + + + 0, 0 + + + 547, 10 + + + 6 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + True - - 17, 17 - + + 6, 12 + + + 547, 291 + + + Edit or add a [Socks] server + + + AddServer4Form + + + v2rayN.Forms.BaseServerForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/AddServer5Form.Designer.cs b/v2rayN/v2rayN/Forms/AddServer5Form.Designer.cs index 9e7cab4f..bd68c62f 100644 --- a/v2rayN/v2rayN/Forms/AddServer5Form.Designer.cs +++ b/v2rayN/v2rayN/Forms/AddServer5Form.Designer.cs @@ -36,6 +36,7 @@ this.btnGUID = new System.Windows.Forms.Button(); this.label13 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.label25 = new System.Windows.Forms.Label(); this.label24 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); this.panTlsMore = new System.Windows.Forms.Panel(); @@ -74,18 +75,10 @@ this.panel2 = new System.Windows.Forms.Panel(); this.btnOK = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); - this.menuServer = new System.Windows.Forms.MenuStrip(); - this.MenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.MenuItemImportClient = new System.Windows.Forms.ToolStripMenuItem(); - this.MenuItemImportServer = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.MenuItemImportClipboard = new System.Windows.Forms.ToolStripMenuItem(); - this.label25 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.panTlsMore.SuspendLayout(); this.panel2.SuspendLayout(); - this.menuServer.SuspendLayout(); this.SuspendLayout(); // // btnClose @@ -174,6 +167,11 @@ this.groupBox2.Name = "groupBox2"; this.groupBox2.TabStop = false; // + // label25 + // + resources.ApplyResources(this.label25, "label25"); + this.label25.Name = "label25"; + // // label24 // resources.ApplyResources(this.label24, "label24"); @@ -409,51 +407,6 @@ resources.ApplyResources(this.panel1, "panel1"); this.panel1.Name = "panel1"; // - // menuServer - // - this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.MenuItem1}); - resources.ApplyResources(this.menuServer, "menuServer"); - this.menuServer.Name = "menuServer"; - // - // MenuItem1 - // - this.MenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.MenuItemImportClient, - this.MenuItemImportServer, - this.toolStripSeparator1, - this.MenuItemImportClipboard}); - this.MenuItem1.Name = "MenuItem1"; - resources.ApplyResources(this.MenuItem1, "MenuItem1"); - // - // MenuItemImportClient - // - this.MenuItemImportClient.Name = "MenuItemImportClient"; - resources.ApplyResources(this.MenuItemImportClient, "MenuItemImportClient"); - this.MenuItemImportClient.Click += new System.EventHandler(this.MenuItemImportClient_Click); - // - // MenuItemImportServer - // - this.MenuItemImportServer.Name = "MenuItemImportServer"; - resources.ApplyResources(this.MenuItemImportServer, "MenuItemImportServer"); - this.MenuItemImportServer.Click += new System.EventHandler(this.MenuItemImportServer_Click); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1"); - // - // MenuItemImportClipboard - // - this.MenuItemImportClipboard.Name = "MenuItemImportClipboard"; - resources.ApplyResources(this.MenuItemImportClipboard, "MenuItemImportClipboard"); - this.MenuItemImportClipboard.Click += new System.EventHandler(this.MenuItemImportClipboard_Click); - // - // label25 - // - resources.ApplyResources(this.label25, "label25"); - this.label25.Name = "label25"; - // // AddServer5Form // resources.ApplyResources(this, "$this"); @@ -462,7 +415,6 @@ this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); - this.Controls.Add(this.menuServer); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Name = "AddServer5Form"; this.Load += new System.EventHandler(this.AddServer5Form_Load); @@ -473,10 +425,7 @@ this.panTlsMore.ResumeLayout(false); this.panTlsMore.PerformLayout(); this.panel2.ResumeLayout(false); - this.menuServer.ResumeLayout(false); - this.menuServer.PerformLayout(); this.ResumeLayout(false); - this.PerformLayout(); } @@ -508,14 +457,8 @@ private System.Windows.Forms.Label label12; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label13; - private System.Windows.Forms.MenuStrip menuServer; - private System.Windows.Forms.ToolStripMenuItem MenuItem1; - private System.Windows.Forms.ToolStripMenuItem MenuItemImportClient; - private System.Windows.Forms.ToolStripMenuItem MenuItemImportServer; private System.Windows.Forms.Label label15; private System.Windows.Forms.ComboBox cmbStreamSecurity; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripMenuItem MenuItemImportClipboard; private System.Windows.Forms.Button btnGUID; private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label14; diff --git a/v2rayN/v2rayN/Forms/AddServer5Form.cs b/v2rayN/v2rayN/Forms/AddServer5Form.cs index 1a389b3d..6fd71ad6 100644 --- a/v2rayN/v2rayN/Forms/AddServer5Form.cs +++ b/v2rayN/v2rayN/Forms/AddServer5Form.cs @@ -190,101 +190,5 @@ namespace v2rayN.Forms panTlsMore.Show(); } } - - #region 导入客户端/服务端配置 - - /// - /// 导入客户端 - /// - /// - /// - private void MenuItemImportClient_Click(object sender, EventArgs e) - { - MenuItemImport(1); - } - - /// - /// 导入服务端 - /// - /// - /// - private void MenuItemImportServer_Click(object sender, EventArgs e) - { - MenuItemImport(2); - } - - private void MenuItemImport(int type) - { - ClearServer(); - - OpenFileDialog fileDialog = new OpenFileDialog - { - Multiselect = false, - Filter = "Config|*.json|All|*.*" - }; - if (fileDialog.ShowDialog() != DialogResult.OK) - { - return; - } - string fileName = fileDialog.FileName; - if (Utils.IsNullOrEmpty(fileName)) - { - return; - } - string msg; - VmessItem vmessItem; - if (type.Equals(1)) - { - vmessItem = V2rayConfigHandler.ImportFromClientConfig(fileName, out msg); - } - else - { - vmessItem = V2rayConfigHandler.ImportFromServerConfig(fileName, out msg); - } - if (vmessItem == null) - { - UI.ShowWarning(msg); - return; - } - - txtAddress.Text = vmessItem.address; - txtPort.Text = vmessItem.port.ToString(); - txtId.Text = vmessItem.id; - txtRemarks.Text = vmessItem.remarks; - cmbNetwork.Text = vmessItem.network; - cmbHeaderType.Text = vmessItem.headerType; - txtRequestHost.Text = vmessItem.requestHost; - txtPath.Text = vmessItem.path; - cmbStreamSecurity.Text = vmessItem.streamSecurity; - } - - /// - /// 从剪贴板导入URL - /// - /// - /// - private void MenuItemImportClipboard_Click(object sender, EventArgs e) - { - ClearServer(); - - VmessItem vmessItem = ShareHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out string msg); - if (vmessItem == null) - { - UI.ShowWarning(msg); - return; - } - - txtAddress.Text = vmessItem.address; - txtPort.Text = vmessItem.port.ToString(); - txtId.Text = vmessItem.id; - txtRemarks.Text = vmessItem.remarks; - cmbNetwork.Text = vmessItem.network; - cmbHeaderType.Text = vmessItem.headerType; - txtRequestHost.Text = vmessItem.requestHost; - txtPath.Text = vmessItem.path; - cmbStreamSecurity.Text = vmessItem.streamSecurity; - } - #endregion - } } diff --git a/v2rayN/v2rayN/Forms/AddServer5Form.resx b/v2rayN/v2rayN/Forms/AddServer5Form.resx index 5a9fa9be..0bd3ebb9 100644 --- a/v2rayN/v2rayN/Forms/AddServer5Form.resx +++ b/v2rayN/v2rayN/Forms/AddServer5Form.resx @@ -970,7 +970,7 @@ Bottom - 3, 215 + 3, 240 723, 281 @@ -1270,10 +1270,10 @@ Fill - 0, 35 + 0, 10 - 729, 499 + 729, 524 3 @@ -1345,7 +1345,7 @@ Top - 0, 25 + 0, 0 729, 10 @@ -1365,57 +1365,6 @@ 2 - - 17, 17 - - - 237, 22 - - - Import client configuration - - - 237, 22 - - - Import server configuration - - - 234, 6 - - - 237, 22 - - - Import URL from clipboard - - - 162, 21 - - - Import configuration file - - - 0, 0 - - - 729, 25 - - - 8 - - - menuServer - - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - True @@ -1431,36 +1380,6 @@ Edit or add a [VLESS] server - - MenuItem1 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MenuItemImportClient - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MenuItemImportServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator1 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MenuItemImportClipboard - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - AddServer5Form