xxe vor 2 Jahren
Ursprung
Commit
287caed4e2
1 geänderte Dateien mit 19 neuen und 4 gelöschten Zeilen
  1. +19
    -4
      HKCardOUT/ViewModels/RootViewModel.cs

+ 19
- 4
HKCardOUT/ViewModels/RootViewModel.cs Datei anzeigen

@@ -141,12 +141,26 @@ namespace HKCardOUT.ViewModels

private void AdOpen()
{
var SC = System.Windows.Forms.Screen.AllScreens.Count();
try
{
var SC = System.Windows.Forms.Screen.AllScreens.Count();

for (int i = 0; i < SC; i++)
for (int i = 0; i < SC; i++)
{
var win = new AdWindow(Ad[i].Ad);
var rectangle = System.Windows.Forms.Screen.AllScreens[i].WorkingArea;
win.Height = rectangle.Height;
win.Width = rectangle.Width;
win.Top = 0;
win.Left = rectangle.Left;
win.Owner = this.Main;
win.Show();
}
}
catch
{
var win = new AdWindow(Ad[i].Ad);
var rectangle = System.Windows.Forms.Screen.AllScreens[i].WorkingArea;
var win = new AdWindow("暂无广告");
var rectangle = System.Windows.Forms.Screen.AllScreens[0].WorkingArea;
win.Height = rectangle.Height;
win.Width = rectangle.Width;
win.Top = 0;
@@ -154,6 +168,7 @@ namespace HKCardOUT.ViewModels
win.Owner = this.Main;
win.Show();
}
}

#endregion


Laden…
Abbrechen
Speichern