@@ -191,6 +191,20 @@ namespace Shadowsocks.Controller | |||||
} | } | ||||
} | } | ||||
public void DisableProxy() | |||||
{ | |||||
_config.useProxy = false; | |||||
SaveConfig(_config); | |||||
} | |||||
public void EnableProxy(string proxy, int port) | |||||
{ | |||||
_config.useProxy = true; | |||||
_config.proxyServer = proxy; | |||||
_config.proxyPort = port; | |||||
SaveConfig(_config); | |||||
} | |||||
public void SelectServerIndex(int index) | public void SelectServerIndex(int index) | ||||
{ | { | ||||
_config.index = index; | _config.index = index; | ||||
@@ -12,6 +12,7 @@ Servers=服务器 | |||||
Edit Servers...=编辑服务器... | Edit Servers...=编辑服务器... | ||||
Statistics Config...=统计配置... | Statistics Config...=统计配置... | ||||
Start on Boot=开机启动 | Start on Boot=开机启动 | ||||
Proxy...=代理设置... | |||||
Allow Clients from LAN=允许来自局域网的连接 | Allow Clients from LAN=允许来自局域网的连接 | ||||
Local PAC=使用本地 PAC | Local PAC=使用本地 PAC | ||||
Online PAC=使用在线 PAC | Online PAC=使用在线 PAC | ||||
@@ -50,6 +51,13 @@ New server=未配置的服务器 | |||||
Move &Up=上移(&U) | Move &Up=上移(&U) | ||||
Move D&own=下移(&O) | Move D&own=下移(&O) | ||||
# Proxy Form | |||||
Edit Proxy=代理设置 | |||||
Use Proxy=使用代理 | |||||
Proxy Addr=代理地址 | |||||
Proxy Port=代理端口 | |||||
# Log Form | # Log Form | ||||
&File=文件(&F) | &File=文件(&F) | ||||
@@ -25,6 +25,9 @@ namespace Shadowsocks.Model | |||||
public bool availabilityStatistics; | public bool availabilityStatistics; | ||||
public bool autoCheckUpdate; | public bool autoCheckUpdate; | ||||
public LogViewerConfig logViewer; | public LogViewerConfig logViewer; | ||||
public bool useProxy; | |||||
public string proxyServer; | |||||
public int proxyPort; | |||||
private static string CONFIG_FILE = "gui-config.json"; | private static string CONFIG_FILE = "gui-config.json"; | ||||
@@ -128,7 +131,7 @@ namespace Shadowsocks.Model | |||||
throw new ArgumentException(I18N.GetString("Password can not be blank")); | throw new ArgumentException(I18N.GetString("Password can not be blank")); | ||||
} | } | ||||
private static void CheckServer(string server) | |||||
public static void CheckServer(string server) | |||||
{ | { | ||||
if (server.IsNullOrEmpty()) | if (server.IsNullOrEmpty()) | ||||
throw new ArgumentException(I18N.GetString("Server IP can not be blank")); | throw new ArgumentException(I18N.GetString("Server IP can not be blank")); | ||||
@@ -45,7 +45,9 @@ namespace Shadowsocks.View | |||||
private MenuItem editGFWUserRuleItem; | private MenuItem editGFWUserRuleItem; | ||||
private MenuItem editOnlinePACItem; | private MenuItem editOnlinePACItem; | ||||
private MenuItem autoCheckUpdatesToggleItem; | private MenuItem autoCheckUpdatesToggleItem; | ||||
private MenuItem proxyItem; | |||||
private ConfigForm configForm; | private ConfigForm configForm; | ||||
private ProxyForm proxyForm; | |||||
private List<LogForm> logForms = new List<LogForm>(); | private List<LogForm> logForms = new List<LogForm>(); | ||||
private bool logFormsVisible = false; | private bool logFormsVisible = false; | ||||
private string _urlToOpen; | private string _urlToOpen; | ||||
@@ -211,6 +213,7 @@ namespace Shadowsocks.View | |||||
this.editGFWUserRuleItem = CreateMenuItem("Edit User Rule for GFWList...", new EventHandler(this.EditUserRuleFileForGFWListItem_Click)), | this.editGFWUserRuleItem = CreateMenuItem("Edit User Rule for GFWList...", new EventHandler(this.EditUserRuleFileForGFWListItem_Click)), | ||||
this.editOnlinePACItem = CreateMenuItem("Edit Online PAC URL...", new EventHandler(this.UpdateOnlinePACURLItem_Click)), | this.editOnlinePACItem = CreateMenuItem("Edit Online PAC URL...", new EventHandler(this.UpdateOnlinePACURLItem_Click)), | ||||
}), | }), | ||||
this.proxyItem = CreateMenuItem("Proxy...", new EventHandler(this.proxyItem_Click)), | |||||
new MenuItem("-"), | new MenuItem("-"), | ||||
this.AutoStartupItem = CreateMenuItem("Start on Boot", new EventHandler(this.AutoStartupItem_Click)), | this.AutoStartupItem = CreateMenuItem("Start on Boot", new EventHandler(this.AutoStartupItem_Click)), | ||||
this.ShareOverLANItem = CreateMenuItem("Allow Clients from LAN", new EventHandler(this.ShareOverLANItem_Click)), | this.ShareOverLANItem = CreateMenuItem("Allow Clients from LAN", new EventHandler(this.ShareOverLANItem_Click)), | ||||
@@ -377,6 +380,20 @@ namespace Shadowsocks.View | |||||
} | } | ||||
} | } | ||||
private void ShowProxyForm() | |||||
{ | |||||
if (proxyForm != null) | |||||
{ | |||||
proxyForm.Activate(); | |||||
} | |||||
else | |||||
{ | |||||
proxyForm = new ProxyForm(controller); | |||||
proxyForm.Show(); | |||||
proxyForm.FormClosed += proxyForm_FormClosed; | |||||
} | |||||
} | |||||
private void ShowLogForms() | private void ShowLogForms() | ||||
{ | { | ||||
if (logForms.Count == 0) | if (logForms.Count == 0) | ||||
@@ -415,6 +432,12 @@ namespace Shadowsocks.View | |||||
} | } | ||||
} | } | ||||
void proxyForm_FormClosed(object sender, FormClosedEventArgs e) | |||||
{ | |||||
proxyForm = null; | |||||
Utils.ReleaseMemory(true); | |||||
} | |||||
private void Config_Click(object sender, EventArgs e) | private void Config_Click(object sender, EventArgs e) | ||||
{ | { | ||||
ShowConfigForm(); | ShowConfigForm(); | ||||
@@ -721,5 +744,10 @@ namespace Shadowsocks.View | |||||
{ | { | ||||
updateChecker.CheckUpdate(controller.GetConfigurationCopy()); | updateChecker.CheckUpdate(controller.GetConfigurationCopy()); | ||||
} | } | ||||
private void proxyItem_Click(object sender, EventArgs e) | |||||
{ | |||||
ShowProxyForm(); | |||||
} | |||||
} | } | ||||
} | } |
@@ -0,0 +1,218 @@ | |||||
namespace Shadowsocks.View | |||||
{ | |||||
partial class ProxyForm | |||||
{ | |||||
/// <summary> | |||||
/// Required designer variable. | |||||
/// </summary> | |||||
private System.ComponentModel.IContainer components = null; | |||||
/// <summary> | |||||
/// Clean up any resources being used. | |||||
/// </summary> | |||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> | |||||
protected override void Dispose(bool disposing) | |||||
{ | |||||
if (disposing && (components != null)) | |||||
{ | |||||
components.Dispose(); | |||||
} | |||||
base.Dispose(disposing); | |||||
} | |||||
#region Windows Form Designer generated code | |||||
/// <summary> | |||||
/// Required method for Designer support - do not modify | |||||
/// the contents of this method with the code editor. | |||||
/// </summary> | |||||
private void InitializeComponent() | |||||
{ | |||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); | |||||
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); | |||||
this.MyCancelButton = new System.Windows.Forms.Button(); | |||||
this.OKButton = new System.Windows.Forms.Button(); | |||||
this.UseProxyCheckBox = new System.Windows.Forms.CheckBox(); | |||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); | |||||
this.ProxyAddrLabel = new System.Windows.Forms.Label(); | |||||
this.ProxyServerTextBox = new System.Windows.Forms.TextBox(); | |||||
this.ProxyPortLable = new System.Windows.Forms.Label(); | |||||
this.ProxyPortTextBox = new System.Windows.Forms.TextBox(); | |||||
this.tableLayoutPanel1.SuspendLayout(); | |||||
this.tableLayoutPanel3.SuspendLayout(); | |||||
this.tableLayoutPanel2.SuspendLayout(); | |||||
this.SuspendLayout(); | |||||
// | |||||
// tableLayoutPanel1 | |||||
// | |||||
this.tableLayoutPanel1.AutoSize = true; | |||||
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; | |||||
this.tableLayoutPanel1.ColumnCount = 1; | |||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); | |||||
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel3, 0, 2); | |||||
this.tableLayoutPanel1.Controls.Add(this.UseProxyCheckBox, 0, 0); | |||||
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 1); | |||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(15, 15); | |||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1"; | |||||
this.tableLayoutPanel1.RowCount = 3; | |||||
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(395, 87); | |||||
this.tableLayoutPanel1.TabIndex = 0; | |||||
// | |||||
// 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(236, 58); | |||||
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 = 9; | |||||
// | |||||
// MyCancelButton | |||||
// | |||||
this.MyCancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; | |||||
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.Size = new System.Drawing.Size(75, 23); | |||||
this.MyCancelButton.TabIndex = 13; | |||||
this.MyCancelButton.Text = "Cancel"; | |||||
this.MyCancelButton.UseVisualStyleBackColor = true; | |||||
this.MyCancelButton.Click += new System.EventHandler(this.CancelButton_Click); | |||||
// | |||||
// OKButton | |||||
// | |||||
this.OKButton.DialogResult = System.Windows.Forms.DialogResult.OK; | |||||
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.Size = new System.Drawing.Size(75, 23); | |||||
this.OKButton.TabIndex = 12; | |||||
this.OKButton.Text = "OK"; | |||||
this.OKButton.UseVisualStyleBackColor = true; | |||||
this.OKButton.Click += new System.EventHandler(this.OKButton_Click); | |||||
// | |||||
// UseProxyCheckBox | |||||
// | |||||
this.UseProxyCheckBox.AutoSize = true; | |||||
this.UseProxyCheckBox.Location = new System.Drawing.Point(3, 3); | |||||
this.UseProxyCheckBox.Name = "UseProxyCheckBox"; | |||||
this.UseProxyCheckBox.Size = new System.Drawing.Size(78, 16); | |||||
this.UseProxyCheckBox.TabIndex = 0; | |||||
this.UseProxyCheckBox.Text = "Use Proxy"; | |||||
this.UseProxyCheckBox.UseVisualStyleBackColor = true; | |||||
this.UseProxyCheckBox.CheckedChanged += new System.EventHandler(this.UseProxyCheckBox_CheckedChanged); | |||||
// | |||||
// tableLayoutPanel2 | |||||
// | |||||
this.tableLayoutPanel2.AutoSize = true; | |||||
this.tableLayoutPanel2.ColumnCount = 4; | |||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); | |||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); | |||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); | |||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); | |||||
this.tableLayoutPanel2.Controls.Add(this.ProxyAddrLabel, 0, 0); | |||||
this.tableLayoutPanel2.Controls.Add(this.ProxyServerTextBox, 1, 0); | |||||
this.tableLayoutPanel2.Controls.Add(this.ProxyPortLable, 2, 0); | |||||
this.tableLayoutPanel2.Controls.Add(this.ProxyPortTextBox, 3, 0); | |||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 25); | |||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2"; | |||||
this.tableLayoutPanel2.RowCount = 1; | |||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); | |||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(389, 27); | |||||
this.tableLayoutPanel2.TabIndex = 1; | |||||
// | |||||
// ProxyAddrLabel | |||||
// | |||||
this.ProxyAddrLabel.Anchor = System.Windows.Forms.AnchorStyles.Left; | |||||
this.ProxyAddrLabel.AutoSize = true; | |||||
this.ProxyAddrLabel.Location = new System.Drawing.Point(3, 7); | |||||
this.ProxyAddrLabel.Name = "ProxyAddrLabel"; | |||||
this.ProxyAddrLabel.Size = new System.Drawing.Size(65, 12); | |||||
this.ProxyAddrLabel.TabIndex = 0; | |||||
this.ProxyAddrLabel.Text = "Proxy Addr"; | |||||
// | |||||
// ProxyServerTextBox | |||||
// | |||||
this.ProxyServerTextBox.Location = new System.Drawing.Point(74, 3); | |||||
this.ProxyServerTextBox.MaxLength = 512; | |||||
this.ProxyServerTextBox.Name = "ProxyServerTextBox"; | |||||
this.ProxyServerTextBox.Size = new System.Drawing.Size(135, 21); | |||||
this.ProxyServerTextBox.TabIndex = 1; | |||||
this.ProxyServerTextBox.WordWrap = false; | |||||
// | |||||
// ProxyPortLable | |||||
// | |||||
this.ProxyPortLable.Anchor = System.Windows.Forms.AnchorStyles.Left; | |||||
this.ProxyPortLable.AutoSize = true; | |||||
this.ProxyPortLable.Location = new System.Drawing.Point(215, 7); | |||||
this.ProxyPortLable.Name = "ProxyPortLable"; | |||||
this.ProxyPortLable.Size = new System.Drawing.Size(65, 12); | |||||
this.ProxyPortLable.TabIndex = 2; | |||||
this.ProxyPortLable.Text = "Proxy Port"; | |||||
// | |||||
// ProxyPortTextBox | |||||
// | |||||
this.ProxyPortTextBox.Location = new System.Drawing.Point(286, 3); | |||||
this.ProxyPortTextBox.MaxLength = 10; | |||||
this.ProxyPortTextBox.Name = "ProxyPortTextBox"; | |||||
this.ProxyPortTextBox.Size = new System.Drawing.Size(100, 21); | |||||
this.ProxyPortTextBox.TabIndex = 3; | |||||
this.ProxyPortTextBox.WordWrap = false; | |||||
// | |||||
// ProxyForm | |||||
// | |||||
this.AcceptButton = this.OKButton; | |||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); | |||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; | |||||
this.AutoSize = true; | |||||
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; | |||||
this.CancelButton = this.MyCancelButton; | |||||
this.ClientSize = new System.Drawing.Size(441, 149); | |||||
this.Controls.Add(this.tableLayoutPanel1); | |||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | |||||
this.MaximizeBox = false; | |||||
this.MinimizeBox = false; | |||||
this.Name = "ProxyForm"; | |||||
this.Padding = new System.Windows.Forms.Padding(12, 12, 12, 9); | |||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | |||||
this.Text = "Edit Proxy"; | |||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ProxyForm_FormClosed); | |||||
this.tableLayoutPanel1.ResumeLayout(false); | |||||
this.tableLayoutPanel1.PerformLayout(); | |||||
this.tableLayoutPanel3.ResumeLayout(false); | |||||
this.tableLayoutPanel2.ResumeLayout(false); | |||||
this.tableLayoutPanel2.PerformLayout(); | |||||
this.ResumeLayout(false); | |||||
this.PerformLayout(); | |||||
} | |||||
#endregion | |||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; | |||||
private System.Windows.Forms.CheckBox UseProxyCheckBox; | |||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; | |||||
private System.Windows.Forms.Label ProxyAddrLabel; | |||||
private System.Windows.Forms.TextBox ProxyServerTextBox; | |||||
private System.Windows.Forms.Label ProxyPortLable; | |||||
private System.Windows.Forms.TextBox ProxyPortTextBox; | |||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; | |||||
private System.Windows.Forms.Button MyCancelButton; | |||||
private System.Windows.Forms.Button OKButton; | |||||
} | |||||
} |
@@ -0,0 +1,116 @@ | |||||
using System; | |||||
using System.Drawing; | |||||
using System.Windows.Forms; | |||||
using Shadowsocks.Controller; | |||||
using Shadowsocks.Model; | |||||
using Shadowsocks.Properties; | |||||
namespace Shadowsocks.View | |||||
{ | |||||
public partial class ProxyForm : Form | |||||
{ | |||||
private ShadowsocksController controller; | |||||
// this is a copy of configuration that we are working on | |||||
private Configuration _modifiedConfiguration; | |||||
public ProxyForm(ShadowsocksController controller) | |||||
{ | |||||
this.Font = System.Drawing.SystemFonts.MessageBoxFont; | |||||
InitializeComponent(); | |||||
UpdateTexts(); | |||||
this.Icon = Icon.FromHandle(Resources.ssw128.GetHicon()); | |||||
this.controller = controller; | |||||
controller.ConfigChanged += controller_ConfigChanged; | |||||
UpdateEnabled(); | |||||
LoadCurrentConfiguration(); | |||||
} | |||||
private void UpdateTexts() | |||||
{ | |||||
UseProxyCheckBox.Text = I18N.GetString("Use Proxy"); | |||||
ProxyAddrLabel.Text = I18N.GetString("Proxy Addr"); | |||||
ProxyPortLable.Text = I18N.GetString("Proxy Port"); | |||||
OKButton.Text = I18N.GetString("OK"); | |||||
MyCancelButton.Text = I18N.GetString("Cancel"); | |||||
this.Text = I18N.GetString("Edit Proxy"); | |||||
} | |||||
private void controller_ConfigChanged(object sender, EventArgs e) | |||||
{ | |||||
LoadCurrentConfiguration(); | |||||
} | |||||
private void LoadCurrentConfiguration() | |||||
{ | |||||
_modifiedConfiguration = controller.GetConfigurationCopy(); | |||||
UseProxyCheckBox.Checked = _modifiedConfiguration.useProxy; | |||||
ProxyServerTextBox.Text = _modifiedConfiguration.proxyServer; | |||||
ProxyPortTextBox.Text = _modifiedConfiguration.proxyPort.ToString(); | |||||
} | |||||
private void OKButton_Click(object sender, EventArgs e) | |||||
{ | |||||
if (UseProxyCheckBox.Checked) | |||||
{ | |||||
try | |||||
{ | |||||
var proxy = ProxyServerTextBox.Text; | |||||
var port = int.Parse(ProxyPortTextBox.Text); | |||||
Configuration.CheckServer(proxy); | |||||
Configuration.CheckPort(port); | |||||
controller.EnableProxy(proxy, port); | |||||
} | |||||
catch (FormatException) | |||||
{ | |||||
MessageBox.Show(I18N.GetString("Illegal port number format")); | |||||
return; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
MessageBox.Show(ex.Message); | |||||
return; | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
controller.DisableProxy(); | |||||
} | |||||
this.Close(); | |||||
} | |||||
private void CancelButton_Click(object sender, EventArgs e) | |||||
{ | |||||
this.Close(); | |||||
} | |||||
private void ProxyForm_FormClosed(object sender, FormClosedEventArgs e) | |||||
{ | |||||
controller.ConfigChanged -= controller_ConfigChanged; | |||||
} | |||||
private void UseProxyCheckBox_CheckedChanged(object sender, EventArgs e) | |||||
{ | |||||
UpdateEnabled(); | |||||
} | |||||
private void UpdateEnabled() | |||||
{ | |||||
if (UseProxyCheckBox.Checked) | |||||
{ | |||||
ProxyServerTextBox.Enabled = true; | |||||
ProxyPortTextBox.Enabled = true; | |||||
} | |||||
else | |||||
{ | |||||
ProxyServerTextBox.Enabled = false; | |||||
ProxyPortTextBox.Enabled = false; | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,120 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<root> | |||||
<!-- | |||||
Microsoft ResX Schema | |||||
Version 2.0 | |||||
The primary goals of this format is to allow a simple XML format | |||||
that is mostly human readable. The generation and parsing of the | |||||
various data types are done through the TypeConverter classes | |||||
associated with the data types. | |||||
Example: | |||||
... ado.net/XML headers & schema ... | |||||
<resheader name="resmimetype">text/microsoft-resx</resheader> | |||||
<resheader name="version">2.0</resheader> | |||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | |||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | |||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | |||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | |||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | |||||
<value>[base64 mime encoded serialized .NET Framework object]</value> | |||||
</data> | |||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | |||||
<comment>This is a comment</comment> | |||||
</data> | |||||
There are any number of "resheader" rows that contain simple | |||||
name/value pairs. | |||||
Each data row contains a name, and value. The row also contains a | |||||
type or mimetype. Type corresponds to a .NET class that support | |||||
text/value conversion through the TypeConverter architecture. | |||||
Classes that don't support this are serialized and stored with the | |||||
mimetype set. | |||||
The mimetype is used for serialized objects, and tells the | |||||
ResXResourceReader how to depersist the object. This is currently not | |||||
extensible. For a given mimetype the value must be set accordingly: | |||||
Note - application/x-microsoft.net.object.binary.base64 is the format | |||||
that the ResXResourceWriter will generate, however the reader can | |||||
read any of the formats listed below. | |||||
mimetype: application/x-microsoft.net.object.binary.base64 | |||||
value : The object must be serialized with | |||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | |||||
: and then encoded with base64 encoding. | |||||
mimetype: application/x-microsoft.net.object.soap.base64 | |||||
value : The object must be serialized with | |||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter | |||||
: and then encoded with base64 encoding. | |||||
mimetype: application/x-microsoft.net.object.bytearray.base64 | |||||
value : The object must be serialized into a byte array | |||||
: using a System.ComponentModel.TypeConverter | |||||
: and then encoded with base64 encoding. | |||||
--> | |||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | |||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | |||||
<xsd:element name="root" msdata:IsDataSet="true"> | |||||
<xsd:complexType> | |||||
<xsd:choice maxOccurs="unbounded"> | |||||
<xsd:element name="metadata"> | |||||
<xsd:complexType> | |||||
<xsd:sequence> | |||||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> | |||||
</xsd:sequence> | |||||
<xsd:attribute name="name" use="required" type="xsd:string" /> | |||||
<xsd:attribute name="type" type="xsd:string" /> | |||||
<xsd:attribute name="mimetype" type="xsd:string" /> | |||||
<xsd:attribute ref="xml:space" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
<xsd:element name="assembly"> | |||||
<xsd:complexType> | |||||
<xsd:attribute name="alias" type="xsd:string" /> | |||||
<xsd:attribute name="name" type="xsd:string" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
<xsd:element name="data"> | |||||
<xsd:complexType> | |||||
<xsd:sequence> | |||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | |||||
</xsd:sequence> | |||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | |||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | |||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | |||||
<xsd:attribute ref="xml:space" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
<xsd:element name="resheader"> | |||||
<xsd:complexType> | |||||
<xsd:sequence> | |||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||||
</xsd:sequence> | |||||
<xsd:attribute name="name" type="xsd:string" use="required" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
</xsd:choice> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
</xsd:schema> | |||||
<resheader name="resmimetype"> | |||||
<value>text/microsoft-resx</value> | |||||
</resheader> | |||||
<resheader name="version"> | |||||
<value>2.0</value> | |||||
</resheader> | |||||
<resheader name="reader"> | |||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||||
</resheader> | |||||
<resheader name="writer"> | |||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||||
</resheader> | |||||
</root> |
@@ -232,6 +232,12 @@ | |||||
<DependentUpon>LogForm.cs</DependentUpon> | <DependentUpon>LogForm.cs</DependentUpon> | ||||
</Compile> | </Compile> | ||||
<Compile Include="View\MenuViewController.cs" /> | <Compile Include="View\MenuViewController.cs" /> | ||||
<Compile Include="View\ProxyForm.cs"> | |||||
<SubType>Form</SubType> | |||||
</Compile> | |||||
<Compile Include="View\ProxyForm.Designer.cs"> | |||||
<DependentUpon>ProxyForm.cs</DependentUpon> | |||||
</Compile> | |||||
<Compile Include="View\QRCodeForm.cs"> | <Compile Include="View\QRCodeForm.cs"> | ||||
<SubType>Form</SubType> | <SubType>Form</SubType> | ||||
</Compile> | </Compile> | ||||
@@ -262,6 +268,9 @@ | |||||
<EmbeddedResource Include="View\LogForm.resx"> | <EmbeddedResource Include="View\LogForm.resx"> | ||||
<DependentUpon>LogForm.cs</DependentUpon> | <DependentUpon>LogForm.cs</DependentUpon> | ||||
</EmbeddedResource> | </EmbeddedResource> | ||||
<EmbeddedResource Include="View\ProxyForm.resx"> | |||||
<DependentUpon>ProxyForm.cs</DependentUpon> | |||||
</EmbeddedResource> | |||||
<EmbeddedResource Include="View\QRCodeForm.resx"> | <EmbeddedResource Include="View\QRCodeForm.resx"> | ||||
<DependentUpon>QRCodeForm.cs</DependentUpon> | <DependentUpon>QRCodeForm.cs</DependentUpon> | ||||
</EmbeddedResource> | </EmbeddedResource> | ||||