From abd35810bc22100f52f190d4ad52df3306cb95b5 Mon Sep 17 00:00:00 2001 From: lishuo Date: Wed, 9 Jun 2021 17:17:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=84=E8=BF=91=E7=9A=84=E4=BA=BA=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E5=A4=84=E7=90=86=EF=BC=8C=E9=AA=91=E8=A1=8C=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E9=A1=B5=E9=9D=A2=E6=A0=87=E9=A2=98=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E5=86=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/Prefab/Panel/UserInfoPanel.prefab | 36 +++++++++++++++++-- .../Prefab/ResultList/LocalRouteItem.prefab | 4 +-- .../UI/Prefab/ResultList/RouteItem.prefab | 4 +-- Assets/Scenes/Ride/Scripts/Model/OutModel.cs | 17 ++++----- .../Scripts/UI/Prefab/ResultList/RouteItem.cs | 4 +-- 5 files changed, 48 insertions(+), 17 deletions(-) diff --git a/Assets/Resources/UI/Prefab/Panel/UserInfoPanel.prefab b/Assets/Resources/UI/Prefab/Panel/UserInfoPanel.prefab index 0b02b035..34fe0ad6 100644 --- a/Assets/Resources/UI/Prefab/Panel/UserInfoPanel.prefab +++ b/Assets/Resources/UI/Prefab/Panel/UserInfoPanel.prefab @@ -1320,7 +1320,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Total riding time + m_Text: Total Riding Time --- !u!1 &4080633421470452234 GameObject: m_ObjectHideFlags: 0 @@ -3474,7 +3474,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Max heart rate + m_Text: Max Heart Rate --- !u!1 &7462604566789801356 GameObject: m_ObjectHideFlags: 0 @@ -3708,7 +3708,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Bike weight + m_Text: Bike Weight --- !u!1 &7462604567111632052 GameObject: m_ObjectHideFlags: 0 @@ -5430,6 +5430,11 @@ PrefabInstance: propertyPath: m_Name value: RideResultList objectReference: {fileID: 0} + - target: {fileID: 1441145903752631099, guid: ed226fe096f17a0459f856db5fc494af, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 300 + objectReference: {fileID: 0} - target: {fileID: 7974311519597661726, guid: ed226fe096f17a0459f856db5fc494af, type: 3} propertyPath: m_AnchorMax.y @@ -5470,17 +5475,37 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 8884056308248339237, guid: ed226fe096f17a0459f856db5fc494af, + type: 3} + propertyPath: m_SizeDelta.x + value: 261.7354 + objectReference: {fileID: 0} + - target: {fileID: 8884056308248339243, guid: ed226fe096f17a0459f856db5fc494af, + type: 3} + propertyPath: m_Text + value: TRAINING DIARY + objectReference: {fileID: 0} - target: {fileID: 8884056308248339243, guid: ed226fe096f17a0459f856db5fc494af, type: 3} propertyPath: m_FontData.m_Font value: objectReference: {fileID: 12800000, guid: 9428f2aab98e9c34d923a9174035a197, type: 3} + - target: {fileID: 8884056308248339243, guid: ed226fe096f17a0459f856db5fc494af, + type: 3} + propertyPath: m_FontData.m_Alignment + value: 6 + objectReference: {fileID: 0} - target: {fileID: 8884056308736538996, guid: ed226fe096f17a0459f856db5fc494af, type: 3} propertyPath: m_SizeDelta.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 8884056309303262656, guid: ed226fe096f17a0459f856db5fc494af, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 295 + objectReference: {fileID: 0} - target: {fileID: 8884056309303262662, guid: ed226fe096f17a0459f856db5fc494af, type: 3} propertyPath: m_Text @@ -5492,6 +5517,11 @@ PrefabInstance: value: objectReference: {fileID: 12800000, guid: 9428f2aab98e9c34d923a9174035a197, type: 3} + - target: {fileID: 8884056309303262662, guid: ed226fe096f17a0459f856db5fc494af, + type: 3} + propertyPath: m_FontData.m_Alignment + value: 7 + objectReference: {fileID: 0} - target: {fileID: 8884056309872452861, guid: ed226fe096f17a0459f856db5fc494af, type: 3} propertyPath: m_Material diff --git a/Assets/Resources/UI/Prefab/ResultList/LocalRouteItem.prefab b/Assets/Resources/UI/Prefab/ResultList/LocalRouteItem.prefab index 703f3bc7..c800bf50 100644 --- a/Assets/Resources/UI/Prefab/ResultList/LocalRouteItem.prefab +++ b/Assets/Resources/UI/Prefab/ResultList/LocalRouteItem.prefab @@ -241,7 +241,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Cycling equipment:Dynastream + m_Text: Cycling Equipment:Dynastream --- !u!1 &331225471740520315 GameObject: m_ObjectHideFlags: 0 @@ -1582,7 +1582,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Riding time:00:18:52 + m_Text: Riding Time:00:18:52 --- !u!1 &5077901321725402009 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/UI/Prefab/ResultList/RouteItem.prefab b/Assets/Resources/UI/Prefab/ResultList/RouteItem.prefab index ddb735a5..b7591167 100644 --- a/Assets/Resources/UI/Prefab/ResultList/RouteItem.prefab +++ b/Assets/Resources/UI/Prefab/ResultList/RouteItem.prefab @@ -241,7 +241,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Cycling equipment:Dynastream + m_Text: Cycling Equipment:Dynastream --- !u!1 &331225471740520315 GameObject: m_ObjectHideFlags: 0 @@ -1396,7 +1396,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Riding time:00:18:52 + m_Text: Riding Time:00:18:52 --- !u!1 &5077901321725402009 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Ride/Scripts/Model/OutModel.cs b/Assets/Scenes/Ride/Scripts/Model/OutModel.cs index f4bd0485..ab791230 100644 --- a/Assets/Scenes/Ride/Scripts/Model/OutModel.cs +++ b/Assets/Scenes/Ride/Scripts/Model/OutModel.cs @@ -1,6 +1,7 @@ using GeoJSON.Net.Geometry; using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -394,16 +395,16 @@ namespace Assets.Scenes.Ride.Scripts.Model { return new ReceiveMsgModel { - RouteId = Convert.ToInt32(list[0]), - MemberId = Convert.ToInt32(list[1]), - Point = new double[] { double.Parse(list[2].Split(':')[0]), double.Parse(list[2].Split(':')[1]) }, + RouteId = Convert.ToInt32(list[0],CultureInfo.InvariantCulture), + MemberId = Convert.ToInt32(list[1], CultureInfo.InvariantCulture), + Point = new double[] { double.Parse(list[2].Split(':')[0], CultureInfo.InvariantCulture), double.Parse(list[2].Split(':')[1], CultureInfo.InvariantCulture) }, IsCompleted = ToBoolean(list[3]), //exit = ToBoolean(list[4]), - Speed = Convert.ToDouble(list[4]), - PreDistance = Convert.ToDouble(list[5]), - EndDistance = Convert.ToDouble(list[6]), - WeightKg = Convert.ToDouble(list[7]), - Competitionid = Convert.ToInt32(list[8]), + Speed = Convert.ToDouble(list[4], CultureInfo.InvariantCulture), + PreDistance = Convert.ToDouble(list[5], CultureInfo.InvariantCulture), + EndDistance = Convert.ToDouble(list[6], CultureInfo.InvariantCulture), + WeightKg = Convert.ToDouble(list[7], CultureInfo.InvariantCulture), + Competitionid = Convert.ToInt32(list[8], CultureInfo.InvariantCulture), Saved = ToBoolean(list[9]) }; } diff --git a/Assets/Scripts/UI/Prefab/ResultList/RouteItem.cs b/Assets/Scripts/UI/Prefab/ResultList/RouteItem.cs index 36905e69..d6610df2 100644 --- a/Assets/Scripts/UI/Prefab/ResultList/RouteItem.cs +++ b/Assets/Scripts/UI/Prefab/ResultList/RouteItem.cs @@ -39,7 +39,7 @@ public class RouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandle left.Find("Main").Find("Name").GetComponent().text = result.RouteName; left.Find("Main").Find("Time").GetComponent().text = result.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"); - row1.Find("Time").GetComponent().text = $"Riding time:{result.TrainingTime}"; + row1.Find("Time").GetComponent().text = $"Riding Time:{result.TrainingTime}"; row1.Find("Distance").GetComponent().text = $"Mileage:{result.EndDistance.ToString("#0.00")}KM"; row1.Find("Times").GetComponent().text = $"Times:{result.Count}"; if (index == 0) @@ -52,7 +52,7 @@ public class RouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandle } left.Find("Progress").Find("Image").GetComponent().fillAmount = (float)result.Progress; left.Find("Progress").Find("Value").GetComponent().text = (result.Progress * 100).ToString("#0"); - row2.Find("Device").GetComponent().text = $"Cycling equipment:{result.ManufacturerName}"; + row2.Find("Device").GetComponent().text = $"Cycling Equipment:{result.ManufacturerName}"; if (index == 0) { right = transform.Find("Right");