static public void Blackout(Rectangle rect) { while (blackoutForms.Count > 0) { blackoutForms[0].Close(); blackoutForms.RemoveAt(0); } var bounds = Screen.AllScreens.Where(a => !a.Bounds.IntersectsWith(rect)).ToArray(); blackoutForms = bounds.Select(a => { var tmp = new BlackoutForm(a); tmp.Show(); return(tmp); }).ToList(); }
public static void Blackout(Rectangle rect) { while (blackoutForms.Count > 0) { blackoutForms[0].Close(); blackoutForms.RemoveAt(0); } var bounds = Screen.AllScreens.Where(a => !a.Bounds.IntersectsWith(rect)).ToArray(); blackoutForms = bounds.Select(a => { var tmp = new BlackoutForm(a); tmp.Show(); return tmp; }).ToList(); }