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 Form1 : Form |
13 |
{ |
14 |
public Form1() |
15 |
{ |
16 |
InitializeComponent(); |
17 |
} |
18 |
|
19 |
private void Form1_Load(object sender, EventArgs e) |
20 |
{ |
21 |
// load theme |
22 |
ThemeLoader loader = new ThemeLoader(); |
23 |
loader.LoadThemeOrDefault(NexusPowerControl.Properties.Settings.Default.ActiveThemeName); |
24 |
ThemeLoader.ThemeDefinition theme = loader.GetLoadedTheme(); |
25 |
|
26 |
if (theme.ThemeLoaded) |
27 |
{ |
28 |
pic_main.Image = Image.FromFile(theme.MainImage); |
29 |
} |
30 |
|
31 |
|
32 |
btnShutdown.OnClickEvent += new EventHandler(btnShutdown_Click); |
33 |
btnRestart.OnClickEvent += new EventHandler(btnRestart_Click); |
34 |
btnLogoff.OnClickEvent += new EventHandler(btnLogoff_Click); |
35 |
btnLockScreen.OnClickEvent += new EventHandler(btnLockScreen_Click); |
36 |
btnSleep.OnClickEvent += new EventHandler(btnSleep_Click); |
37 |
btnClose.OnClickEvent += new EventHandler(btnClose_Click); |
38 |
} |
39 |
|
40 |
private void btnShutdown_Click(object sender, EventArgs e) |
41 |
{ |
42 |
|
43 |
} |
44 |
|
45 |
private void btnRestart_Click(object sender, EventArgs e) |
46 |
{ |
47 |
|
48 |
} |
49 |
|
50 |
private void btnLogoff_Click(object sender, EventArgs e) |
51 |
{ |
52 |
|
53 |
} |
54 |
|
55 |
private void btnLockScreen_Click(object sender, EventArgs e) |
56 |
{ |
57 |
|
58 |
} |
59 |
|
60 |
private void btnSleep_Click(object sender, EventArgs e) |
61 |
{ |
62 |
|
63 |
} |
64 |
|
65 |
private void btnClose_Click(object sender, EventArgs e) |
66 |
{ |
67 |
this.Close(); |
68 |
} |
69 |
|
70 |
|
71 |
|
72 |
} |
73 |
} |