comparison ServerMonitor/Forms/UpdateDialog.cs @ 10:9e77c0dccb66

Add update checker
author Brad Greco <brad@bgreco.net>
date Mon, 08 Apr 2019 21:31:03 -0400
parents
children
comparison
equal deleted inserted replaced
9:7127d5b5ac75 10:9e77c0dccb66
1 using System;
2 using System.Drawing;
3 using System.Windows.Forms;
4
5 namespace ServerMonitorApp
6 {
7 /// <summary>Message dialog with an additional checkbox.</summary>
8 public partial class UpdateDialog : Form
9 {
10 /// <summary>Message to show.</summary>
11 public string Message { get; set; }
12
13 /// <summary>Check state of the checkbox.</summary>
14 public bool Checked { get; private set; }
15
16 public UpdateDialog()
17 {
18 InitializeComponent();
19 }
20
21 private void CheckBoxDialog_Load(object sender, EventArgs e)
22 {
23 MessageIcon.Image = SystemIcons.Question.ToBitmap();
24 MessageLabel.Text = Message;
25 }
26
27 /// <summary>Updates the public property with the checked state so it can be read by the dialog owner.</summary>
28 private void PromptCheckBox_CheckedChanged(object sender, EventArgs e)
29 {
30 Checked = PromptCheckBox.Checked;
31 }
32 }
33 }