Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
SteamTools
提交
00adfa32
S
SteamTools
项目概览
jobily
/
SteamTools
10 个月 前同步成功
通知
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 搜索 >>
提交
00adfa32
编写于
8月 23, 2023
作者:
A
Aigio Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
🚧
Misc
上级
77ddd020
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
60 addition
and
9 deletion
+60
-9
ref/DirectoryPackages
ref/DirectoryPackages
+1
-1
src/BD.WTTS.Client.Avalonia.App/Program.cs
src/BD.WTTS.Client.Avalonia.App/Program.cs
+12
-0
src/BD.WTTS.Client.Avalonia.Designer.HostApp/BD.WTTS.Client.Avalonia.Designer.HostApp.csproj
...r.HostApp/BD.WTTS.Client.Avalonia.Designer.HostApp.csproj
+1
-0
src/BD.WTTS.Client.Avalonia/Extensions/WindowTransparencyLevelExtensions.cs
....Avalonia/Extensions/WindowTransparencyLevelExtensions.cs
+5
-2
src/BD.WTTS.Client.Avalonia/UI/App.axaml.cs
src/BD.WTTS.Client.Avalonia/UI/App.axaml.cs
+0
-1
src/BD.WTTS.Client.Avalonia/UI/Views/Abstractions/Windows/ReactiveAppWindow.cs
...alonia/UI/Views/Abstractions/Windows/ReactiveAppWindow.cs
+0
-2
src/BD.WTTS.Client.Tools.Publish/Commands/IDotNetPublishCommand.cs
...TS.Client.Tools.Publish/Commands/IDotNetPublishCommand.cs
+19
-2
src/BD.WTTS.Client/Startup/Startup.Constants.cs
src/BD.WTTS.Client/Startup/Startup.Constants.cs
+1
-0
src/BD.WTTS.Client/Startup/Startup.Host.cs
src/BD.WTTS.Client/Startup/Startup.Host.cs
+20
-0
src/BD.WTTS.Client/Startup/Startup.SingleInstancePipeline.cs
src/BD.WTTS.Client/Startup/Startup.SingleInstancePipeline.cs
+1
-1
未找到文件。
DirectoryPackages
@
a4d992f1
比较
b2e7c6a1
...
a4d992f1
Subproject commit
b2e7c6a10cb50286da16f00841994366952f9449
Subproject commit
a4d992f156a233efad86b30e8ec7fae946d93268
src/BD.WTTS.Client.Avalonia.App/Program.cs
浏览文件 @
00adfa32
#if DESIGNER
using
Moq
;
#endif
// ReSharper disable once CheckNamespace
namespace
BD.WTTS
;
...
...
@@ -7,6 +11,14 @@ partial class Program
[
STAThread
]
static
int
Main
(
string
[]
args
)
// Main 函数需要 STA 线程不可更改为 async Task
{
#if DESIGNER
static
object
?
Fallback
(
Type
serviceType
,
bool
required
)
{
var
moq
=
(
Mock
)
Activator
.
CreateInstance
(
typeof
(
Mock
<>).
MakeGenericType
(
serviceType
))!;
return
moq
.
Object
;
}
Ioc
.
Fallback
=
Fallback
;
#endif
instance
=
new
(
args
);
var
exitCode
=
instance
.
StartAsync
().
GetAwaiter
().
GetResult
();
return
exitCode
;
...
...
src/BD.WTTS.Client.Avalonia.Designer.HostApp/BD.WTTS.Client.Avalonia.Designer.HostApp.csproj
浏览文件 @
00adfa32
...
...
@@ -67,6 +67,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Moq" />
<PackageReference Include="BD.Common.XmlnsDefinition.Avalonia">
<Aliases>BD_Common_XmlnsDefinition_Avalonia</Aliases>
</PackageReference>
...
...
src/BD.WTTS.Client.Avalonia/Extensions/WindowTransparencyLevelExtensions.cs
浏览文件 @
00adfa32
namespace
BD.WTTS.Extensions
;
// ReSharper disable once CheckNamespace
namespace
BD.WTTS
;
public
static
class
WindowTransparencyLevelExtensions
{
public
static
WindowTransparencyLevel
ToWindowTransparencyLevel
(
this
WindowBackgroundMaterial
value
)
[
MethodImpl
(
MethodImplOptions
.
AggressiveInlining
)]
public
static
WindowTransparencyLevel
ToWindowTransparencyLevel
(
this
WindowBackgroundMaterial
value
)
{
return
value
switch
{
...
...
src/BD.WTTS.Client.Avalonia/UI/App.axaml.cs
浏览文件 @
00adfa32
using
BD.WTTS.Client.Resources
;
using
BD.WTTS.Extensions
;
using
LiveChartsCore
;
using
LiveChartsCore.SkiaSharpView
;
using
SkiaSharp
;
...
...
src/BD.WTTS.Client.Avalonia/UI/Views/Abstractions/Windows/ReactiveAppWindow.cs
浏览文件 @
00adfa32
using
BD.WTTS.Extensions
;
namespace
BD.WTTS.UI.Views.Windows
;
/// <summary>
...
...
src/BD.WTTS.Client.Tools.Publish/Commands/IDotNetPublishCommand.cs
浏览文件 @
00adfa32
...
...
@@ -694,6 +694,25 @@ publish -c {0} -p:OutputType={1} -p:PublishDir=bin\{0}\Publish\win-any -p:Publis
static
void
PublishAppHost
(
string
publishDir
,
Platform
platform
,
bool
debug
)
{
const
string
appconfigFileName
=
"Steam++.exe.config"
;
var
rootPublishDir
=
Path
.
Combine
(
publishDir
,
".."
);
var
cacheFilePath
=
Path
.
Combine
(
ProjectUtils
.
ProjPath
,
"res"
,
"windows"
,
"Steam++.apphost"
);
// 使用缓存文件
if
(
File
.
Exists
(
cacheFilePath
))
{
File
.
Copy
(
cacheFilePath
,
Path
.
Combine
(
rootPublishDir
,
"Steam++.exe"
));
var
sourceFileName
=
Path
.
Combine
(
ProjectUtils
.
ProjPath
,
"src"
,
"BD.WTTS.Client.AppHost"
,
"App.config"
);
var
appconfigContent
=
File
.
ReadAllText
(
sourceFileName
);
var
xmlDoc
=
new
XmlDocument
();
xmlDoc
.
LoadXml
(
appconfigContent
);
appconfigContent
=
xmlDoc
.
InnerXml
;
File
.
WriteAllText
(
Path
.
Combine
(
rootPublishDir
,
appconfigFileName
),
appconfigContent
);
return
;
}
const
string
app_host_tfm
=
"net40"
/*"net35"*/
;
// net35 在 Windows 10 LTSC 上即使 app.config 中配置了 4.x 兼容但依旧会打开设置窗口并且定位在可选功能
var
configuration
=
PublishCommandArg
.
GetConfiguration
(
debug
);
string
?
arguments
=
null
;
...
...
@@ -716,10 +735,8 @@ publish -c {0} -p:OutputType={1} -p:PublishDir=bin\{0}\Publish\win-any -p:Publis
arguments
??
// 多次相同的编译产生的文件不会变化
throw
new
ArgumentOutOfRangeException
(
nameof
(
platform
),
platform
,
null
));
var
rootPublishDir
=
Path
.
Combine
(
publishDir
,
".."
);
if
(
isWindows
)
{
const
string
appconfigFileName
=
"Steam++.exe.config"
;
var
appHostPublishDir
=
Path
.
Combine
(
projRootPath
,
"bin"
,
configuration
,
"Publish"
,
"win-any"
);
var
apphostfilenames
=
new
[]
{
...
...
src/BD.WTTS.Client/Startup/Startup.Constants.cs
浏览文件 @
00adfa32
...
...
@@ -7,5 +7,6 @@ partial class Startup // 常量
const
string
help_
=
"-h"
;
const
string
key_proxy
=
"proxy"
;
const
string
key_shutdown
=
"shutdown"
;
const
string
key_show
=
"show"
;
public
const
string
command_main
=
"main"
;
}
src/BD.WTTS.Client/Startup/Startup.Host.cs
浏览文件 @
00adfa32
...
...
@@ -207,6 +207,26 @@ partial class Startup // 配置 Host
var
app
=
await
UIApplicationTCS
.
Task
;
app
.
Shutdown
();
return
;
case
key_show
:
try
{
MainThread2
.
BeginInvokeOnMainThread
(()
=>
{
try
{
IApplication
.
Instance
.
RestoreMainWindow
();
}
catch
{
}
});
}
catch
{
}
break
;
default
:
var
args
=
value
.
Split
(
' '
,
StringSplitOptions
.
RemoveEmptyEntries
);
if
(
args
.
Length
>=
1
)
...
...
src/BD.WTTS.Client/Startup/Startup.SingleInstancePipeline.cs
浏览文件 @
00adfa32
...
...
@@ -11,7 +11,7 @@ partial class Startup // 本应用程序单例管道
initSingleInstancePipeline
:
singleInstancePipeline
=
new
();
if
(!
singleInstancePipeline
.
IsFirstSelfApp
)
{
if
(
SingleInstancePipeline
.
SendMessage
(
sendMessage
?.
Invoke
()
??
""
))
if
(
SingleInstancePipeline
.
SendMessage
(
sendMessage
?.
Invoke
()
??
(
IsMainProcess
?
key_show
:
""
)
))
{
return
false
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录