Browse Source

屏幕阻塞

Lishi
xxe 2 years ago
parent
commit
d554bf8447
2 changed files with 7 additions and 3 deletions
  1. +2
    -2
      HKCardOUT/HKCardOUT.csproj
  2. +5
    -1
      HKCardOUT/ViewModels/RootViewModel.cs

+ 2
- 2
HKCardOUT/HKCardOUT.csproj View File

@@ -14,9 +14,9 @@
<AssemblyVersion>1.0.0.0</AssemblyVersion> <AssemblyVersion>1.0.0.0</AssemblyVersion>
<Platforms>AnyCPU;x86</Platforms> <Platforms>AnyCPU;x86</Platforms>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<!--<PropertyGroup>
<ApplicationManifest>App.manifest</ApplicationManifest> <ApplicationManifest>App.manifest</ApplicationManifest>
</PropertyGroup>
</PropertyGroup>-->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;Core</DefineConstants> <DefineConstants>TRACE;Core</DefineConstants>
</PropertyGroup> </PropertyGroup>


+ 5
- 1
HKCardOUT/ViewModels/RootViewModel.cs View File

@@ -172,7 +172,11 @@ namespace HKCardOUT.ViewModels
try try
{ {
var SC = System.Windows.Forms.Screen.AllScreens.Count(); var SC = System.Windows.Forms.Screen.AllScreens.Count();
if (SC < 3) return;
while (SC<3)
{
SC = System.Windows.Forms.Screen.AllScreens.Count();
Thread.Sleep(1000);
}
for (int i = 0; i < SC; i++) for (int i = 0; i < SC; i++)
{ {
var win = new AdWindow(Ad[i].Ad, i); var win = new AdWindow(Ad[i].Ad, i);


Loading…
Cancel
Save