diff --git a/System.Application.SteamTools.Client.Desktop/FileSystemDesktop.cs b/System.Application.SteamTools.Client.Desktop/FileSystemDesktop.cs index c93aa9f76..2546b1f1c 100644 --- a/System.Application.SteamTools.Client.Desktop/FileSystemDesktop.cs +++ b/System.Application.SteamTools.Client.Desktop/FileSystemDesktop.cs @@ -1,4 +1,7 @@ using System.IO; +#if NET35 +using WinFormsApplication = System.Windows.Forms.Application; +#endif namespace System.Application { @@ -25,7 +28,12 @@ namespace System.Application //} //appDataRootPath = Path.Combine(appDataRootPath, BuildConfig.APPLICATION_ID); - var appDataRootPath = AppContext.BaseDirectory; + var appDataRootPath = +#if NET35 + WinFormsApplication.StartupPath; +#else + AppContext.BaseDirectory; +#endif var appDataPath = Path.Combine(appDataRootPath, AppDataDirName); var cachePath = Path.Combine(appDataRootPath, CacheDirName); diff --git a/System.Application.SteamTools.Client.Desktop/Models/MyAuthenticator.cs b/System.Application.SteamTools.Client.Desktop/Models/MyAuthenticator.cs index d28b994c8..da63b9240 100644 --- a/System.Application.SteamTools.Client.Desktop/Models/MyAuthenticator.cs +++ b/System.Application.SteamTools.Client.Desktop/Models/MyAuthenticator.cs @@ -1,10 +1,34 @@ using ReactiveUI; using System.Collections.Generic; +using System.Linq; namespace System.Application.Models { public class MyAuthenticator : ReactiveObject { + public MyAuthenticator(IGAPAuthenticatorDTO data) + { + AuthenticatorData = data; + } + public IGAPAuthenticatorDTO AuthenticatorData { get; set; } + + public string Name + { + get + { + return AuthenticatorData.Name; + } + set + { + AuthenticatorData.Name = value; + this.RaisePropertyChanged(); + } + } + + public void Sync() => AuthenticatorData.Value.Sync(); + + public static List Get(IEnumerable items) + => items.Select(x => new MyAuthenticator(x)).ToList(); } -} +} \ No newline at end of file diff --git a/System.Application.SteamTools.Services.CloudService.Models/Models/ClockInResponse.cs b/System.Application.SteamTools.Services.CloudService.Models/Models/ClockInResponse.cs index 8e7dc35e7..edc33d16e 100644 --- a/System.Application.SteamTools.Services.CloudService.Models/Models/ClockInResponse.cs +++ b/System.Application.SteamTools.Services.CloudService.Models/Models/ClockInResponse.cs @@ -12,20 +12,20 @@ namespace System.Application.Models public class ClockInResponse { /// - /// 获得的经验值 + /// 经验值 /// [MPKey(0)] [N_JsonProperty("0")] [S_JsonProperty("0")] - public uint AddExperience { get; set; } + public uint Experience { get; set; } /// - /// 获得的体力值 + /// 体力值 /// [MPKey(1)] [N_JsonProperty("1")] [S_JsonProperty("1")] - public int AddStrength { get; set; } + public int Strength { get; set; } /// /// 等级 diff --git a/System.Common.CoreLib/IOPath.cs b/System.Common.CoreLib/IOPath.cs index eb9de8213..d8a40d07e 100644 --- a/System.Common.CoreLib/IOPath.cs +++ b/System.Common.CoreLib/IOPath.cs @@ -1,5 +1,7 @@ using System.IO; +#if !NET35 using Xamarin.Essentials; +#endif namespace System { @@ -107,7 +109,11 @@ namespace System { if (getAppDataDirectory != null) return getAppDataDirectory(); +#if NET35 + throw new PlatformNotSupportedException(); +#else return FileSystem.AppDataDirectory; +#endif } } @@ -118,7 +124,11 @@ namespace System { if (getCacheDirectory != null) return getCacheDirectory(); +#if NET35 + throw new PlatformNotSupportedException(); +#else return FileSystem.CacheDirectory; +#endif } } @@ -179,8 +189,12 @@ namespace System /// public static bool IsDirectory(string ioPath) { +#if NET35 + throw new PlatformNotSupportedException(); +#else var attr = File.GetAttributes(ioPath); return attr.HasFlag(FileAttributes.Directory); +#endif } ///