/[NexusPowerControl]/trunk/NexusPowerControl/DesktopSplash.cs
ViewVC logotype

Contents of /trunk/NexusPowerControl/DesktopSplash.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13 - (show annotations) (download)
Sat Oct 22 23:15:43 2011 UTC (8 years ago) by william
File size: 1073 byte(s)
*** add desktop blur form / with timer to launch MainUI

1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Data;
5 using System.Drawing;
6 using System.Linq;
7 using System.Text;
8 using System.Windows.Forms;
9
10 namespace NexusPowerControl
11 {
12 public partial class DesktopSplash : Form
13 {
14 MainUI ui = new MainUI();
15
16 const int MAX_TICK_COUNT = 10; // milliseconds
17 int tick_count = 0;
18 public DesktopSplash()
19 {
20 InitializeComponent();
21 ui.FormClosed += new FormClosedEventHandler(ui_FormClosed);
22 }
23
24 void ui_FormClosed(object sender, FormClosedEventArgs e)
25 {
26 this.Close();
27 }
28
29 private void DesktopSplash_Shown(object sender, EventArgs e)
30 {
31 timer1.Start();
32 }
33
34 private void timer1_Tick(object sender, EventArgs e)
35 {
36 tick_count++;
37 if (tick_count > MAX_TICK_COUNT)
38 {
39 timer1.Stop();
40 ui.ShowDialog();
41 }
42 }
43 }
44 }

  ViewVC Help
Powered by ViewVC 1.1.22