WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
Notification.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
4 using System.Data;
5 using System.Drawing;
6 using System.Linq;
7 using System.Text;
8 using System.Windows.Forms;
9 
11 {
12  public partial class Notification : Form
13  {
14  public Notification()
15  {
16  InitializeComponent();
17  }
18 
19 
20 
21  static public void ShowNotification()
22  {
23  Notification U = new Notification();
24  U.CenterToScreen();
25  U.Show();
26 
27 
28 
29 
30  }
31 
32  private void UpdateNotfication_Shown(object sender, EventArgs e)
33  {
34  Screen Screen = Screen.FromControl(this);
35 
36  if ((Screen.AllScreens.Length > 1 && Screen.FromControl(this).Primary))
37  {
38  //Show rotated version
39  NotificationNormal.Visible = false;
40  NoticficationRotated.Visible = true;
41  }
42  else
43  {
44  //Show normal version
45  NotificationNormal.Visible = true;
46  NoticficationRotated.Visible = false;
47  }
48 
49  this.BringToFront();
50  CloseTimer.Start();
51  TopTimer.Start();
52 
53  }
54 
55  private void CloseTimer_Tick(object sender, EventArgs e)
56  {
57  this.Close();
58  }
59 
60  private void TopTimer_Tick(object sender, EventArgs e)
61  {
62  this.BringToFront();
63 
64  }
65  }
66 }