using System; using System.Collections.Generic; using System.Text; namespace Server_Dashboard { /// /// Dashboard Module class that holds all the information that gets displayed /// class DashboardModule { //The name the user gives the module public string ModuleName { get; set; } //The user who created it public string Creator { get; set; } //All the information that the server had public ServerInformation ServerInfo { get; set; } //The status indicator public string StatusIndicator { get; set; } //The background color of the status indicator public string StatusIndicatorBG { get; set; } //If the server is avaibale or not public bool ServerAvailable { get; set; } //The Module icon the user give the server, defaults to a generic server symbol public string ModuleIcon { get; set; } //Creation date with System.DateTime.Now public string CreationDate { get; set; } /// /// This will set the Module status indicator red or green if the server is available or not /// /// public DashboardModule(bool serverAvailable) { ServerAvailable = serverAvailable; StatusIndicator = ServerAvailable ? "#20c657" : "#e53935"; StatusIndicatorBG = ServerAvailable ? "#94eeb0" : "#ef9a9a"; } } }