@@ -21,7 +21,7 @@ Update Local PAC from GFWList=从 GFWList 更新本地 PAC | |||||
Edit User Rule for GFWList...=编辑 GFWList 的用户规则... | Edit User Rule for GFWList...=编辑 GFWList 的用户规则... | ||||
Secure Local PAC=保护本地 PAC | Secure Local PAC=保护本地 PAC | ||||
Copy Local PAC URL=复制本地 PAC 网址 | Copy Local PAC URL=复制本地 PAC 网址 | ||||
Show QRCode...=显示二维码... | |||||
Share Server Config...=分享服务器配置... | |||||
Scan QRCode from Screen...=扫描屏幕上的二维码... | Scan QRCode from Screen...=扫描屏幕上的二维码... | ||||
Availability Statistics=统计可用性 | Availability Statistics=统计可用性 | ||||
Show Logs...=显示日志... | Show Logs...=显示日志... | ||||
@@ -83,7 +83,7 @@ Outbound=出站 | |||||
# QRCode Form | # QRCode Form | ||||
QRCode=二维码 | |||||
QRCode and URL=二维码与 URL | |||||
# PAC Url Form | # PAC Url Form | ||||
@@ -21,7 +21,7 @@ Update Local PAC from GFWList=從 GFWList 更新本地 PAC | |||||
Edit User Rule for GFWList...=編輯 GFWList 的用戶規則... | Edit User Rule for GFWList...=編輯 GFWList 的用戶規則... | ||||
Secure Local PAC=保護本地 PAC | Secure Local PAC=保護本地 PAC | ||||
Copy Local PAC URL=複製本地 PAC 網址 | Copy Local PAC URL=複製本地 PAC 網址 | ||||
Show QRCode...=顯示 QR 碼... | |||||
Share Server Config...=分享伺服器配置... | |||||
Scan QRCode from Screen...=掃描螢幕上的 QR 碼... | Scan QRCode from Screen...=掃描螢幕上的 QR 碼... | ||||
Availability Statistics=統計可用性 | Availability Statistics=統計可用性 | ||||
Show Logs...=顯示日誌... | Show Logs...=顯示日誌... | ||||
@@ -83,7 +83,7 @@ Outbound=出站 | |||||
# QRCode Form | # QRCode Form | ||||
QRCode=QR 碼 | |||||
QRCode and URL=QR 碼与 URL | |||||
# PAC Url Form | # PAC Url Form | ||||
@@ -261,7 +261,7 @@ namespace Shadowsocks.View | |||||
this.SeperatorItem = new MenuItem("-"), | this.SeperatorItem = new MenuItem("-"), | ||||
this.ConfigItem = CreateMenuItem("Edit Servers...", new EventHandler(this.Config_Click)), | this.ConfigItem = CreateMenuItem("Edit Servers...", new EventHandler(this.Config_Click)), | ||||
CreateMenuItem("Statistics Config...", StatisticsConfigItem_Click), | CreateMenuItem("Statistics Config...", StatisticsConfigItem_Click), | ||||
CreateMenuItem("Show QRCode...", new EventHandler(this.QRCodeItem_Click)), | |||||
CreateMenuItem("Share Server Config...", new EventHandler(this.QRCodeItem_Click)), | |||||
CreateMenuItem("Scan QRCode from Screen...", new EventHandler(this.ScanQRCodeItem_Click)) | CreateMenuItem("Scan QRCode from Screen...", new EventHandler(this.ScanQRCodeItem_Click)) | ||||
}), | }), | ||||
CreateMenuGroup("PAC ", new MenuItem[] { | CreateMenuGroup("PAC ", new MenuItem[] { | ||||
@@ -30,6 +30,7 @@ | |||||
{ | { | ||||
this.pictureBox1 = new System.Windows.Forms.PictureBox(); | this.pictureBox1 = new System.Windows.Forms.PictureBox(); | ||||
this.listBox1 = new System.Windows.Forms.ListBox(); | this.listBox1 = new System.Windows.Forms.ListBox(); | ||||
this.textBoxURL = new System.Windows.Forms.TextBox(); | |||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); | ||||
this.SuspendLayout(); | this.SuspendLayout(); | ||||
// | // | ||||
@@ -56,6 +57,15 @@ | |||||
this.listBox1.ValueMember = "Key"; | this.listBox1.ValueMember = "Key"; | ||||
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged); | this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged); | ||||
// | // | ||||
// textBoxURL | |||||
// | |||||
this.textBoxURL.Location = new System.Drawing.Point(10, 227); | |||||
this.textBoxURL.Name = "textBoxURL"; | |||||
this.textBoxURL.ReadOnly = true; | |||||
this.textBoxURL.Size = new System.Drawing.Size(441, 21); | |||||
this.textBoxURL.TabIndex = 3; | |||||
this.textBoxURL.Click += new System.EventHandler(this.textBoxURL_Click); | |||||
// | |||||
// QRCodeForm | // QRCodeForm | ||||
// | // | ||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); | ||||
@@ -63,7 +73,8 @@ | |||||
this.AutoSize = true; | this.AutoSize = true; | ||||
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; | this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; | ||||
this.BackColor = System.Drawing.Color.White; | this.BackColor = System.Drawing.Color.White; | ||||
this.ClientSize = new System.Drawing.Size(457, 228); | |||||
this.ClientSize = new System.Drawing.Size(457, 257); | |||||
this.Controls.Add(this.textBoxURL); | |||||
this.Controls.Add(this.listBox1); | this.Controls.Add(this.listBox1); | ||||
this.Controls.Add(this.pictureBox1); | this.Controls.Add(this.pictureBox1); | ||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | ||||
@@ -72,10 +83,11 @@ | |||||
this.Name = "QRCodeForm"; | this.Name = "QRCodeForm"; | ||||
this.Padding = new System.Windows.Forms.Padding(10); | this.Padding = new System.Windows.Forms.Padding(10); | ||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | ||||
this.Text = "QRCode"; | |||||
this.Text = "QRCode and URL"; | |||||
this.Load += new System.EventHandler(this.QRCodeForm_Load); | this.Load += new System.EventHandler(this.QRCodeForm_Load); | ||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); | ||||
this.ResumeLayout(false); | this.ResumeLayout(false); | ||||
this.PerformLayout(); | |||||
} | } | ||||
@@ -83,5 +95,6 @@ | |||||
private System.Windows.Forms.PictureBox pictureBox1; | private System.Windows.Forms.PictureBox pictureBox1; | ||||
private System.Windows.Forms.ListBox listBox1; | private System.Windows.Forms.ListBox listBox1; | ||||
private System.Windows.Forms.TextBox textBoxURL; | |||||
} | } | ||||
} | } |
@@ -24,7 +24,7 @@ namespace Shadowsocks.View | |||||
this.code = code; | this.code = code; | ||||
InitializeComponent(); | InitializeComponent(); | ||||
this.Icon = Icon.FromHandle(Resources.ssw128.GetHicon()); | this.Icon = Icon.FromHandle(Resources.ssw128.GetHicon()); | ||||
this.Text = I18N.GetString("QRCode"); | |||||
this.Text = I18N.GetString("QRCode and URL"); | |||||
} | } | ||||
private void GenQR(string ssconfig) | private void GenQR(string ssconfig) | ||||
@@ -69,7 +69,14 @@ namespace Shadowsocks.View | |||||
private void listBox1_SelectedIndexChanged(object sender, EventArgs e) | private void listBox1_SelectedIndexChanged(object sender, EventArgs e) | ||||
{ | { | ||||
GenQR((sender as ListBox)?.SelectedValue.ToString()); | |||||
var url = (sender as ListBox)?.SelectedValue.ToString(); | |||||
GenQR(url); | |||||
textBoxURL.Text = url; | |||||
} | |||||
private void textBoxURL_Click(object sender, EventArgs e) | |||||
{ | |||||
textBoxURL.SelectAll(); | |||||
} | } | ||||
} | } | ||||
} | } |