diff ServerMonitor/Controls/DiskSpaceCheckControl.cs @ 9:7127d5b5ac75

Code cleanup and comments
author Brad Greco <brad@bgreco.net>
date Mon, 08 Apr 2019 21:29:54 -0400
parents 453ecc1ed9ea
children
line wrap: on
line diff
--- a/ServerMonitor/Controls/DiskSpaceCheckControl.cs	Sat Mar 09 20:14:03 2019 -0500
+++ b/ServerMonitor/Controls/DiskSpaceCheckControl.cs	Mon Apr 08 21:29:54 2019 -0400
@@ -1,14 +1,8 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
 
 namespace ServerMonitorApp
 {
+    /// <summary>Control for editing a disk space check.</summary>
     [CheckType(typeof(DiskSpaceCheck))]
     public partial class DiskSpaceCheckControl : CheckControl
     {
@@ -19,9 +13,11 @@
 
         private void DiskSpaceCheckControl_Load(object sender, EventArgs e)
         {
+            // Initialize the free space units to a non-empty value.
             FreeSpaceUnitsComboBox.SelectedIndex = 1;
         }
 
+        /// <summary>Sets the values of the controls from a check's properties.</summary>
         public override void LoadCheck(Check check1)
         {
             DiskSpaceCheck check = (DiskSpaceCheck)check1;
@@ -30,6 +26,7 @@
             FreeSpaceUnitsComboBox.SelectedIndex = (int)check.FreeSpaceUnits;
         }
 
+        /// <summary>Updates the properties of a check from user input.</summary>
         public override void UpdateCheck(Check check1)
         {
             DiskSpaceCheck check = (DiskSpaceCheck)check1;
@@ -46,4 +43,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}