diff --git a/Tools/ArdupilotMegaPlanner/Arduino/ArduinoDetect.cs b/Tools/ArdupilotMegaPlanner/Arduino/ArduinoDetect.cs index 76f0a6d57e811f48d21605f9d7f9de32ec382e78..ad59c49534dc9fbb9f8f74e7314785f9f285d778 100644 --- a/Tools/ArdupilotMegaPlanner/Arduino/ArduinoDetect.cs +++ b/Tools/ArdupilotMegaPlanner/Arduino/ArduinoDetect.cs @@ -163,7 +163,7 @@ namespace ArdupilotMega.Arduino { serialPort.Close(); //HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_2341&PID_0010\640333439373519060F0\Device Parameters - if (!MainV2.MONO && !Thread.CurrentThread.CurrentUICulture.IsChildOf(CultureInfoEx.GetCultureInfo("zh-Hans"))) + if (!MainV2.MONO && !Thread.CurrentThread.CurrentCulture.IsChildOf(CultureInfoEx.GetCultureInfo("zh-Hans"))) { ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_SerialPort"); // Win32_USBControllerDevice ManagementObjectSearcher searcher = new ManagementObjectSearcher(query); diff --git a/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj b/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj index 29064ddc3822901901747567bc7d9bc1f91ac5ec..1413297211ed86d3fcc3f5aa247aac0e82ec461a 100644 --- a/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj +++ b/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj @@ -704,6 +704,9 @@ <EmbeddedResource Include="GCSViews\ConfigurationView\ConfigPlanner.resx"> <DependentUpon>ConfigPlanner.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="GCSViews\ConfigurationView\ConfigPlanner.zh-Hans.resx"> + <DependentUpon>ConfigPlanner.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="GCSViews\ConfigurationView\ConfigRadioInput.es-ES.resx"> <DependentUpon>ConfigRadioInput.cs</DependentUpon> </EmbeddedResource> diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigPlanner.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigPlanner.cs index 1cb8bf65222101dabe6f424b3725c67edc60a17f..f1e8803610d253f435b0ad14a8cc6f7af886a539 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigPlanner.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigPlanner.cs @@ -151,7 +151,10 @@ namespace ArdupilotMega.GCSViews.ConfigurationView } private void CMB_language_SelectedIndexChanged(object sender, EventArgs e) - { + { + if (startup) + return; + MainV2.instance.changelanguage((CultureInfo)CMB_language.SelectedItem); #if !DEBUG @@ -492,7 +495,7 @@ namespace ArdupilotMega.GCSViews.ConfigurationView break; } } - CMB_language.SelectedIndexChanged += CMB_language_SelectedIndexChanged; + //CMB_language.SelectedIndexChanged += CMB_language_SelectedIndexChanged; startup = false; } diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigPlanner.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigPlanner.resx index 7836529e846a84b7c46abb1c9ee518ed9152be99..eb2fb012131ff0ba86908661a8da193d39ce81ce 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigPlanner.resx +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigPlanner.resx @@ -1268,7 +1268,7 @@ <value>BUT_Joystick</value> </data> <data name=">>BUT_Joystick.Type" xml:space="preserve"> - <value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4498.31567, Culture=neutral, PublicKeyToken=null</value> + <value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4507.18015, Culture=neutral, PublicKeyToken=null</value> </data> <data name=">>BUT_Joystick.Parent" xml:space="preserve"> <value>$this</value> @@ -1295,7 +1295,7 @@ <value>BUT_videostop</value> </data> <data name=">>BUT_videostop.Type" xml:space="preserve"> - <value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4498.31567, Culture=neutral, PublicKeyToken=null</value> + <value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4507.18015, Culture=neutral, PublicKeyToken=null</value> </data> <data name=">>BUT_videostop.Parent" xml:space="preserve"> <value>$this</value> @@ -1322,7 +1322,7 @@ <value>BUT_videostart</value> </data> <data name=">>BUT_videostart.Type" xml:space="preserve"> - <value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4498.31567, Culture=neutral, PublicKeyToken=null</value> + <value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4507.18015, Culture=neutral, PublicKeyToken=null</value> </data> <data name=">>BUT_videostart.Parent" xml:space="preserve"> <value>$this</value> @@ -1397,6 +1397,6 @@ <value>ConfigPlanner</value> </data> <data name=">>$this.Type" xml:space="preserve"> - <value>ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner, Version=1.1.4498.31567, Culture=neutral, PublicKeyToken=null</value> + <value>ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner, Version=1.1.4507.18015, Culture=neutral, PublicKeyToken=null</value> </data> </root> \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigPlanner.zh-Hans.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigPlanner.zh-Hans.resx new file mode 100644 index 0000000000000000000000000000000000000000..a86888c15c3ce844ad46ea12b1086e59dfb4b79c --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigPlanner.zh-Hans.resx @@ -0,0 +1,226 @@ +<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="label33.Text" xml:space="preserve"> + <value>ä¼ æ„Ÿå™¨</value> + </data> + <data name="label26.Text" xml:space="preserve"> + <value>è§†é¢‘æ ¼å¼</value> + </data> + <data name="label24.Text" xml:space="preserve"> + <value>航 点</value> + </data> + <data name="CHK_loadwponconnect.Text" xml:space="preserve"> + <value>è¿žæŽ¥æ—¶åŠ è½½èˆªç‚¹?</value> + </data> + <data name="label23.Text" xml:space="preserve"> + <value>轨迹长度</value> + </data> + <data name="CHK_speechaltwarning.Text" xml:space="preserve"> + <value>高度è¦å‘Š</value> + </data> + <data name="label108.Text" xml:space="preserve"> + <value>APM é‡å¯</value> + </data> + <data name="CHK_resetapmonconnect.Text" xml:space="preserve"> + <value>USB 连接时é‡ç½® APM</value> + </data> + <data name="CHK_mavdebug.Text" xml:space="preserve"> + <value>Mavlink 消æ¯è°ƒè¯•</value> + </data> + <data name="label104.Text" xml:space="preserve"> + <value>模å¼/状æ€</value> + </data> + <data name="label103.Text" xml:space="preserve"> + <value>ä½ç½®</value> + </data> + <data name="label102.Text" xml:space="preserve"> + <value>å§¿æ€</value> + </data> + <data name="label101.Text" xml:space="preserve"> + <value>饿µ‹é€Ÿçއ</value> + </data> + <data name="label99.Text" xml:space="preserve"> + <value>注æ„: é…置选项å¡ä¸ä¸ä¼šæ˜¾ç¤ºè¿™äº›å•ä½ï¼Œå› 为它们是原始数æ®</value> + </data> + <data name="label98.Text" xml:space="preserve"> + <value>速度å•ä½</value> + </data> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="label97.Size" type="System.Drawing.Size, System.Drawing"> + <value>65, 13</value> + </data> + <data name="label97.Text" xml:space="preserve"> + <value>长度å•ä½</value> + </data> + <data name="label96.Size" type="System.Drawing.Size, System.Drawing"> + <value>69, 13</value> + </data> + <data name="label96.Text" xml:space="preserve"> + <value>æ¸¸æˆæ‘‡æ†</value> + </data> + <data name="label95.Size" type="System.Drawing.Size, System.Drawing"> + <value>57, 13</value> + </data> + <data name="label95.Text" xml:space="preserve"> + <value>è¯éŸ³åˆæˆ</value> + </data> + <data name="CHK_speechbattery.Text" xml:space="preserve"> + <value>ç”µæ± è¦å‘Š</value> + </data> + <data name="CHK_speechcustom.Text" xml:space="preserve"> + <value>æ—¶é—´é—´éš”</value> + </data> + <data name="CHK_speechmode.Text" xml:space="preserve"> + <value>模å¼</value> + </data> + <data name="CHK_speechwaypoint.Text" xml:space="preserve"> + <value>航点</value> + </data> + <data name="label94.Text" xml:space="preserve"> + <value>OSD 颜色</value> + </data> + <data name="label93.Text" xml:space="preserve"> + <value>UI è¯è¨€</value> + </data> + <data name="CHK_enablespeech.Text" xml:space="preserve"> + <value>å¯ç”¨è¯éŸ³</value> + </data> + <data name="CHK_hudshow.Text" xml:space="preserve"> + <value>å¯ç”¨HUDå åŠ </value> + </data> + <data name="label92.Text" xml:space="preserve"> + <value>视频设备</value> + </data> + <data name="BUT_Joystick.Text" xml:space="preserve"> + <value>摇æ†è®¾ç½®</value> + </data> + <data name="BUT_videostop.Text" xml:space="preserve"> + <value>åœæ¢</value> + </data> + <data name="BUT_videostart.Text" xml:space="preserve"> + <value>å¯åЍ</value> + </data> + <data name="label1.Text" xml:space="preserve"> + <value>地图追éš</value> + </data> + <data name="CHK_maprotation.Text" xml:space="preserve"> + <value>地图éšé£žæœºè½¬åЍ</value> + </data> +</root> \ No newline at end of file