xxe 2 years ago
parent
commit
d6b3ff0da8
1 changed files with 12 additions and 19 deletions
  1. +12
    -19
      HKCardOUT/ViewModels/RootViewModel.cs

+ 12
- 19
HKCardOUT/ViewModels/RootViewModel.cs View File

@@ -142,27 +142,20 @@ namespace HKCardOUT.ViewModels
private void AdOpen()
{
var SC = System.Windows.Forms.Screen.AllScreens.Count();
Rectangle[] rectangle = new Rectangle[SC];
var win = new Views.AdWindow(Ad[0].Ad);
var rectangles = System.Windows.Forms.Screen.AllScreens[0].WorkingArea;
win.Height = rectangles.Height;
win.Width = rectangles.Width;
win.Top = 0;
win.Left = rectangles.Left;
win.Owner = this.Main;
win.Show();
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();
}

var win1 = new Views.AdWindow(Ad[1].Ad);
var rectangless = System.Windows.Forms.Screen.AllScreens[1].WorkingArea;
win1.Height = rectangless.Height;
win1.Width = rectangless.Width;
win1.Top = 0;
win1.Left = rectangless.Left;
win1.Owner = this.Main;
win1.Show();

//for (int i = 0; i < Ad.Count; i++)
//{
// var win = new Views.AdWindow(Ad[i].Ad);


Loading…
Cancel
Save