Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6e9e992

Browse files
committed
Misc
1 parent 68dbbaa commit 6e9e992

5 files changed

Lines changed: 15 additions & 12 deletions

File tree

WattToolkit.sln

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Document", "Document", "{1E
2929
ProjectSection(SolutionItems) = preProject
3030
doc\download-guide.en.md = doc\download-guide.en.md
3131
doc\download-guide.md = doc\download-guide.md
32+
doc\openwrt.md = doc\openwrt.md
3233
doc\release-keylol.md = doc\release-keylol.md
3334
EndProjectSection
3435
EndProject
@@ -151,7 +152,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BD.WTTS.Client.AppHost", "s
151152
EndProject
152153
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BD.WTTS.Client.Plugins.Accelerator.ReverseProxy", "src\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy.csproj", "{521D4676-8E8A-4A4C-9835-B09FF4AFFBBC}"
153154
EndProject
154-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BD.WTTS.Client.IPC", "src\BD.WTTS.Client.IPC\BD.WTTS.Client.IPC.csproj", "{407BE171-FB57-4C39-BF26-7FAF4450635F}"
155+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BD.WTTS.Client.IPC", "src\BD.WTTS.Client.IPC\BD.WTTS.Client.IPC.csproj", "{407BE171-FB57-4C39-BF26-7FAF4450635F}"
155156
EndProject
156157
Global
157158
GlobalSection(SolutionConfigurationPlatforms) = preSolution

doc/openwrt.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
### [OpenWrt](https://openwrt.org/start)

src/BD.WTTS.Client.Avalonia.App/Services/Implementation/AvaloniaWindowManagerImpl.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,11 @@ static void BindingDialogWindowViewModel(Window window, DialogWindowViewModel di
8787
window.Close();
8888
}
8989
});
90-
if (dialogWindowViewModel.Cancel == null)
90+
dialogWindowViewModel.Cancel ??= ReactiveCommand.Create(() =>
9191
{
92-
dialogWindowViewModel.Cancel = ReactiveCommand.Create(() =>
93-
{
94-
dialogWindowViewModel.DialogResult = false;
95-
window.Close();
96-
});
97-
}
92+
dialogWindowViewModel.DialogResult = false;
93+
window.Close();
94+
});
9895
}
9996
if (viewModel == null)
10097
{

src/BD.WTTS.Client.Plugins.Accelerator/Plugins/Plugin.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@ public override void OnAddAutoMapper(IMapperConfigurationExpression cfg)
5353
cfg.AddProfile<AcceleratorAutoMapperProfile>();
5454
}
5555

56-
public override void OnUnhandledException(Exception ex, string name, bool? isTerminating = null)
56+
public override async void OnUnhandledException(Exception ex, string name, bool? isTerminating = null)
5757
{
58-
Ioc.Get_Nullable<IReverseProxyService>()?.StopProxy();
58+
IReverseProxyService reverseProxyService = Ioc.Get_Nullable<IReverseProxyService>();
59+
if (reverseProxyService != null)
60+
{
61+
await reverseProxyService.StartProxy();
62+
}
5963
ProxyService.OnExitRestoreHosts();
6064
}
6165
}

src/BD.WTTS.Client/Services.Implementation/App/ApplicationUpdateServiceBaseImpl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,9 @@ where local_file_info.Exists
388388
#endregion
389389

390390
#region 根据哈希值匹配已有文件
391-
if (hashFiles.ContainsKey(hashFileKey))
391+
if (hashFiles.TryGetValue(hashFileKey, out var value))
392392
{
393-
var hashFilePath = hashFiles[hashFileKey];
393+
var hashFilePath = value;
394394
File.Copy(hashFilePath, fileInfo.FullName);
395395
goto for_end;
396396
}

0 commit comments

Comments
 (0)