Skip to content

Commit 08f4bdb

Browse files
committed
Fix build error and optimize CI
1 parent 6ba22ae commit 08f4bdb

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525

2626
- uses: microsoft/setup-msbuild@v2
2727

28-
- run: choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Component.Windows10SDK.19041"
28+
- run: |
29+
$vsInstallerPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_community.exe"
30+
& $vsInstallerPath --quiet --wait --add Microsoft.VisualStudio.Component.Windows10SDK.19041
2931
3032
- run: echo ${{ secrets.ENV_FILE }} | base64 --decode > .env
3133
shell: bash

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121

2222
- uses: microsoft/setup-msbuild@v2
2323

24-
- run: choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Component.Windows10SDK.19041"
24+
- run: |
25+
$vsInstallerPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_community.exe"
26+
& $vsInstallerPath --quiet --wait --add Microsoft.VisualStudio.Component.Windows10SDK.19041
2527
2628
- run: echo ${{ secrets.ENV_FILE }} | base64 --decode > .env
2729
shell: bash

src/EventScheduler.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class EventScheduler
3737
public EventScheduler()
3838
{
3939
fullScreenChecker = new FullScreenApi(() => HandleTimerEvent(true));
40-
HiddenForm.OnPowerModeChanged = OnPowerModeChanged;
4140

4241
backgroundTimer.AutoReset = true;
4342
backgroundTimer.Interval = 60e3;
@@ -134,10 +133,10 @@ public bool Run(bool forceImageUpdate = false, DisplayEvent overrideEvent = null
134133
return true;
135134
}
136135

137-
public async void RunAndUpdateLocation(bool forceImageUpdate = false, Action locationReady = null)
136+
public async void RunAndUpdateLocation(bool forceImageUpdate = false, Action onLocationReady = null)
138137
{
139138
bool result = Run(forceImageUpdate);
140-
locationReady?.Invoke();
139+
onLocationReady?.Invoke();
141140

142141
if (result && JsonConfig.settings.locationMode == 1 && await UwpLocation.UpdateGeoposition())
143142
{

0 commit comments

Comments
 (0)