Merge remote-tracking branch 'origin/dev_lishuo' into dev_cyp
This commit is contained in:
commit
353c19662c
11 files changed
+75
-36
No files matched your search
@@ -12,7 +12,7 @@ namespace Assets.Scripts.UI.Control
|
||||
public class PFUIText : PFUIComponentBase
|
||||
{
|
||||
public string key;
|
||||
private Text text;
|
||||
protected Text text;
|
||||
|
||||
public string Text
|
||||
{
|
||||
|
||||
@@ -7,7 +7,6 @@ using Assets.Scripts;
|
||||
|
||||
public class MultiTips:PFUIText
|
||||
{
|
||||
private Text text;
|
||||
private Button button;
|
||||
private string[] tips { get; set; }
|
||||
private int currentIndex = 0;
|
||||
|
||||
@@ -79,42 +79,50 @@ public class LocalRouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
|
||||
Name.text = record.RouteName;
|
||||
Time.text = record.StartTime.ToLocalString("HH:mm:ss dd-MM-yyyy");
|
||||
RidingTime.text = $"<color={titleColor}>{App.GetLocalString("Riding time")}:</color>{Helper.FormatTicks(record.Ticks)}";
|
||||
RidingTime.text = $"<color={titleColor}>{App.GetLocalString("Riding Time")}:</color>{Helper.FormatTicks(record.Ticks)}";
|
||||
RidingDistance.text = $"<color={titleColor}>{App.GetLocalString("Mileage")}:</color>{record.EndDistance.ToString("#0.00")}KM";
|
||||
Device.text = $"<color={titleColor}>{App.GetLocalString("Cycling equipment")}:</color>{record.ManufacturerName}";
|
||||
Device.text = $"<color={titleColor}>{App.GetLocalString("Cycling Equipment")}:</color>{record.ManufacturerName}";
|
||||
}
|
||||
else
|
||||
{
|
||||
listFileName.Add(item);
|
||||
}
|
||||
}
|
||||
DeleteLocalRecord();
|
||||
}
|
||||
|
||||
void DeleteLocalRecord(bool showMessage=false)
|
||||
{
|
||||
//自动上传
|
||||
try
|
||||
{
|
||||
MapInterruptRecordApi service = ConfigHelper.mapInterruptRecordApi;
|
||||
var result = service.Add(record, listFileName);
|
||||
//删除文件
|
||||
if (result.result)
|
||||
{
|
||||
Helper.DelectDir(path);
|
||||
Destroy(gameObject);
|
||||
}
|
||||
if (showMessage)
|
||||
{
|
||||
Utils.showToast(gameObject, result.errMsg);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Utils.showToast(gameObject, e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void GoUplaod()
|
||||
{
|
||||
UIManager.ShowConfirm("Upload", "Upload the local record?", () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
MapInterruptRecordApi service = new MapInterruptRecordApi();
|
||||
var result = service.Add(record, listFileName);
|
||||
//删除文件
|
||||
UIManager.CloseConfirm();
|
||||
if (result.result)
|
||||
{
|
||||
Helper.DelectDir(path);
|
||||
DestroyImmediate(gameObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.showToast(gameObject, result.errMsg);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Utils.showToast(gameObject, e.Message);
|
||||
}
|
||||
DeleteLocalRecord(true);
|
||||
//删除文件
|
||||
UIManager.CloseConfirm();
|
||||
});
|
||||
}
|
||||
void GoDelete()
|
||||
|
||||
@@ -264,7 +264,7 @@ public class ResultListController : PFUIPanel
|
||||
{
|
||||
if (Directory.Exists(item))
|
||||
{
|
||||
var d = new DirectoryInfo(item);
|
||||
//var d = new DirectoryInfo(item);
|
||||
//var createTime = d.CreationTime;//create time
|
||||
//var newTime = createTime.AddSeconds(30D);
|
||||
//if (newTime < DateTime.Now)
|
||||
|
||||
Reference in new issue
Block a user