Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
SteamTools
提交
a5032432
S
SteamTools
项目概览
jobily
/
SteamTools
9 个月 前同步成功
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SteamTools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
a5032432
编写于
2月 07, 2022
作者:
A
Aigio L
提交者:
GitHub
2月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #980 from BeyondDimension/develop
v2.6.5 RC4
上级
8a6ecf9a
405352fd
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
110 addition
and
142 deletion
+110
-142
src/AboutAppInfoPopup.cs
src/AboutAppInfoPopup.cs
+12
-12
src/Common.ClientLib.Droid/Application/Security/DeviceSecurityCheckUtil.cs
...Lib.Droid/Application/Security/DeviceSecurityCheckUtil.cs
+22
-17
src/Common.ClientLib/Application/Services/Implementation/PreferencesPlatformServiceImpl.cs
...Services/Implementation/PreferencesPlatformServiceImpl.cs
+16
-82
src/ST.Client.Android/Services/Implementation/AndroidDeviceInfoPlatformServiceImpl.cs
...es/Implementation/AndroidDeviceInfoPlatformServiceImpl.cs
+22
-17
src/ST.Client/UI/ViewModels/MainWindowViewModel.TabItems.cs
src/ST.Client/UI/ViewModels/MainWindowViewModel.TabItems.cs
+30
-1
src/ST.Client/UI/ViewModels/MainWindowViewModel.cs
src/ST.Client/UI/ViewModels/MainWindowViewModel.cs
+2
-8
src/ST.Client/UI/ViewModels/Pages/CommunityProxyPageViewModel.cs
...Client/UI/ViewModels/Pages/CommunityProxyPageViewModel.cs
+2
-1
src/ST.Client/UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs
...ent/UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs
+4
-4
未找到文件。
src/AboutAppInfoPopup.cs
浏览文件 @
a5032432
...
...
@@ -414,18 +414,18 @@ namespace System.Application.UI
// b.Append(DeviceSecurityCheckUtil.IsEmulator.ToLowerString());
// b.AppendLine();
//}
b
.
Append
(
"[device.gl.renderer] "
);
b
.
Append
(
GLES20
.
GlGetString
(
GLES20
.
GlRenderer
)
??
""
);
b
.
AppendLine
();
b
.
Append
(
"[device.gl.vendor] "
);
b
.
Append
(
GLES20
.
GlGetString
(
GLES20
.
GlVendor
)
??
""
);
b
.
AppendLine
();
b
.
Append
(
"[device.gl.version] "
);
b
.
Append
(
GLES20
.
GlGetString
(
GLES20
.
GlVersion
)
??
""
);
b
.
AppendLine
();
b
.
Append
(
"[device.gl.extensions] "
);
b
.
Append
(
GLES20
.
GlGetString
(
GLES20
.
GlExtensions
)
??
""
);
b
.
AppendLine
();
//
b.Append("[device.gl.renderer] ");
//
b.Append(GLES20.GlGetString(GLES20.GlRenderer) ?? "");
//
b.AppendLine();
//
b.Append("[device.gl.vendor] ");
//
b.Append(GLES20.GlGetString(GLES20.GlVendor) ?? "");
//
b.AppendLine();
//
b.Append("[device.gl.version] ");
//
b.Append(GLES20.GlGetString(GLES20.GlVersion) ?? "");
//
b.AppendLine();
//
b.Append("[device.gl.extensions] ");
//
b.Append(GLES20.GlGetString(GLES20.GlExtensions) ?? "");
//
b.AppendLine();
b
.
Append
(
"[device.biometric] "
);
b
.
Append
(
IBiometricService
.
Instance
.
IsSupportedAsync
().
Result
.
ToLowerString
());
b
.
AppendLine
();
...
...
src/Common.ClientLib.Droid/Application/Security/DeviceSecurityCheckUtil.cs
浏览文件 @
a5032432
...
...
@@ -267,23 +267,28 @@
// newRating++;
// }
// try
// {
// var opengl = Android.Opengl.GLES20.GlGetString(Android.Opengl.GLES20.GlRenderer);
// if (!string.IsNullOrWhiteSpace(opengl))
// {
//#pragma warning disable CS8604 // 可能的 null 引用参数。
// if (contains(opengl, "Bluestacks") ||
// contains(opengl, "Translator") ||
// contains(opengl, "youwave")
// )
//#pragma warning restore CS8604 // 可能的 null 引用参数。
// newRating += 10;
// }
// }
// catch
// {
// }
/* signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xdd0
* Cause: null pointer dereference
* backtrace:
* #00 pc 0000000000005ff4 /system/lib64/libGLESv1_CM.so (glGetString+52)
*/
//// try
//// {
//// var opengl = Android.Opengl.GLES20.GlGetString(Android.Opengl.GLES20.GlRenderer);
//// if (!string.IsNullOrWhiteSpace(opengl))
//// {
////#pragma warning disable CS8604 // 可能的 null 引用参数。
//// if (contains(opengl, "Bluestacks") ||
//// contains(opengl, "Translator") ||
//// contains(opengl, "youwave")
//// )
////#pragma warning restore CS8604 // 可能的 null 引用参数。
//// newRating += 10;
//// }
//// }
//// catch
//// {
//// }
// try
// {
...
...
src/Common.ClientLib/Application/Services/Implementation/PreferencesPlatformServiceImpl.cs
浏览文件 @
a5032432
...
...
@@ -2,9 +2,7 @@ using SQLite;
using
System.Application.Entities
;
using
System.Application.Repositories
;
using
System.Diagnostics
;
using
System.Diagnostics.CodeAnalysis
;
using
System.Globalization
;
using
NotNull
=
System
.
Diagnostics
.
CodeAnalysis
.
NotNullAttribute
;
using
SQLiteNotNull
=
SQLite
.
NotNullAttribute
;
using
SQLiteTable
=
SQLite
.
TableAttribute
;
...
...
@@ -26,93 +24,33 @@ namespace System.Application.Services.Implementation
if
(
sharedName
==
null
)
return
GetId
(
key
);
return
$"
{
key
}
_
{
sharedName
}
_S"
;
}
public
void
PlatformClear
(
string
?
sharedName
)
{
if
(
sharedName
==
null
)
{
conn
.
Execute
(
Sql_Delete_All
);
}
else
{
conn
.
Execute
(
Sql_Delete_Where_SharedName_Equals
,
sharedName
);
}
conn
.
Execute
(
Sql_Delete_Where_SharedName_Equals
,
sharedName
??
string
.
Empty
);
}
//public void PlatformClear(string? sharedName)
//{
// if (sharedName == null)
// {
// conn.DeleteAll<Entity>();
// }
// else
// {
// var items = conn.Table<Entity>().Where(x => x.SharedName == sharedName).ToArray();
// foreach (var item in items)
// {
// conn.Delete(item);
// }
// }
//}
//public bool PlatformContainsKey(string key, string? sharedName)
//{
// int r;
// if (sharedName == null)
// {
// r = conn.Execute(Sql_Select_SharedName_Where_Key_Equals_And_SharedName_IsNull, GetId(key));
// }
// else
// {
// r = conn.Execute(Sql_Select_SharedName_Where_Key_Equals_And_SharedName_Equals, GetId(key, sharedName), sharedName);
// }
// return r > 0;
//}
public
bool
PlatformContainsKey
(
string
key
,
string
?
sharedName
)
{
var
id
=
GetId
(
key
,
sharedName
);
var
item
=
conn
.
Table
<
Entity
>().
Where
(
x
=>
x
.
Id
==
id
&&
x
.
SharedName
==
sharedName
).
FirstOrDefault
();
sharedName
??=
string
.
Empty
;
var
item
=
conn
.
Table
<
Entity
>()
.
Where
(
x
=>
x
.
Id
==
id
&&
x
.
SharedName
==
sharedName
)
.
FirstOrDefault
();
return
item
!=
null
;
}
//public T? PlatformGet<T>(string key, T? defaultValue, string? sharedName) where T : notnull, IConvertible
//{
// string? r;
// if (sharedName == null)
// {
// r = conn.ExecuteScalar<string?>(Sql_Select_Value_Where_Key_Equals_And_SharedName_IsNull, GetId(key));
// }
// else
// {
// r = conn.ExecuteScalar<string?>(Sql_Select_Value_Where_Key_Equals_And_SharedName_Equals, GetId(key, sharedName), sharedName);
// }
// if (r == null) return defaultValue;
// var r2 = ConvertibleHelper.Convert<T>(r);
// return r2;
//}
public
T
?
PlatformGet
<
T
>(
string
key
,
T
?
defaultValue
,
string
?
sharedName
)
where
T
:
notnull
,
IConvertible
{
var
id
=
GetId
(
key
,
sharedName
);
var
item
=
conn
.
Table
<
Entity
>().
Where
(
x
=>
x
.
Id
==
id
&&
x
.
SharedName
==
sharedName
).
FirstOrDefault
();
sharedName
??=
string
.
Empty
;
var
item
=
conn
.
Table
<
Entity
>()
.
Where
(
x
=>
x
.
Id
==
id
&&
x
.
SharedName
==
sharedName
)
.
FirstOrDefault
();
if
(
item
==
null
)
return
defaultValue
;
var
value
=
ConvertibleHelper
.
Convert
<
T
>(
item
.
Value
);
return
value
;
}
//public void PlatformRemove(string key, string? sharedName)
//{
// if (sharedName == null)
// {
// conn.Execute(Sql_Delete_Where_Id_Equals_And_SharedName_IsNull, GetId(key));
// }
// else
// {
// conn.Execute(Sql_Delete_Where_Id_Equals_And_SharedName_Equals, GetId(key, sharedName), sharedName);
// }
//}
public
void
PlatformRemove
(
string
key
,
string
?
sharedName
)
{
var
id
=
GetId
(
key
,
sharedName
);
...
...
@@ -132,19 +70,16 @@ namespace System.Application.Services.Implementation
{
Id
=
id
,
Value
=
value
.
ToString
(
CultureInfo
.
InvariantCulture
),
SharedName
=
sharedName
,
SharedName
=
sharedName
??
string
.
Empty
,
});
}
}
const
string
TableName
=
"
0
984415E"
;
const
string
TableName
=
"
1
984415E"
;
const
string
ColumnName_Id
=
"0F5E4BAA"
;
const
string
ColumnName_Value
=
"4FC331D7"
;
const
string
ColumnName_SharedName
=
"F6A739AA"
;
const
string
Sql_Delete_All
=
$"DELETE FROM \"
{
TableName
}
\""
;
const
string
Sql_Delete_Where_SharedName_Equals
=
$"DELETE FROM \"
{
TableName
}
\" WHERE \"
{
ColumnName_SharedName
}
\" = ?"
;
...
...
@@ -174,19 +109,18 @@ namespace System.Application.Services.Implementation
[
Column
(
ColumnName_Id
)]
[
PrimaryKey
]
[
SQLiteNotNull
]
[
NotNull
,
DisallowNull
]
// C# 8 not null
public
string
?
Id
{
get
;
set
;
}
public
string
Id
{
get
;
set
;
}
=
string
.
Empty
;
[
Column
(
ColumnName_Value
)]
[
SQLiteNotNull
]
[
NotNull
,
DisallowNull
]
// C# 8 not null
public
string
?
Value
{
get
;
set
;
}
public
string
Value
{
get
;
set
;
}
=
string
.
Empty
;
#pragma warning restore CS8618 // 在退出构造函数时,不可为 null 的字段必须包含非 null 值。请考虑声明为可以为 null。
[
Column
(
ColumnName_SharedName
)]
public
string
?
SharedName
{
get
;
set
;
}
[
SQLiteNotNull
]
public
string
SharedName
{
get
;
set
;
}
=
string
.
Empty
;
string
DebuggerDisplay
()
=>
SharedName
==
null
?
$"
{
Id
}
,
{
Value
}
"
:
$"
{
Id
}
,
{
Value
}
,
{
SharedName
}
"
;
string
DebuggerDisplay
()
=>
SharedName
==
string
.
Empty
?
$"
{
Id
}
,
{
Value
}
"
:
$"
{
Id
}
,
{
Value
}
,
{
SharedName
}
"
;
}
}
}
src/ST.Client.Android/Services/Implementation/AndroidDeviceInfoPlatformServiceImpl.cs
浏览文件 @
a5032432
...
...
@@ -114,23 +114,28 @@ namespace System.Application.Services.Implementation
newRating
++;
}
try
{
var
opengl
=
Android
.
Opengl
.
GLES20
.
GlGetString
(
Android
.
Opengl
.
GLES20
.
GlRenderer
);
if
(!
string
.
IsNullOrWhiteSpace
(
opengl
))
{
#pragma warning disable CS8604 // 可能的 null 引用参数。
if
(
contains
(
opengl
,
"Bluestacks"
)
||
contains
(
opengl
,
"Translator"
)
||
contains
(
opengl
,
"youwave"
)
)
#pragma warning restore CS8604 // 可能的 null 引用参数。
newRating
+=
10
;
}
}
catch
{
}
/* signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xdd0
* Cause: null pointer dereference
* backtrace:
* #00 pc 0000000000005ff4 /system/lib64/libGLESv1_CM.so (glGetString+52)
*/
// try
// {
// var opengl = Android.Opengl.GLES20.GlGetString(Android.Opengl.GLES20.GlRenderer);
// if (!string.IsNullOrWhiteSpace(opengl))
// {
//#pragma warning disable CS8604 // 可能的 null 引用参数。
// if (contains(opengl, "Bluestacks") ||
// contains(opengl, "Translator") ||
// contains(opengl, "youwave")
// )
//#pragma warning restore CS8604 // 可能的 null 引用参数。
// newRating += 10;
// }
// }
// catch
// {
// }
try
{
...
...
src/ST.Client/UI/ViewModels/MainWindowViewModel.TabItems.cs
浏览文件 @
a5032432
...
...
@@ -9,7 +9,24 @@ namespace System.Application.UI.ViewModels
readonly
Dictionary
<
Type
,
Lazy
<
TabItemViewModel
>>
mTabItems
=
new
();
public
IEnumerable
<
TabItemViewModel
>
TabItems
=>
mTabItems
.
Values
.
Select
(
x
=>
x
.
Value
);
public
IReadOnlyList
<
TabItemViewModel
>?
FooterTabItems
{
get
;
private
set
;
}
IReadOnlyList
<
TabItemViewModel
>?
_FooterTabItems
;
public
IReadOnlyList
<
TabItemViewModel
>?
FooterTabItems
{
get
{
if
(
_FooterTabItems
==
null
)
{
var
settingsPageVM
=
SettingsPageViewModel
.
Instance
;
var
aboutPageVM
=
AboutPageViewModel
.
Instance
;
_FooterTabItems
=
new
List
<
TabItemViewModel
>
{
settingsPageVM
,
aboutPageVM
,
};
}
return
_FooterTabItems
;
}
}
public
IEnumerable
<
TabItemViewModel
>
AllTabItems
{
...
...
@@ -20,6 +37,18 @@ namespace System.Application.UI.ViewModels
}
}
/// <summary>
/// 当前 <see cref="AllTabItems"/>,延时加载 <see cref="FooterTabItems"/>
/// </summary>
public
IEnumerable
<
TabItemViewModel
>
CurrentAllTabItems
{
get
{
if
(
_FooterTabItems
==
null
)
return
TabItems
;
else
return
TabItems
.
Concat
(
_FooterTabItems
);
}
}
void
AddTabItem
<
TabItemVM
>()
where
TabItemVM
:
TabItemViewModel
,
new
()
{
Lazy
<
TabItemViewModel
>
value
=
new
(()
=>
new
TabItemVM
()
...
...
src/ST.Client/UI/ViewModels/MainWindowViewModel.cs
浏览文件 @
a5032432
...
...
@@ -88,20 +88,14 @@ namespace System.Application.UI.ViewModels
});
}
FooterTabItems
=
new
List
<
TabItemViewModel
>
{
SettingsPageViewModel
.
Instance
,
AboutPageViewModel
.
Instance
,
};
#
region
InitTabItems
//AddTabItem<StartPageViewModel>();
AddTabItem
<
CommunityProxyPageViewModel
>();
AddTabItem
<
ProxyScriptManagePageViewModel
>();
if
(
IApplication
.
IsDesktopPlatform
)
{
AddTabItem
<
ProxyScriptManagePageViewModel
>();
AddTabItem
<
SteamAccountPageViewModel
>();
AddTabItem
<
GameListPageViewModel
>();
}
...
...
@@ -134,7 +128,7 @@ namespace System.Application.UI.ViewModels
R
.
Subscribe
(()
=>
{
foreach
(
var
item
in
AllTabItems
)
foreach
(
var
item
in
Current
AllTabItems
)
{
item
.
RaisePropertyChanged
(
nameof
(
TabItemViewModelBase
.
Name
));
}
...
...
src/ST.Client/UI/ViewModels/Pages/CommunityProxyPageViewModel.cs
浏览文件 @
a5032432
...
...
@@ -19,7 +19,7 @@ namespace System.Application.UI.ViewModels
{
public
partial
class
CommunityProxyPageViewModel
{
readonly
IHostsFileService
hostsFileService
=
IHostsFileService
.
Instan
ce
;
readonly
IHostsFileService
?
hostsFileServi
ce
;
readonly
IPlatformService
platformService
=
IPlatformService
.
Instance
;
public
ReactiveCommand
<
Unit
,
Unit
>?
SetupCertificateCommand
{
get
;
}
...
...
@@ -58,6 +58,7 @@ namespace System.Application.UI.ViewModels
if
(
IApplication
.
IsDesktopPlatform
)
{
hostsFileService
=
IHostsFileService
.
Instance
;
SetupCertificateCommand
=
ReactiveCommand
.
Create
(
SetupCertificate_OnClick
);
DeleteCertificateCommand
=
ReactiveCommand
.
Create
(
DeleteCertificate_OnClick
);
EditHostsFileCommand
=
ReactiveCommand
.
Create
(
hostsFileService
.
OpenFile
);
...
...
src/ST.Client/UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs
浏览文件 @
a5032432
...
...
@@ -28,12 +28,12 @@ namespace System.Application.UI.ViewModels
UpdateChannels
=
Enum2
.
GetAll
<
UpdateChannelType
>();
SelectFont
=
R
.
Fonts
.
FirstOrDefault
(
x
=>
x
.
Value
==
UISettings
.
FontName
.
Value
);
this
.
WhenValueChanged
(
x
=>
x
.
SelectFont
,
false
)
.
Subscribe
(
x
=>
UISettings
.
FontName
.
Value
=
x
.
Value
);
if
(
IApplication
.
IsDesktopPlatform
)
{
SelectFont
=
R
.
Fonts
.
FirstOrDefault
(
x
=>
x
.
Value
==
UISettings
.
FontName
.
Value
);
this
.
WhenValueChanged
(
x
=>
x
.
SelectFont
,
false
)
.
Subscribe
(
x
=>
UISettings
.
FontName
.
Value
=
x
.
Value
);
SelectImage_Click
=
ReactiveCommand
.
CreateFromTask
(
async
()
=>
{
FilePickerFileType
fileTypes
=
new
ValueTuple
<
string
,
string
[
]>
[]
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录