Mercurial > servermonitor
comparison ServerMonitor/Controls/ServerSummaryControl.cs @ 0:3e1a2131f897
Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Mon, 31 Dec 2018 18:32:14 -0500 |
parents | |
children | 3142e52cbe69 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3e1a2131f897 |
---|---|
1 using System; | |
2 using System.Collections.Generic; | |
3 using System.ComponentModel; | |
4 using System.Drawing; | |
5 using System.Data; | |
6 using System.Linq; | |
7 using System.Text; | |
8 using System.Windows.Forms; | |
9 | |
10 namespace ServerMonitorApp | |
11 { | |
12 public partial class ServerSummaryControl : UserControl | |
13 { | |
14 public new event EventHandler Click; | |
15 | |
16 public Server Server { get; private set; } | |
17 | |
18 public ServerSummaryControl(Server server) | |
19 { | |
20 InitializeComponent(); | |
21 | |
22 foreach (Control control in new Control[] { this, ServerPictureBox, ServerNameLabel }) | |
23 { | |
24 control.Cursor = Cursors.Hand; | |
25 control.Click += Control_Click; | |
26 } | |
27 Server = server; | |
28 ServerNameLabel.Text = Server.Name; | |
29 } | |
30 | |
31 private void Control_Click(object sender, EventArgs e) | |
32 { | |
33 Click?.Invoke(this, e); | |
34 } | |
35 } | |
36 } |