Browse Source

auto layout

tags/2.3
clowwindy 9 years ago
parent
commit
06b92a3c0a
3 changed files with 135 additions and 72 deletions
  1. +16
    -10
      shadowsocks-csharp/Properties/Resources.Designer.cs
  2. +114
    -62
      shadowsocks-csharp/View/ConfigForm.Designer.cs
  3. +5
    -0
      shadowsocks-csharp/View/ConfigForm.cs

+ 16
- 10
shadowsocks-csharp/Properties/Resources.Designer.cs View File

@@ -61,22 +61,23 @@ namespace Shadowsocks.Properties {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Enable=启用
///Mode=模式
///PAC=PAC
///Global=全局
///Servers=服务器
/// Looks up a localized string similar to Shadowsocks=Shadowsocks
///Enable=启用代理
///Mode=代理模式
///PAC=PAC 模式
///Global=全局模式
///Servers=服务器选择
///Edit Servers...=编辑服务器... ///Edit Servers...=编辑服务器...
///Start on Boot=自动启动 ///Start on Boot=自动启动
///Share over LAN=在局域网共享代理 ///Share over LAN=在局域网共享代理
///Edit PAC File...=修改 PAC 文件...
///Edit PAC File...=编辑 PAC 文件...
///Show QRCode...=显示二维码... ///Show QRCode...=显示二维码...
///Show Logs...=显示日志... ///Show Logs...=显示日志...
///About...=关于... ///About...=关于...
///Quit=退出 ///Quit=退出
///Edit Servers=编辑服务器 ///Edit Servers=编辑服务器
///Add=添加
///Delete=删除
///&amp;Add=添加(&amp;A)
///&amp;Delete=删除(&amp;D)
///Server=服务器 ///Server=服务器
///Server IP=服务器 IP ///Server IP=服务器 IP
///Server Port=服务器端口 ///Server Port=服务器端口
@@ -84,8 +85,13 @@ namespace Shadowsocks.Properties {
///Encryption=加密 ///Encryption=加密
///Proxy Port=代理端口 ///Proxy Port=代理端口
///Remarks=备注 ///Remarks=备注
///
///.
///OK=确定
///Cancel=取消
///New server=未配置的服务器
///QRCode=二维码
///Shadowsocks Error: {0}=Shadowsocks 错误: {0}
///Port already in use=端口已被占用
///Il [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal static string cn { internal static string cn {
get { get {


+ 114
- 62
shadowsocks-csharp/View/ConfigForm.Designer.cs View File

@@ -44,16 +44,18 @@
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.OKButton = new System.Windows.Forms.Button(); this.OKButton = new System.Windows.Forms.Button();
this.MyCancelButton = new System.Windows.Forms.Button(); this.MyCancelButton = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.DeleteButton = new System.Windows.Forms.Button(); this.DeleteButton = new System.Windows.Forms.Button();
this.AddButton = new System.Windows.Forms.Button(); this.AddButton = new System.Windows.Forms.Button();
this.ServerGroupBox = new System.Windows.Forms.GroupBox(); this.ServerGroupBox = new System.Windows.Forms.GroupBox();
this.ServersListBox = new System.Windows.Forms.ListBox(); this.ServersListBox = new System.Windows.Forms.ListBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
this.panel1.SuspendLayout();
this.panel3.SuspendLayout();
this.ServerGroupBox.SuspendLayout(); this.ServerGroupBox.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.tableLayoutPanel3.SuspendLayout();
this.tableLayoutPanel4.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// tableLayoutPanel1 // tableLayoutPanel1
@@ -76,9 +78,9 @@
this.tableLayoutPanel1.Controls.Add(this.EncryptionLabel, 0, 3); this.tableLayoutPanel1.Controls.Add(this.EncryptionLabel, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.EncryptionSelect, 1, 3); this.tableLayoutPanel1.Controls.Add(this.EncryptionSelect, 1, 3);
this.tableLayoutPanel1.Location = new System.Drawing.Point(8, 21); this.tableLayoutPanel1.Location = new System.Drawing.Point(8, 21);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(5);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(5);
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(3);
this.tableLayoutPanel1.RowCount = 6; this.tableLayoutPanel1.RowCount = 6;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
@@ -86,13 +88,13 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(242, 167);
this.tableLayoutPanel1.Size = new System.Drawing.Size(238, 163);
this.tableLayoutPanel1.TabIndex = 0; this.tableLayoutPanel1.TabIndex = 0;
// //
// RemarksTextBox // RemarksTextBox
// //
this.RemarksTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.RemarksTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.RemarksTextBox.Location = new System.Drawing.Point(74, 139);
this.RemarksTextBox.Location = new System.Drawing.Point(72, 137);
this.RemarksTextBox.Name = "RemarksTextBox"; this.RemarksTextBox.Name = "RemarksTextBox";
this.RemarksTextBox.Size = new System.Drawing.Size(160, 20); this.RemarksTextBox.Size = new System.Drawing.Size(160, 20);
this.RemarksTextBox.TabIndex = 10; this.RemarksTextBox.TabIndex = 10;
@@ -102,7 +104,7 @@
// //
this.RemarksLabel.Anchor = System.Windows.Forms.AnchorStyles.Right; this.RemarksLabel.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.RemarksLabel.AutoSize = true; this.RemarksLabel.AutoSize = true;
this.RemarksLabel.Location = new System.Drawing.Point(19, 142);
this.RemarksLabel.Location = new System.Drawing.Point(17, 140);
this.RemarksLabel.Name = "RemarksLabel"; this.RemarksLabel.Name = "RemarksLabel";
this.RemarksLabel.Size = new System.Drawing.Size(49, 13); this.RemarksLabel.Size = new System.Drawing.Size(49, 13);
this.RemarksLabel.TabIndex = 9; this.RemarksLabel.TabIndex = 9;
@@ -112,7 +114,7 @@
// //
this.IPLabel.Anchor = System.Windows.Forms.AnchorStyles.Right; this.IPLabel.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.IPLabel.AutoSize = true; this.IPLabel.AutoSize = true;
this.IPLabel.Location = new System.Drawing.Point(17, 11);
this.IPLabel.Location = new System.Drawing.Point(15, 9);
this.IPLabel.Name = "IPLabel"; this.IPLabel.Name = "IPLabel";
this.IPLabel.Size = new System.Drawing.Size(51, 13); this.IPLabel.Size = new System.Drawing.Size(51, 13);
this.IPLabel.TabIndex = 0; this.IPLabel.TabIndex = 0;
@@ -122,7 +124,7 @@
// //
this.ServerPortLabel.Anchor = System.Windows.Forms.AnchorStyles.Right; this.ServerPortLabel.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.ServerPortLabel.AutoSize = true; this.ServerPortLabel.AutoSize = true;
this.ServerPortLabel.Location = new System.Drawing.Point(8, 37);
this.ServerPortLabel.Location = new System.Drawing.Point(6, 35);
this.ServerPortLabel.Name = "ServerPortLabel"; this.ServerPortLabel.Name = "ServerPortLabel";
this.ServerPortLabel.Size = new System.Drawing.Size(60, 13); this.ServerPortLabel.Size = new System.Drawing.Size(60, 13);
this.ServerPortLabel.TabIndex = 1; this.ServerPortLabel.TabIndex = 1;
@@ -131,7 +133,7 @@
// ProxyPortTextBox // ProxyPortTextBox
// //
this.ProxyPortTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.ProxyPortTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.ProxyPortTextBox.Location = new System.Drawing.Point(74, 113);
this.ProxyPortTextBox.Location = new System.Drawing.Point(72, 111);
this.ProxyPortTextBox.Name = "ProxyPortTextBox"; this.ProxyPortTextBox.Name = "ProxyPortTextBox";
this.ProxyPortTextBox.Size = new System.Drawing.Size(160, 20); this.ProxyPortTextBox.Size = new System.Drawing.Size(160, 20);
this.ProxyPortTextBox.TabIndex = 4; this.ProxyPortTextBox.TabIndex = 4;
@@ -141,7 +143,7 @@
// //
this.ProxyPortLabel.Anchor = System.Windows.Forms.AnchorStyles.Right; this.ProxyPortLabel.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.ProxyPortLabel.AutoSize = true; this.ProxyPortLabel.AutoSize = true;
this.ProxyPortLabel.Location = new System.Drawing.Point(13, 116);
this.ProxyPortLabel.Location = new System.Drawing.Point(11, 114);
this.ProxyPortLabel.Name = "ProxyPortLabel"; this.ProxyPortLabel.Name = "ProxyPortLabel";
this.ProxyPortLabel.Size = new System.Drawing.Size(55, 13); this.ProxyPortLabel.Size = new System.Drawing.Size(55, 13);
this.ProxyPortLabel.TabIndex = 3; this.ProxyPortLabel.TabIndex = 3;
@@ -151,7 +153,7 @@
// //
this.PasswordLabel.Anchor = System.Windows.Forms.AnchorStyles.Right; this.PasswordLabel.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.PasswordLabel.AutoSize = true; this.PasswordLabel.AutoSize = true;
this.PasswordLabel.Location = new System.Drawing.Point(15, 63);
this.PasswordLabel.Location = new System.Drawing.Point(13, 61);
this.PasswordLabel.Name = "PasswordLabel"; this.PasswordLabel.Name = "PasswordLabel";
this.PasswordLabel.Size = new System.Drawing.Size(53, 13); this.PasswordLabel.Size = new System.Drawing.Size(53, 13);
this.PasswordLabel.TabIndex = 2; this.PasswordLabel.TabIndex = 2;
@@ -160,7 +162,7 @@
// IPTextBox // IPTextBox
// //
this.IPTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.IPTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.IPTextBox.Location = new System.Drawing.Point(74, 8);
this.IPTextBox.Location = new System.Drawing.Point(72, 6);
this.IPTextBox.Name = "IPTextBox"; this.IPTextBox.Name = "IPTextBox";
this.IPTextBox.Size = new System.Drawing.Size(160, 20); this.IPTextBox.Size = new System.Drawing.Size(160, 20);
this.IPTextBox.TabIndex = 0; this.IPTextBox.TabIndex = 0;
@@ -169,7 +171,7 @@
// ServerPortTextBox // ServerPortTextBox
// //
this.ServerPortTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.ServerPortTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.ServerPortTextBox.Location = new System.Drawing.Point(74, 34);
this.ServerPortTextBox.Location = new System.Drawing.Point(72, 32);
this.ServerPortTextBox.Name = "ServerPortTextBox"; this.ServerPortTextBox.Name = "ServerPortTextBox";
this.ServerPortTextBox.Size = new System.Drawing.Size(160, 20); this.ServerPortTextBox.Size = new System.Drawing.Size(160, 20);
this.ServerPortTextBox.TabIndex = 1; this.ServerPortTextBox.TabIndex = 1;
@@ -178,7 +180,7 @@
// PasswordTextBox // PasswordTextBox
// //
this.PasswordTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.PasswordTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.PasswordTextBox.Location = new System.Drawing.Point(74, 60);
this.PasswordTextBox.Location = new System.Drawing.Point(72, 58);
this.PasswordTextBox.Name = "PasswordTextBox"; this.PasswordTextBox.Name = "PasswordTextBox";
this.PasswordTextBox.PasswordChar = '*'; this.PasswordTextBox.PasswordChar = '*';
this.PasswordTextBox.Size = new System.Drawing.Size(160, 20); this.PasswordTextBox.Size = new System.Drawing.Size(160, 20);
@@ -189,7 +191,7 @@
// //
this.EncryptionLabel.Anchor = System.Windows.Forms.AnchorStyles.Right; this.EncryptionLabel.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.EncryptionLabel.AutoSize = true; this.EncryptionLabel.AutoSize = true;
this.EncryptionLabel.Location = new System.Drawing.Point(11, 90);
this.EncryptionLabel.Location = new System.Drawing.Point(9, 88);
this.EncryptionLabel.Name = "EncryptionLabel"; this.EncryptionLabel.Name = "EncryptionLabel";
this.EncryptionLabel.Size = new System.Drawing.Size(57, 13); this.EncryptionLabel.Size = new System.Drawing.Size(57, 13);
this.EncryptionLabel.TabIndex = 8; this.EncryptionLabel.TabIndex = 8;
@@ -212,7 +214,7 @@
"aes-192-cfb", "aes-192-cfb",
"aes-128-cfb", "aes-128-cfb",
"rc4"}); "rc4"});
this.EncryptionSelect.Location = new System.Drawing.Point(74, 86);
this.EncryptionSelect.Location = new System.Drawing.Point(72, 84);
this.EncryptionSelect.Name = "EncryptionSelect"; this.EncryptionSelect.Name = "EncryptionSelect";
this.EncryptionSelect.Size = new System.Drawing.Size(160, 21); this.EncryptionSelect.Size = new System.Drawing.Size(160, 21);
this.EncryptionSelect.TabIndex = 3; this.EncryptionSelect.TabIndex = 3;
@@ -222,7 +224,7 @@
this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top; this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.panel2.AutoSize = true; this.panel2.AutoSize = true;
this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.panel2.Location = new System.Drawing.Point(164, 175);
this.panel2.Location = new System.Drawing.Point(207, 187);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(0, 0); this.panel2.Size = new System.Drawing.Size(0, 0);
this.panel2.TabIndex = 1; this.panel2.TabIndex = 1;
@@ -230,7 +232,9 @@
// OKButton // OKButton
// //
this.OKButton.DialogResult = System.Windows.Forms.DialogResult.OK; this.OKButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.OKButton.Location = new System.Drawing.Point(4, 4);
this.OKButton.Dock = System.Windows.Forms.DockStyle.Right;
this.OKButton.Location = new System.Drawing.Point(3, 3);
this.OKButton.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0);
this.OKButton.Name = "OKButton"; this.OKButton.Name = "OKButton";
this.OKButton.Size = new System.Drawing.Size(75, 23); this.OKButton.Size = new System.Drawing.Size(75, 23);
this.OKButton.TabIndex = 8; this.OKButton.TabIndex = 8;
@@ -241,7 +245,9 @@
// MyCancelButton // MyCancelButton
// //
this.MyCancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.MyCancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.MyCancelButton.Location = new System.Drawing.Point(87, 4);
this.MyCancelButton.Dock = System.Windows.Forms.DockStyle.Right;
this.MyCancelButton.Location = new System.Drawing.Point(84, 3);
this.MyCancelButton.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0);
this.MyCancelButton.Name = "MyCancelButton"; this.MyCancelButton.Name = "MyCancelButton";
this.MyCancelButton.Size = new System.Drawing.Size(75, 23); this.MyCancelButton.Size = new System.Drawing.Size(75, 23);
this.MyCancelButton.TabIndex = 9; this.MyCancelButton.TabIndex = 9;
@@ -249,34 +255,13 @@
this.MyCancelButton.UseVisualStyleBackColor = true; this.MyCancelButton.UseVisualStyleBackColor = true;
this.MyCancelButton.Click += new System.EventHandler(this.CancelButton_Click); this.MyCancelButton.Click += new System.EventHandler(this.CancelButton_Click);
// //
// panel1
//
this.panel1.AutoSize = true;
this.panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.panel1.Controls.Add(this.MyCancelButton);
this.panel1.Controls.Add(this.OKButton);
this.panel1.Location = new System.Drawing.Point(313, 247);
this.panel1.Margin = new System.Windows.Forms.Padding(0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(165, 30);
this.panel1.TabIndex = 1;
//
// panel3
//
this.panel3.AutoSize = true;
this.panel3.Controls.Add(this.DeleteButton);
this.panel3.Controls.Add(this.AddButton);
this.panel3.Location = new System.Drawing.Point(12, 220);
this.panel3.Margin = new System.Windows.Forms.Padding(0);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(192, 31);
this.panel3.TabIndex = 5;
//
// DeleteButton // DeleteButton
// //
this.DeleteButton.Location = new System.Drawing.Point(100, 4);
this.DeleteButton.Dock = System.Windows.Forms.DockStyle.Right;
this.DeleteButton.Location = new System.Drawing.Point(86, 6);
this.DeleteButton.Margin = new System.Windows.Forms.Padding(3, 6, 0, 3);
this.DeleteButton.Name = "DeleteButton"; this.DeleteButton.Name = "DeleteButton";
this.DeleteButton.Size = new System.Drawing.Size(89, 23);
this.DeleteButton.Size = new System.Drawing.Size(80, 23);
this.DeleteButton.TabIndex = 7; this.DeleteButton.TabIndex = 7;
this.DeleteButton.Text = "&Delete"; this.DeleteButton.Text = "&Delete";
this.DeleteButton.UseVisualStyleBackColor = true; this.DeleteButton.UseVisualStyleBackColor = true;
@@ -284,9 +269,11 @@
// //
// AddButton // AddButton
// //
this.AddButton.Location = new System.Drawing.Point(4, 4);
this.AddButton.Dock = System.Windows.Forms.DockStyle.Left;
this.AddButton.Location = new System.Drawing.Point(0, 6);
this.AddButton.Margin = new System.Windows.Forms.Padding(0, 6, 3, 3);
this.AddButton.Name = "AddButton"; this.AddButton.Name = "AddButton";
this.AddButton.Size = new System.Drawing.Size(89, 23);
this.AddButton.Size = new System.Drawing.Size(80, 23);
this.AddButton.TabIndex = 6; this.AddButton.TabIndex = 6;
this.AddButton.Text = "&Add"; this.AddButton.Text = "&Add";
this.AddButton.UseVisualStyleBackColor = true; this.AddButton.UseVisualStyleBackColor = true;
@@ -294,10 +281,13 @@
// //
// ServerGroupBox // ServerGroupBox
// //
this.ServerGroupBox.AutoSize = true;
this.ServerGroupBox.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ServerGroupBox.Controls.Add(this.tableLayoutPanel1); this.ServerGroupBox.Controls.Add(this.tableLayoutPanel1);
this.ServerGroupBox.Location = new System.Drawing.Point(220, 12);
this.ServerGroupBox.Location = new System.Drawing.Point(178, 0);
this.ServerGroupBox.Margin = new System.Windows.Forms.Padding(12, 0, 0, 0);
this.ServerGroupBox.Name = "ServerGroupBox"; this.ServerGroupBox.Name = "ServerGroupBox";
this.ServerGroupBox.Size = new System.Drawing.Size(258, 199);
this.ServerGroupBox.Size = new System.Drawing.Size(249, 200);
this.ServerGroupBox.TabIndex = 6; this.ServerGroupBox.TabIndex = 6;
this.ServerGroupBox.TabStop = false; this.ServerGroupBox.TabStop = false;
this.ServerGroupBox.Text = "Server"; this.ServerGroupBox.Text = "Server";
@@ -305,29 +295,88 @@
// ServersListBox // ServersListBox
// //
this.ServersListBox.FormattingEnabled = true; this.ServersListBox.FormattingEnabled = true;
this.ServersListBox.Location = new System.Drawing.Point(12, 12);
this.ServersListBox.IntegralHeight = false;
this.ServersListBox.Location = new System.Drawing.Point(0, 0);
this.ServersListBox.Margin = new System.Windows.Forms.Padding(0);
this.ServersListBox.Name = "ServersListBox"; this.ServersListBox.Name = "ServersListBox";
this.ServersListBox.Size = new System.Drawing.Size(192, 199);
this.ServersListBox.Size = new System.Drawing.Size(166, 148);
this.ServersListBox.TabIndex = 5; this.ServersListBox.TabIndex = 5;
this.ServersListBox.SelectedIndexChanged += new System.EventHandler(this.ServersListBox_SelectedIndexChanged); this.ServersListBox.SelectedIndexChanged += new System.EventHandler(this.ServersListBox_SelectedIndexChanged);
// //
// tableLayoutPanel2
//
this.tableLayoutPanel2.AutoSize = true;
this.tableLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel3, 1, 2);
this.tableLayoutPanel2.Controls.Add(this.ServersListBox, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.ServerGroupBox, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel4, 0, 1);
this.tableLayoutPanel2.Location = new System.Drawing.Point(12, 12);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 3;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.Size = new System.Drawing.Size(427, 264);
this.tableLayoutPanel2.TabIndex = 7;
//
// tableLayoutPanel3
//
this.tableLayoutPanel3.AutoSize = true;
this.tableLayoutPanel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.tableLayoutPanel3.ColumnCount = 2;
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel3.Controls.Add(this.MyCancelButton, 1, 0);
this.tableLayoutPanel3.Controls.Add(this.OKButton, 0, 0);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Right;
this.tableLayoutPanel3.Location = new System.Drawing.Point(268, 235);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(3, 3, 0, 3);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 1;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel3.Size = new System.Drawing.Size(159, 26);
this.tableLayoutPanel3.TabIndex = 8;
//
// tableLayoutPanel4
//
this.tableLayoutPanel4.AutoSize = true;
this.tableLayoutPanel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.tableLayoutPanel4.ColumnCount = 2;
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel4.Controls.Add(this.DeleteButton, 1, 0);
this.tableLayoutPanel4.Controls.Add(this.AddButton, 0, 0);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel4.Location = new System.Drawing.Point(0, 200);
this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 1;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel4.Size = new System.Drawing.Size(166, 32);
this.tableLayoutPanel4.TabIndex = 8;
//
// ConfigForm // ConfigForm
// //
this.AcceptButton = this.OKButton; this.AcceptButton = this.OKButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoSize = true; this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.CancelButton = this.MyCancelButton; this.CancelButton = this.MyCancelButton;
this.ClientSize = new System.Drawing.Size(489, 287);
this.Controls.Add(this.ServersListBox);
this.Controls.Add(this.ServerGroupBox);
this.Controls.Add(this.panel1);
this.Controls.Add(this.panel3);
this.ClientSize = new System.Drawing.Size(574, 367);
this.Controls.Add(this.tableLayoutPanel2);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "ConfigForm"; this.Name = "ConfigForm";
this.Padding = new System.Windows.Forms.Padding(12, 12, 12, 9);
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Edit Servers"; this.Text = "Edit Servers";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ConfigForm_FormClosed); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ConfigForm_FormClosed);
@@ -335,10 +384,12 @@
this.Shown += new System.EventHandler(this.ConfigForm_Shown); this.Shown += new System.EventHandler(this.ConfigForm_Shown);
this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout(); this.tableLayoutPanel1.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.ServerGroupBox.ResumeLayout(false); this.ServerGroupBox.ResumeLayout(false);
this.ServerGroupBox.PerformLayout(); this.ServerGroupBox.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
this.tableLayoutPanel3.ResumeLayout(false);
this.tableLayoutPanel4.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@@ -360,14 +411,15 @@
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button OKButton; private System.Windows.Forms.Button OKButton;
private System.Windows.Forms.Button MyCancelButton; private System.Windows.Forms.Button MyCancelButton;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Button DeleteButton; private System.Windows.Forms.Button DeleteButton;
private System.Windows.Forms.Button AddButton; private System.Windows.Forms.Button AddButton;
private System.Windows.Forms.GroupBox ServerGroupBox; private System.Windows.Forms.GroupBox ServerGroupBox;
private System.Windows.Forms.ListBox ServersListBox; private System.Windows.Forms.ListBox ServersListBox;
private System.Windows.Forms.TextBox RemarksTextBox; private System.Windows.Forms.TextBox RemarksTextBox;
private System.Windows.Forms.Label RemarksLabel; private System.Windows.Forms.Label RemarksLabel;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
} }
} }

+ 5
- 0
shadowsocks-csharp/View/ConfigForm.cs View File

@@ -24,6 +24,11 @@ namespace Shadowsocks.View
{ {
this.Font = System.Drawing.SystemFonts.DialogFont; this.Font = System.Drawing.SystemFonts.DialogFont;
InitializeComponent(); InitializeComponent();
// a dirty hack
this.ServersListBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.PerformLayout();
UpdateTexts(); UpdateTexts();
this.Icon = Icon.FromHandle(Resources.ssw128.GetHicon()); this.Icon = Icon.FromHandle(Resources.ssw128.GetHicon());


Loading…
Cancel
Save