add auto module fetch on startup and finished module creation form for real now

This commit is contained in:
Rene Schwarz
2021-08-09 15:08:26 +02:00
parent f1f717a37f
commit cdb86331e5
30 changed files with 269 additions and 124 deletions

View File

@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Media.Imaging;
namespace Server_Dashboard {
internal class ModuleData {
//The name the user gives the module
public string ModuleName { get; set; }
//The user who created it
public string Creator { 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 BitmapImage ModuleIcon { get; set; }
//Creation date with System.DateTime.Now
public DateTime CreationDate { get; set; }
//List that contains all the serverinformation over a period of time(lifespan of the module)
public List<ServerInformation> ServerInformation { get; set; }
/// <summary>
/// This will set the Module status indicator red or green if the server is available or not
/// </summary>
/// <param name="serverAvailable"></param>
public ModuleData(bool serverAvailable) {
ServerAvailable = serverAvailable;
StatusIndicator = ServerAvailable ? "#20c657" : "#e53935";
StatusIndicatorBG = ServerAvailable ? "#94eeb0" : "#ef9a9a";
}
}
}