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

Annotation of /trunk/NexusPowerControl/Form1.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (hide annotations) (download)
Sat Oct 22 22:14:15 2011 UTC (8 years ago) by william
File size: 1905 byte(s)
implement theme button clicking

1 william 4 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 william 8
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 william 10
26     if (theme.ThemeLoaded)
27     {
28     pic_main.Image = Image.FromFile(theme.MainImage);
29     }
30    
31 william 11
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 william 8 }
39 william 10
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 william 11 this.Close();
68     }
69 william 10
70 william 11
71    
72 william 4 }
73     }

  ViewVC Help
Powered by ViewVC 1.1.22